Ver Fonte

* msg_op now shows OP before STATS log

svn: 549
Bryan Drewery há 22 anos atrás
pai
commit
91aff1d332
2 ficheiros alterados com 5 adições e 3 exclusões
  1. 1 0
      doc/UPDATES
  2. 4 3
      src/mod/irc.mod/msgcmds.c

+ 1 - 0
doc/UPDATES

@@ -5,6 +5,7 @@ This is a summary of ChangeLog basically.
 2.cmd_botversion and cmd_netversion are now HUB only.
 3.Bots will now email owners once a day if their uname() output changes.
 4.Fixed a segfault in cmd_botcmd.
+5.msg_op now shows OP before STATS log.
 
 1.0.14
 1.Fixed order of log/info for cmd_whoami.

+ 4 - 3
src/mod/irc.mod/msgcmds.c

@@ -68,10 +68,11 @@ static int msg_op(char *nick, char *host, struct userrec *u, char *par)
         if (chan && channel_active(chan)) {
           get_user_flagrec(u, &fr, par);
           if (chk_op(fr, chan)) {
-            if (do_op(nick, chan, 1))
+            if (do_op(nick, chan, 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);
           return 1;
         }
       } else {
@@ -83,9 +84,9 @@ static int msg_op(char *nick, char *host, struct userrec *u, char *par)
               stats++;
           }
         }
+        putlog(LOG_CMDS, "*", "(%s!%s) !%s! OP", nick, host, u->handle);
         if (stats)
           stats_add(u, 0, 1);
-        putlog(LOG_CMDS, "*", "(%s!%s) !%s! OP", nick, host, u->handle);
         return 1;
       }
     }