Procházet zdrojové kódy

* Ported [2882] to 1.2.11
* Fixed a bug in cmd_chattr with |m users. (fixes #267)


svn: 2883

Bryan Drewery před 20 roky
rodič
revize
015cbf492a
2 změnil soubory, kde provedl 11 přidání a 0 odebrání
  1. 4 0
      doc/UPDATES
  2. 7 0
      src/cmds.c

+ 4 - 0
doc/UPDATES

@@ -2,6 +2,10 @@ This is a summary of ChangeLog basically.
 Numbers expressed as '#12' are references to a ticket/bug posting which can be viewed at: http://xx.shatow.net
 Lines prefixed with '-' were disabled before release and are not finished, or are planned changes.
 
+1.2.11
+* Fixed typo in help for .set
+* Fixed a bug in cmd_chattr with |m users. (fixes #267)
+
 1.2.10 - http://tracker.shatow.net/milestone/1.2.10
 * Removed old references to '+/-manop' and '+/-nomop' for chaninfo in help file.
 * Fixed auth cmds not working in privmsg. (fixes #228)

+ 7 - 0
src/cmds.c

@@ -2324,6 +2324,13 @@ static void cmd_chattr(int idx, char *par)
     user.match |= FR_CHAN;
   get_user_flagrec(dcc[idx].user, &user, chan ? chan->dname : 0);
   get_user_flagrec(u2, &ouser, chan ? chan->dname : 0);
+  if (!chan && !glob_master(user)) {
+    dprintf(idx, "You do not have global master access.\n";
+    if (tmpchg)
+      free(tmpchg);
+    return;
+  }
+
   if (chan && !glob_master(user) && !chan_master(user)) {
     dprintf(idx, "You do not have channel master privileges for channel %s.\n",
 	    par);