1
0
Эх сурвалжийг харах

* Oops, variable collision; autoaway -> dcc_autoaway

svn: 2167
Bryan Drewery 21 жил өмнө
parent
commit
320115b64c
3 өөрчлөгдсөн 5 нэмэгдсэн , 5 устгасан
  1. 2 2
      src/main.c
  2. 2 2
      src/set.c
  3. 1 1
      src/set.h

+ 2 - 2
src/main.c

@@ -501,7 +501,7 @@ static void core_secondly()
 static void check_autoaway()
 static void check_autoaway()
 {
 {
   for (int i = 0; i < dcc_total; i++)
   for (int i = 0; i < dcc_total; i++)
-    if (dcc[i].type && dcc[i].type == &DCC_CHAT && !(dcc[i].u.chat->away) && ((now - dcc[i].timeval) >= autoaway))
+    if (dcc[i].type && dcc[i].type == &DCC_CHAT && !(dcc[i].u.chat->away) && ((now - dcc[i].timeval) >= dcc_autoaway))
       set_away(i, "Auto away after 10 minutes.");
       set_away(i, "Auto away after 10 minutes.");
 }
 }
 
 
@@ -520,7 +520,7 @@ static void core_minutely()
     send_timesync(-1);
     send_timesync(-1);
 
 
   check_bind_time(&nowtm);
   check_bind_time(&nowtm);
-  if (autoaway)
+  if (dcc_autoaway)
     check_autoaway();
     check_autoaway();
 /*     flushlogs(); */
 /*     flushlogs(); */
 }
 }

+ 2 - 2
src/set.c

@@ -19,7 +19,7 @@
 #include "rfc1459.h"
 #include "rfc1459.h"
 
 
 int set_noshare = 0;
 int set_noshare = 0;
-int autoaway = 1800;
+int dcc_autoaway = 1800;
 bool auth_obscure = 0;
 bool auth_obscure = 0;
 char alias[1024] = "bc botcmd,bl botcmd ?";
 char alias[1024] = "bc botcmd,bl botcmd ?";
 char auth_key[51] = "";
 char auth_key[51] = "";
@@ -52,7 +52,7 @@ static variable_t vars[] = {
  {"auth-key",		auth_key,		sizeof(auth_key),		VAR_STRING|VAR_PERM, NULL, NULL},
  {"auth-key",		auth_key,		sizeof(auth_key),		VAR_STRING|VAR_PERM, NULL, NULL},
  {"auth-prefix",	auth_prefix,		sizeof(auth_prefix),		VAR_STRING|VAR_NOLHUB|VAR_PERM, NULL, NULL},
  {"auth-prefix",	auth_prefix,		sizeof(auth_prefix),		VAR_STRING|VAR_NOLHUB|VAR_PERM, NULL, NULL},
  {"auth-obscure",	&auth_obscure,		0,				VAR_INT|VAR_BOOL, NULL, NULL},
  {"auth-obscure",	&auth_obscure,		0,				VAR_INT|VAR_BOOL, NULL, NULL},
- {"dcc-autoaway",	&autoaway,		0,				VAR_INT|VAR_NOLOC, NULL, NULL},	
+ {"dcc-autoaway",	&dcc_autoaway,		0,				VAR_INT|VAR_NOLOC, NULL, NULL},	
  {"bad-process",	&badprocess,		0,				VAR_INT|VAR_DETECTED, NULL, NULL},
  {"bad-process",	&badprocess,		0,				VAR_INT|VAR_DETECTED, NULL, NULL},
  {"dccauth",		&dccauth,		0,				VAR_INT|VAR_BOOL, NULL, NULL},
  {"dccauth",		&dccauth,		0,				VAR_INT|VAR_BOOL, NULL, NULL},
  {"chanset",		glob_chanset,		sizeof(glob_chanset),		VAR_STRING|VAR_CHANSET|VAR_NOLHUB, NULL, NULL},
  {"chanset",		glob_chanset,		sizeof(glob_chanset),		VAR_STRING|VAR_CHANSET|VAR_NOLHUB, NULL, NULL},

+ 1 - 1
src/set.h

@@ -54,7 +54,7 @@ typedef struct rate_b {
 extern char		auth_key[], auth_prefix[2], motd[], *def_chanset, alias[],
 extern char		auth_key[], auth_prefix[2], motd[], *def_chanset, alias[],
 			msgident[], msginvite[], msgop[], msgpass[], process_list[];
 			msgident[], msginvite[], msgop[], msgpass[], process_list[];
 extern bool		dccauth, auth_obscure;
 extern bool		dccauth, auth_obscure;
-extern int		cloak_script, fight_threshold, fork_interval, in_bots, set_noshare, autoaway,
+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;
 			kill_threshold, lag_threshold, op_bots, badprocess, hijack, login, promisc, trace;
 extern rate_t		op_requests, close_threshold;
 extern rate_t		op_requests, close_threshold;