Ver código fonte

* Port [3610] to 1.2.14
* Add set 'irc-autoaway' to be able to disable autoaway feature. (addresses #380)



svn: 3611

Bryan Drewery 18 anos atrás
pai
commit
a83e6e05e8
5 arquivos alterados com 6 adições e 2 exclusões
  1. 1 0
      doc/UPDATES
  2. 1 0
      misc/help.txt
  3. 1 1
      src/mod/ctcp.mod/ctcp.c
  4. 2 0
      src/set.c
  5. 1 1
      src/set.h

+ 1 - 0
doc/UPDATES

@@ -67,6 +67,7 @@ Lines prefixed with '-' were disabled before release and are not finished, or ar
 * Added OSVER entry for bots in .whois
 * Userfile transfers now use a random filename instead of .share.botnick.users.timestamp
 * Fix ambiguous warning when a bot tries linking after being added with +user (fixes #383)
+* Add set 'irc-autoaway' to be able to disable autoaway feature. (addresses #380)
 
 1.2.13 - http://wraith.shatow.net/milestone/1.2.13
 * Fix cmd_chanset accepting invalid flags

+ 1 - 0
misc/help.txt

@@ -1557,6 +1557,7 @@ See also: reload, backup
 [S]  $busermode$b        The bot's usermode on IRC. (Set on connect/rehash)
 [S]  $bnick$b            The bot's preferred nickname on IRC.
 [N]  $bnotify-time$b     The number of seconds between server notify checks for nick.
+[B]  $birc-autoaway$b    Should the bot go away auto?
 
 [B]  $bident-botnick$b   Send botnick instead of shell username on connect (non-ident)
 [B]  $boidentd$b         Make bot try and use oidentd spoofing as BOTNICK.

+ 1 - 1
src/mod/ctcp.mod/ctcp.c

@@ -337,7 +337,7 @@ void sendaway()
 
 static void ctcp_minutely()
 {
-  if (server_online) {
+  if (irc_autoaway && server_online) {
     if ((cloak_awaytime == 0) && (cloak_heretime == 0)) {
       cloak_heretime = now;
       dprintf(DP_HELP, "AWAY :\n");

+ 2 - 0
src/set.c

@@ -30,6 +30,7 @@ bool auth_obscure;
 bool oidentd;
 bool ident_botnick;
 int dcc_autoaway;
+bool irc_autoaway;
 #ifdef NOT_USED
 int badprocess = DET_IGNORE;
 char process_list[1024] = "";
@@ -84,6 +85,7 @@ static variable_t vars[] = {
  VAR("homechan",	homechan,		VAR_STRING|VAR_NOLOC|VAR_HIDE,			0, 0, NULL),
  VAR("ident-botnick",   &ident_botnick,		VAR_INT|VAR_BOOL|VAR_NOLHUB,			0, 1, "0"),
  VAR("in-bots",		&in_bots,		VAR_INT|VAR_NOLOC,				1, MAX_BOTS, "2"),
+ VAR("irc-autoaway",	&irc_autoaway,		VAR_INT|VAR_NOLHUB|VAR_BOOL,			0, 1, "1"),
  VAR("notify-time",	&ison_time,		VAR_INT|VAR_NOLHUB,				1, 30, "10"),
  VAR("kill-threshold",	&kill_threshold,	VAR_INT|VAR_NOLOC,				0, 0, "0"),
  VAR("lag-threshold",	&lag_threshold,		VAR_INT|VAR_NOLHUB,				0, 0, "15"),

+ 1 - 1
src/set.h

@@ -65,7 +65,7 @@ typedef struct rate_b {
 extern char		auth_key[], auth_prefix[2], motd[], *def_chanset, alias[],
 			msgident[], msginvite[], msgop[], msgpass[],
                         homechan[];
-extern bool		dccauth, auth_obscure, offensive_bans, manop_warn, auth_chan, oidentd, ident_botnick;
+extern bool		dccauth, auth_obscure, offensive_bans, manop_warn, auth_chan, oidentd, ident_botnick, irc_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,
                         ison_time;