Răsfoiți Sursa

* Port [2969] to 1.2.11
* Fix ban/invite/exempt removal flaw. (fixes #280)


svn: 2970

Bryan Drewery 20 ani în urmă
părinte
comite
b5f52a381a
2 a modificat fișierele cu 2 adăugiri și 1 ștergeri
  1. 1 0
      doc/UPDATES
  2. 1 1
      src/mod/channels.mod/cmdschan.c

+ 1 - 0
doc/UPDATES

@@ -15,6 +15,7 @@ Lines prefixed with '-' were disabled before release and are not finished, or ar
 * Fixed a segfault from removing bots. (fixes #271)
 * Fixed a segfault from removing bots. (fixes #271)
 * Fix /MSG invite not showing proper cmd for usage. (Fixes #278)
 * Fix /MSG invite not showing proper cmd for usage. (Fixes #278)
 * Fix cmdpass processing on ambiguous cmds. (fixes #279)
 * Fix cmdpass processing on ambiguous cmds. (fixes #279)
+* Fix ban/invite/exempt removal flaw. (fixes #280)
 
 
 1.2.10 - http://tracker.shatow.net/milestone/1.2.10
 1.2.10 - http://tracker.shatow.net/milestone/1.2.10
 * Removed old references to '+/-manop' and '+/-nomop' for chaninfo in help file.
 * Removed old references to '+/-manop' and '+/-nomop' for chaninfo in help file.

+ 1 - 1
src/mod/channels.mod/cmdschan.c

@@ -225,7 +225,7 @@ static void cmd_mns_mask(const char type, int idx, char *par)
     chan = findchan_by_dname(chname);
     chan = findchan_by_dname(chname);
   if (chan) {
   if (chan) {
     m = type == 'b' ? chan->channel.ban : type == 'e' ? chan->channel.exempt : chan->channel.invite;
     m = type == 'b' ? chan->channel.ban : type == 'e' ? chan->channel.exempt : chan->channel.invite;
-    if ((i = atoi(who)) > 0) {
+    if (str_isdigit(who) && (i = atoi(who)) > 0) {
       simple_snprintf(s, sizeof s, "%d", i);
       simple_snprintf(s, sizeof s, "%d", i);
       j = u_delmask(type, chan, s, 1);
       j = u_delmask(type, chan, s, 1);
       if (j > 0) {
       if (j > 0) {