Explorar o código

* Fixed the fatal ctcp channel bug

svn: 778
Bryan Drewery %!s(int64=22) %!d(string=hai) anos
pai
achega
47430de7b7
Modificáronse 5 ficheiros con 14 adicións e 8 borrados
  1. 4 0
      doc/UPDATES
  2. 1 1
      src/main.c
  3. 0 3
      src/mod/irc.mod/irc.c
  4. 3 1
      src/mod/server.mod/server.c
  5. 6 3
      src/mod/server.mod/server.h

+ 4 - 0
doc/UPDATES

@@ -1,5 +1,9 @@
 This is a summary of ChangeLog basically.
 
+1.1.3
+1.Fixed a very fatal bug with channel ctcps.
+2.Fixed a bug in cmd_botcmd.
+
 1.1.2
 1.Fixed a major bug with server connections.
 2.Fixed a bug in share.mod where it was reconnecting if the userfile was corrupt.

+ 1 - 1
src/main.c

@@ -58,7 +58,7 @@
 extern int		optind;
 
 const time_t 	buildts = CVSBUILD;		/* build timestamp (UTC) */
-const char	egg_version[1024] = "1.1.2";
+const char	egg_version[1024] = "1.1.3";
 
 int 	localhub = 1; 		/* we set this to 0 if we get a -B */
 int 	role;

+ 0 - 3
src/mod/irc.mod/irc.c

@@ -49,7 +49,6 @@ struct cfg_entry CFG_OPBOTS,
 
 
 /* Import some bind tables from the server module. */
-static bind_table_t *BT_ctcp = NULL, *BT_ctcr =  NULL;
 #ifdef S_AUTHCMDS
 static bind_table_t *BT_msgc = NULL;
 #endif /* S_AUTHCMDS */
@@ -1599,8 +1598,6 @@ char *irc_start(Function * global_funcs)
   timer_create_secs(60, "check_netfight", (Function) check_netfight);
 #endif /* S_AUTOLOCK */
 
-  BT_ctcp = bind_table_lookup("ctcp");
-  BT_ctcr = bind_table_lookup("ctcr");
 #ifdef S_AUTHCMDS
   BT_msgc = bind_table_lookup("msgc");
 #endif /* S_AUTHCMDS */

+ 3 - 1
src/mod/server.mod/server.c

@@ -103,7 +103,8 @@ static void msgq_clear(struct msgq_head *qh);
 static int stack_limit;
 
 /* New bind tables. */
-static bind_table_t *BT_raw = NULL, *BT_msg = NULL, *BT_ctcr = NULL, *BT_ctcp = NULL;
+static bind_table_t *BT_raw = NULL, *BT_msg = NULL;
+bind_table_t *BT_ctcr = NULL, *BT_ctcp = NULL;
 #ifdef S_AUTHCMDS
 static bind_table_t *BT_msgc = NULL;
 #endif /* S_AUTHCMDS */
@@ -1542,6 +1543,7 @@ void server_init()
 #endif /* S_AUTHCMDS */
   BT_msg = bind_table_add("msg", 4, "ssUs", 0, BIND_USE_ATTR);
   BT_raw = bind_table_add("raw", 2, "ss", MATCH_MASK, BIND_STACKABLE);
+
   BT_ctcr = bind_table_add("ctcr", 6, "ssUsss", MATCH_MASK, BIND_USE_ATTR | BIND_STACKABLE);
   BT_ctcp = bind_table_add("ctcp", 6, "ssUsss", MATCH_MASK, BIND_USE_ATTR | BIND_STACKABLE);
 

+ 6 - 3
src/mod/server.mod/server.h

@@ -12,9 +12,6 @@
 #define DO_LOST 1
 #define NO_LOST 0
 
-#define check_bind_ctcp(a,b,c,d,e,f) check_bind_ctcpr(a,b,c,d,e,f,BT_ctcp)
-#define check_bind_ctcr(a,b,c,d,e,f) check_bind_ctcpr(a,b,c,d,e,f,BT_ctcr)
-
 #define fixcolon(x)             do {                                    \
         if ((x)[0] == ':')                                              \
                 (x)++;                                                  \
@@ -47,6 +44,7 @@ enum {
 void nuke_server(char *);
 int match_my_nick(char *);
 
+extern bind_table_t	*BT_ctcp, *BT_ctcr;
 extern int 		serv, servidx, cycle_time, default_port, newserverport,
 			nick_len, checked_hostmask, ctcp_mode, quiet_reject,
 			flud_thr, flud_time, flud_ctcp_thr, flud_ctcp_time,
@@ -56,7 +54,12 @@ extern char		cursrvname[], botrealname[], botuserhost[], ctcp_reply[],
 			newserver[], newserverpass[];
 
 int check_bind_ctcpr(char *, char *, struct userrec *, char *, char *, char *, bind_table_t *);
+
+#define check_bind_ctcp(a, b, c, d, e, f) check_bind_ctcpr(a, b, c, d, e, f, BT_ctcp)
+#define check_bind_ctcr(a, b, c, d, e, f) check_bind_ctcpr(a, b, c, d, e, f, BT_ctcr)
+
 int detect_avalanche(char *);
 void server_report(int, int);
+void server_init();
 
 #endif /*leaf*/