Kaynağa Gözat

Merge branch '58-ducch-flag-a-spam' into next

* 58-ducch-flag-a-spam:
  Update docs
  Warn when +a is used and suggest +O for auto-op instead

Conflicts:
	doc/UPDATES
Bryan Drewery 13 yıl önce
ebeveyn
işleme
8ab6e6a690
2 değiştirilmiş dosya ile 5 ekleme ve 0 silme
  1. 1 0
      doc/UPDATES
  2. 4 0
      src/cmds.c

+ 1 - 0
doc/UPDATES

@@ -2,6 +2,7 @@ next
   * Bot will now jump from the server it's on if it is removed from the server list. (fixes a changing network bug)
   * Properly honor exemptions when kicking matched RBL clients
   * Fix LASTON not being shared
+  * Warn when using 'chattr +a' as some users may expect it to be auto-op
 
 maint
   * Prevent crashing on startup if openssl can not be loaded

+ 4 - 0
src/cmds.c

@@ -2671,6 +2671,10 @@ static void cmd_chattr(int idx, char *par)
       putlog(LOG_CMDS, "*", "#%s# chattr %s %s", dcc[idx].nick, hand, chg ? chg : "");
       update_mod(hand, dcc[idx].nick, "chattr", chg);
     }
+    if (chg && (pls.global & USER_ADMIN)) { // +a was used, warn that this is admin and not auto-op.
+      dprintf(idx, "WARNING: You have just used +a, which is an ADMIN priviledge.\n");
+      dprintf(idx, "If you intended to use the AUTO-OP priviledge, please use +O instead.\n");
+    }
   }
   /* Get current flags and display them */