فهرست منبع

* When msging bot for op, a NOTICE is sent to user if the channel is set to no manop.

svn: 2215
Bryan Drewery 21 سال پیش
والد
کامیت
1b4b81e8d3
2فایلهای تغییر یافته به همراه7 افزوده شده و 1 حذف شده
  1. 1 0
      doc/UPDATES
  2. 6 1
      src/mod/irc.mod/msgcmds.c

+ 1 - 0
doc/UPDATES

@@ -18,6 +18,7 @@ Lines prefixed with '-' were disabled before release and are not finished, or ar
 * Fixed cmd_botset not displaying botnick.
 * Fixed cmd_botset not displaying botnick.
 * cmd_adduser now sends a NOTICE to the person being added with their initial password.
 * cmd_adduser now sends a NOTICE to the person being added with their initial password.
 * Fixed cmd_conf not working at all.
 * Fixed cmd_conf not working at all.
+* When msging bot for op, a NOTICE is sent to user if the channel is set to no manop.
 
 
 1.2.3
 1.2.3
 
 

+ 6 - 1
src/mod/irc.mod/msgcmds.c

@@ -75,6 +75,8 @@ static int msg_op(char *nick, char *host, struct userrec *u, char *par)
             if (do_op(nick, chan, 0, 1)) {
             if (do_op(nick, chan, 0, 1)) {
               stats_add(u, 0, 1);
               stats_add(u, 0, 1);
               putlog(LOG_CMDS, "*", "(%s!%s) !%s! OP %s", nick, host, u->handle, par);
               putlog(LOG_CMDS, "*", "(%s!%s) !%s! OP %s", nick, host, u->handle, par);
+              if (chan->manop)
+                dprintf(DP_HELP, "NOTICE %s :%s is currently set to punish for manual op.\n", nick, chan->dname);
             }
             }
           }
           }
           return BIND_RET_BREAK;
           return BIND_RET_BREAK;
@@ -84,8 +86,11 @@ static int msg_op(char *nick, char *host, struct userrec *u, char *par)
         for (chan = chanset; chan; chan = chan->next) {
         for (chan = chanset; chan; chan = chan->next) {
           get_user_flagrec(u, &fr, chan->dname);
           get_user_flagrec(u, &fr, chan->dname);
           if (chk_op(fr, chan)) {
           if (chk_op(fr, chan)) {
-            if (do_op(nick, chan, 0, 1))
+            if (do_op(nick, chan, 0, 1)) {
               stats++;
               stats++;
+              if (chan->manop)
+                dprintf(DP_HELP, "NOTICE %s :%s is currently set to punish for manual op.\n", nick, chan->dname);
+            }
           }
           }
         }
         }
         putlog(LOG_CMDS, "*", "(%s!%s) !%s! OP", nick, host, u->handle);
         putlog(LOG_CMDS, "*", "(%s!%s) !%s! OP", nick, host, u->handle);