[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Little patch for channel keys
Hi,
well, the following patch allows to remove a channel key without supplying
the key. ie: /mode * +k key
/mode * -k <- works
/mode * -k key <- works
/mode * -k hello <- doesn't work
I think it's not a very elegant patch, so if you are going to implement this
new behavior you might want to find a better solution...
Bye, Kasi
--- cut here ---
*** channel.c Sun Jun 8 11:24:44 1997
--- channel.c.old Sun Jun 8 10:38:31 1997
***************
*** 866,882 ****
break;
case 'k':
*penalty += 1;
! parc--;
! if ((whatt == MODE_DEL) && (parc == 0))
! {
! parv++;
! *parv = mode->key;
! }
! else if (parc <= 0)
! break;
! else
! parv++;
!
/* check now so we eat the parameter if present */
if (keychange)
break;
--- 866,874 ----
break;
case 'k':
*penalty += 1;
! if (--parc <= 0)
! break;
! parv++;
/* check now so we eat the parameter if present */
if (keychange)
break;
--- cut here --
--
Kaspar Landsberg, <kl@xxxxxxxxxxxxxxx>