ソースを参照

* Add set 'deaf' to run bot in DEAF mode on supporting IRCDs. This prevents channel conversations coming to the bot. On by default.

Bryan Drewery 16 年 前
コミット
5b36c95656
4 ファイル変更9 行追加1 行削除
  1. 2 0
      doc/UPDATES
  2. 4 0
      doc/help.txt
  3. 2 0
      src/set.c
  4. 1 1
      src/set.h

+ 2 - 0
doc/UPDATES

@@ -1,3 +1,5 @@
+* Add set 'deaf' to run bot in DEAF mode on supporting IRCDs. This prevents channel conversations coming to the bot. On by default.
+
 1.2.17 - http://wraith.botpack.net/milestone/1.2.17
 * Binary / shell / startup changes
   * Binary error messages are no longer obscure numbers or fake segfaults. (Compile with OBSCURE_ERRORS to re-enable)

+ 4 - 0
doc/help.txt

@@ -1600,6 +1600,10 @@ See also: reload, backup
  
 [S]  $brealname$b        The bot's "real name" when connecting. (supports '$n' expansion)
 [S]  $busermode$b        The bot's usermode on IRC. (Set on connect/rehash)
+[B]  $bdeaf$b            Runs bot in DEAF mode if the IRCD supports it. This will stop
+                           the IRCD from sending any channel conversations to the bot.
+                           This will decrease bandwidth/CPU used, as well as prevent
+                           sniffing of channels.
  
 [S]  $baltchars$b        Define string of characters to cycle when generating alternative
                           nicks when nick is taken. Ie: _-`[].

+ 2 - 0
src/set.c

@@ -40,6 +40,7 @@ int dcc_autoaway;
 bool irc_autoaway;
 bool link_cleartext;
 bool dccauth = 0;
+bool use_deaf = 0;
 int cloak_script = 0;
 rate_t close_threshold;
 int fight_threshold;
@@ -78,6 +79,7 @@ static variable_t vars[] = {
  VAR("close-threshold",	&close_threshold,	VAR_RATE|VAR_NOLOC,				0, 0, "0:0"),
  VAR("dcc-autoaway",	&dcc_autoaway,		VAR_INT|VAR_NOLOC,				0, (5*60*60), "1800"),
  VAR("dccauth",		&dccauth,		VAR_INT|VAR_BOOL,				0, 1, "0"),
+ VAR("deaf",		&use_deaf,		VAR_INT|VAR_BOOL|VAR_NOLHUB,			0, 1, "1"),
  VAR("fight-threshold",	&fight_threshold,	VAR_INT|VAR_NOLOC,				0, 0, "0"),
  VAR("flood-ctcp",	&flood_ctcp,		VAR_RATE|VAR_NOLHUB,				0, 0, "3:60"),
  VAR("flood-g",		&flood_g,		VAR_RATE|VAR_NOLHUB,				0, 0, "6:2"),

+ 1 - 1
src/set.h

@@ -70,7 +70,7 @@ typedef struct rate_b {
 extern char		auth_key[], auth_prefix[2], motd[], alias[], rbl_servers[1024],
 			msgident[], msginvite[], msgop[], msgpass[],
                         homechan[], altchars[];
-extern bool		dccauth, auth_obscure, manop_warn, auth_chan, oidentd, ident_botnick, irc_autoaway, link_cleartext;
+extern bool		dccauth, auth_obscure, manop_warn, auth_chan, oidentd, ident_botnick, irc_autoaway, link_cleartext, use_deaf;
 extern int		cloak_script, fight_threshold, fork_interval, in_bots, set_noshare, dcc_autoaway,
 			kill_threshold, lag_threshold, op_bots, hijack, login, promisc, trace,
                         ison_time;