Sfoglia il codice sorgente

* Added var 'manop-warn' to allow disabling the new manop NOTICE warnings when msg opping.

svn: 2263
Bryan Drewery 21 anni fa
parent
commit
195cce3625
5 ha cambiato i file con 7 aggiunte e 2 eliminazioni
  1. 1 0
      doc/UPDATES
  2. 2 0
      misc/help.txt
  3. 1 1
      src/mod/irc.mod/msgcmds.c
  4. 2 0
      src/set.c
  5. 1 1
      src/set.h

+ 1 - 0
doc/UPDATES

@@ -24,6 +24,7 @@ Lines prefixed with '-' were disabled before release and are not finished, or ar
 * Fixed 16 bytes after packdata being cleared in memory, causing random memory corruption.
 * Fixed localhub attempting to spawn itself during binary rehash and cmd_conf
 * Fixed another fatal bug with cmd_conf, this should fix it for good.
+* Added var 'manop-warn' to allow disabling the new manop NOTICE warnings when msg opping.
 
 1.2.4
 * Fixed cmd_botset not displaying botnick.

+ 2 - 0
misc/help.txt

@@ -1507,6 +1507,8 @@ See also: reload, backup
 [N]  $bdcc-autoaway$b    Time in seconds until a user is set auto-away on dcc.
                           (0/- to disable)
 [B]  $bmean-kicks$b      Enables 'mean' and 'offensive' kick msgs.
+[B]  $bmanop-warn$b      Warn users via /NOTICE when they msg-op in a channel with manop
+                           punishments.
  
   *  Msg cmd vars may be left blank to disable usage of cmd.
 [S]  $bmsgop$b           Defines the cmd for opping via msging the bot.

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

@@ -75,7 +75,7 @@ static int msg_op(char *nick, char *host, struct userrec *u, char *par)
             if (do_op(nick, chan, 0, 1)) {
               stats_add(u, 0, 1);
               putlog(LOG_CMDS, "*", "(%s!%s) !%s! OP %s", nick, host, u->handle, par);
-              if (chan->manop)
+              if (manop_warn && chan->manop)
                 dprintf(DP_HELP, "NOTICE %s :%s is currently set to punish for manual op.\n", nick, chan->dname);
             }
           }

+ 2 - 0
src/set.c

@@ -47,6 +47,7 @@ char process_list[1024] = "";
 int promisc = DET_WARN;
 int trace = DET_WARN;
 bool offensive_bans = 1;
+bool manop_warn = 1;
 
 static variable_t vars[] = {
  {"alias",		alias,			sizeof(alias),			VAR_STRING|VAR_LIST|VAR_NOLOC|VAR_PERM, NULL, NULL},
@@ -69,6 +70,7 @@ static variable_t vars[] = {
  {"kill-threshold",	&kill_threshold,	0,				VAR_INT|VAR_NOLOC, NULL, NULL},
  {"lag-threshold",	&lag_threshold,		0,				VAR_INT|VAR_NOLHUB, NULL, NULL},
  {"login",		&login,			0,				VAR_INT|VAR_DETECTED, NULL, NULL},
+ {"manop-warn",		&manop_warn,		0,				VAR_INT|VAR_BOOL|VAR_NOLHUB, NULL, NULL},
  {"mean-kicks",		&offensive_bans,	0,				VAR_INT|VAR_BOOL|VAR_NOLHUB, NULL, NULL},
  {"motd",		motd,			sizeof(motd),			VAR_STRING|VAR_HIDE|VAR_NOLOC, NULL, NULL},
  {"msg-ident",		msgident,		sizeof(msgident),		VAR_STRING|VAR_NOLHUB, NULL, NULL},

+ 1 - 1
src/set.h

@@ -52,7 +52,7 @@ typedef struct rate_b {
 
 extern char		auth_key[], auth_prefix[2], motd[], *def_chanset, alias[],
 			msgident[], msginvite[], msgop[], msgpass[], process_list[];
-extern bool		dccauth, auth_obscure, offensive_bans;
+extern bool		dccauth, auth_obscure, offensive_bans, manop_warn;
 extern int		cloak_script, fight_threshold, fork_interval, in_bots, set_noshare, dcc_autoaway,
 			kill_threshold, lag_threshold, op_bots, badprocess, hijack, login, promisc, trace;
 extern rate_t		op_requests, close_threshold;