Przeglądaj źródła

* 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 lat temu
rodzic
commit
5b36c95656
4 zmienionych plików z 9 dodań i 1 usunięć
  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
 1.2.17 - http://wraith.botpack.net/milestone/1.2.17
 * Binary / shell / startup changes
 * Binary / shell / startup changes
   * Binary error messages are no longer obscure numbers or fake segfaults. (Compile with OBSCURE_ERRORS to re-enable)
   * 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]  $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)
 [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
 [S]  $baltchars$b        Define string of characters to cycle when generating alternative
                           nicks when nick is taken. Ie: _-`[].
                           nicks when nick is taken. Ie: _-`[].

+ 2 - 0
src/set.c

@@ -40,6 +40,7 @@ int dcc_autoaway;
 bool irc_autoaway;
 bool irc_autoaway;
 bool link_cleartext;
 bool link_cleartext;
 bool dccauth = 0;
 bool dccauth = 0;
+bool use_deaf = 0;
 int cloak_script = 0;
 int cloak_script = 0;
 rate_t close_threshold;
 rate_t close_threshold;
 int fight_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("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("dcc-autoaway",	&dcc_autoaway,		VAR_INT|VAR_NOLOC,				0, (5*60*60), "1800"),
  VAR("dccauth",		&dccauth,		VAR_INT|VAR_BOOL,				0, 1, "0"),
  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("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-ctcp",	&flood_ctcp,		VAR_RATE|VAR_NOLHUB,				0, 0, "3:60"),
  VAR("flood-g",		&flood_g,		VAR_RATE|VAR_NOLHUB,				0, 0, "6:2"),
  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],
 extern char		auth_key[], auth_prefix[2], motd[], alias[], rbl_servers[1024],
 			msgident[], msginvite[], msgop[], msgpass[],
 			msgident[], msginvite[], msgop[], msgpass[],
                         homechan[], altchars[];
                         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,
 extern int		cloak_script, fight_threshold, fork_interval, in_bots, set_noshare, dcc_autoaway,
 			kill_threshold, lag_threshold, op_bots, hijack, login, promisc, trace,
 			kill_threshold, lag_threshold, op_bots, hijack, login, promisc, trace,
                         ison_time;
                         ison_time;