Explorar o código

* Went in to fix sendaway() to only send when server_online == 1
Managed to fix up a lot of the server.mod dependancies


svn: 771

Bryan Drewery %!s(int64=22) %!d(string=hai) anos
pai
achega
ea3546be8c

+ 21 - 22
src/botcmd.c

@@ -509,8 +509,11 @@ static void bot_endlink(int idx, char *par)
  */
 static void bot_infoq(int idx, char *par)
 {
-  char s[200] = "", s2[32] = "", *realnick = NULL;
+#ifdef LEAF
+  char s[200] = "";
   struct chanset_t *chan = NULL;
+#endif /* LEAF */
+  char s2[32] = "", *realnick = NULL;
   time_t now2;
   int hr, min;
 
@@ -538,30 +541,26 @@ static void bot_infoq(int idx, char *par)
   now2 -= (hr * 3600);
   min = (time_t) ((int) now2 / 60);
   sprintf(&s2[strlen(s2)], "%02d:%02d", (int) hr, (int) min);
-  if (module_find("server", 0, 0)) {
-    s[0] = 0;
-    for (chan = chanset; chan; chan = chan->next) {
-      if (!channel_secret(chan)) {
-        if ((strlen(s) + strlen(chan->dname) + strlen(network)
-                   + strlen(conf.bot->nick) + strlen(ver) + 1) >= 200) {
-          strcat(s,"++  ");
-          break; /* Yegads..! */
-        }
-	strcat(s, chan->dname);
-	strcat(s, ", ");
+#ifdef LEAF
+  s[0] = 0;
+  for (chan = chanset; chan; chan = chan->next) {
+    if (!channel_secret(chan)) {
+      if ((strlen(s) + strlen(chan->dname) + strlen(network) + strlen(conf.bot->nick) + strlen(ver) + 1) >= 200) {
+        strcat(s,"++  ");
+        break; /* Yegads..! */
       }
+      strcat(s, chan->dname);
+      strcat(s, ", ");
     }
-    if (s[0]) {
-      s[strlen(s) - 2] = 0;
-      botnet_send_priv(idx, conf.bot->nick, par, NULL,
-		       "%s <%s> (%s) [UP %s]", ver, network, s, s2);
-    } else
-      botnet_send_priv(idx, conf.bot->nick, par, NULL,
-		    "%s <%s> (%s) [UP %s]", ver, network, BOT_NOCHANNELS,
-		       s2);
+  }
+  if (s[0]) {
+    s[strlen(s) - 2] = 0;
+    botnet_send_priv(idx, conf.bot->nick, par, NULL, "%s <%s> (%s) [UP %s]", ver, network, s, s2);
   } else
-    botnet_send_priv(idx, conf.bot->nick, par, NULL,
-		     "%s <NO_IRC> [UP %s]", ver, s2);
+    botnet_send_priv(idx, conf.bot->nick, par, NULL, "%s <%s> (%s) [UP %s]", ver, network, BOT_NOCHANNELS, s2);
+#else /* !HUB */
+  botnet_send_priv(idx, conf.bot->nick, par, NULL, "%s <NO_IRC> [UP %s]", ver, s2);
+#endif /* LEAF */
   botnet_send_infoq(idx, par);
 }
 

+ 13 - 56
src/cmds.c

@@ -220,7 +220,6 @@ static void tell_who(struct userrec *u, int idx, int chan)
 static void cmd_botinfo(struct userrec *u, int idx, char *par)
 {
   char s[512] = "", s2[32] = "";
-  struct chanset_t *chan = NULL;
   time_t now2;
   int hr, min;
 
@@ -244,29 +243,8 @@ static void cmd_botinfo(struct userrec *u, int idx, char *par)
   sprintf(&s2[strlen(s2)], "%02d:%02d", (int) hr, (int) min);
   simple_sprintf(s, "%d:%s@%s", dcc[idx].sock, dcc[idx].nick, conf.bot->nick);
   botnet_send_infoq(-1, s);
-  s[0] = 0;
-  if (module_find("server", 0, 0)) {
-    for (chan = chanset; chan; chan = chan->next) { 
-      if (!channel_secret(chan)) {
-	if ((strlen(s) + strlen(chan->dname) + strlen(network)
-                   + strlen(conf.bot->nick) + strlen(ver) + 1) >= 490) {
-          strcat(s,"++  ");
-          break; /* yeesh! */
-	}
-	strcat(s, chan->dname);
-	strcat(s, ", ");
-      }
-    }
 
-    if (s[0]) {
-      s[strlen(s) - 2] = 0;
-      dprintf(idx, "*** [%s] %s <%s> (%s) [UP %s]\n", conf.bot->nick,
-	      ver, network, s, s2);
-    } else
-      dprintf(idx, "*** [%s] %s <%s> (%s) [UP %s]\n", conf.bot->nick,
-	      ver, network, BOT_NOCHANNELS, s2);
-  } else
-    dprintf(idx, STR("*** [%s] %s <NO_IRC> [UP %s]\n"), conf.bot->nick, ver, s2);
+  dprintf(idx, STR("*** [%s] %s <NO_IRC> [UP %s]\n"), conf.bot->nick, ver, s2);
 }
 #endif /* HUB */
 
@@ -3415,19 +3393,13 @@ static void cmd_botserver(struct userrec * u, int idx, char * par) {
 
 void rcmd_cursrv(char * fbot, char * fhand, char * fidx) {
 #ifdef LEAF
-  char tmp[2048] = "", _cursrvname[500] = "";
-  int _server_online = 0;
-  module_entry *me = NULL;
+  char tmp[2048] = "";
 
-  if ((me = module_find("server", 0, 0))) {
-    Function *func = me->funcs;
-    _server_online = (*(int *)(func[25]));
-    sprintf(_cursrvname, "%s", ((char *)(func[41])));
-  }
-  if (_server_online)
-    sprintf(tmp, "Currently: %-40s Lag: %d", _cursrvname, server_lag);
+  if (server_online)
+    sprintf(tmp, "Currently: %-40s Lag: %d", cursrvname, server_lag);
   else
     sprintf(tmp, "Currently: none");
+
   botnet_send_cmdreply(conf.bot->nick, fbot, fhand, fidx, tmp);
 #endif /* LEAF */
 }
@@ -3487,19 +3459,12 @@ static void cmd_botnick(struct userrec * u, int idx, char * par) {
 void rcmd_curnick(char * fbot, char * fhand, char * fidx) {
 #ifdef LEAF
   char tmp[1024] = "";
-  int _server_online = 0;
-  module_entry *me = NULL;
-
-  if ((me = module_find("server", 0, 0))) {
-    Function *func = me->funcs;
-    _server_online = (*(int *)(func[25]));
-  }
 
-  if (_server_online)
+  if (server_online)
     sprintf(tmp, STR("Currently: %-20s "), botname);
   if (strncmp(botname, origbotname, strlen(botname)))
     sprintf(tmp, STR("%sWant: %s"), tmp, origbotname);
-  if (!_server_online)
+  if (!server_online)
     sprintf(tmp, STR("%s(not online)"), tmp);
   botnet_send_cmdreply(conf.bot->nick, fbot, fhand, fidx, tmp);
 #endif /* LEAF */
@@ -3802,29 +3767,21 @@ static void cmd_botjump(struct userrec * u, int idx, char * par) {
 void rcmd_jump(char * frombot, char * fromhand, char * fromidx, char * par) {
 #ifdef LEAF
   char *other = NULL;
-  module_entry *me = NULL;
-  Function *func = NULL;
-  int port, _default_port = 0;
-
-  if (!(me = module_find("server", 0, 0)) )
-    return;
-  func = me->funcs;
-
-  _default_port = (*(int *)(func[24]));
+  int port;
 
   if (par[0]) {
     other = newsplit(&par);
     port = atoi(newsplit(&par));
     if (!port)
-      port = _default_port;
-    strncpyz(((char *)(func[20])), other, 120); //newserver
-    (*(int *)(func[21])) = port; //newserverport
-    strncpyz(((char *)(func[22])), par, 120); //newserverpass
+      port = default_port;
+    strncpyz(newserver, other, 120); //newserver
+    newserverport = port; //newserverport
+    strncpyz(newserverpass, par, 120); //newserverpass
   }
   botnet_send_cmdreply(conf.bot->nick, frombot, fromhand, fromidx, STR("Jumping..."));
 
-  (*(int *)(func[23])) = 0; //cycle_time
   nuke_server("Jumping...");
+  cycle_time = 0;
 #endif /* LEAF */
 }
 

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

@@ -10,6 +10,9 @@
 #include "src/mod/module.h"
 #include "src/mod/irc.mod/irc.h"
 #include "src/mod/share.mod/share.h"
+#ifdef LEAF
+#include "src/mod/server.mod/server.h"
+#endif /* LEAF */
 #include "src/chanprog.h"
 #include "src/egg_timer.h"
 

+ 13 - 14
src/mod/channels.mod/cmdschan.c

@@ -92,11 +92,11 @@ static void cmd_pls_ban(struct userrec *u, int idx, char *par)
       egg_snprintf(s, sizeof s, "%s@*", who);	/* brain-dead? */
     else
       strncpyz(s, who, sizeof s);
-    if ((me = module_find("server", 0, 0)) && me->funcs)
-      egg_snprintf(s1, sizeof s1, "%s!%s", me->funcs[SERVER_BOTNAME],
-	            me->funcs[SERVER_BOTUSERHOST]);
-    else
+#ifdef LEAF
+      egg_snprintf(s1, sizeof s1, "%s!%s", botname, botuserhost);
+#else
       egg_snprintf(s1, sizeof s1, "%s!%s@%s", origbotname, botuser, conf.bot->host);
+#endif /* LEAF */
     if (wild_match(s, s1)) {
       dprintf(idx, "I'm not going to ban myself.\n");
       putlog(LOG_CMDS, "*", "#%s# attempted +ban %s", dcc[idx].nick, s);
@@ -125,6 +125,7 @@ static void cmd_pls_ban(struct userrec *u, int idx, char *par)
 	 */
 	if ((me = module_find("irc", 0, 0)))
 	  (me->funcs[IRC_CHECK_THIS_BAN])(chan, s, sticky);
+        
       } else {
 	u_addban(NULL, s, dcc[idx].nick, par, expire_time ? now + expire_time : 0, 0);
 	if (par[0] == '*') {
@@ -149,7 +150,6 @@ static void cmd_pls_exempt(struct userrec *u, int idx, char *par)
   char *chname = NULL, *who = NULL, s[UHOSTLEN] = "", s1[UHOSTLEN] = "", *p = NULL, *p_expire = NULL;
   unsigned long int expire_time = 0, expire_foo;
   struct chanset_t *chan = NULL;
-  module_entry *me = NULL;
 
   if (!use_exempts) {
     dprintf(idx, "This command can only be used with use-exempts enabled.\n");
@@ -229,11 +229,11 @@ static void cmd_pls_exempt(struct userrec *u, int idx, char *par)
       egg_snprintf(s, sizeof s, "%s@*", who);		/* brain-dead? */
     else
       strncpyz(s, who, sizeof s);
-    if ((me = module_find("server",0,0)) && me->funcs)
-      egg_snprintf(s1, sizeof s1, "%s!%s", me->funcs[SERVER_BOTNAME],
-		     me->funcs[SERVER_BOTUSERHOST]);
-    else
+#ifdef LEAF
+      egg_snprintf(s1, sizeof s1, "%s!%s", botname, botuserhost);
+#else
       egg_snprintf(s1, sizeof s1, "%s!%s@%s", origbotname, botuser, conf.bot->host);
+#endif /* LEAF */
 
     /* IRC can't understand exempts longer than 70 characters */
     if (strlen(s) > 70) {
@@ -278,7 +278,6 @@ static void cmd_pls_invite(struct userrec *u, int idx, char *par)
   char *chname = NULL, *who = NULL, s[UHOSTLEN] = "", s1[UHOSTLEN] = "", *p = NULL, *p_expire = NULL;
   unsigned long int expire_time = 0, expire_foo;
   struct chanset_t *chan = NULL;
-  module_entry *me = NULL;
 
   if (!use_invites) {
     dprintf(idx, "This command can only be used with use-invites enabled.\n");
@@ -359,11 +358,11 @@ static void cmd_pls_invite(struct userrec *u, int idx, char *par)
       egg_snprintf(s, sizeof s, "%s@*", who);		/* brain-dead? */
     else
       strncpyz(s, who, sizeof s);
-    if ((me = module_find("server",0,0)) && me->funcs)
-      egg_snprintf(s1, sizeof s1, "%s!%s", me->funcs[SERVER_BOTNAME],
-		     me->funcs[SERVER_BOTUSERHOST]);
-    else
+#ifdef LEAF
+      egg_snprintf(s1, sizeof s1, "%s!%s", botname, botuserhost);
+#else
       egg_snprintf(s1, sizeof s1, "%s!%s@%s", origbotname, botuser, conf.bot->host);
+#endif /* LEAF */
 
     /* IRC can't understand invites longer than 70 characters */
     if (strlen(s) > 70) {

+ 12 - 15
src/mod/channels.mod/userchan.c

@@ -380,7 +380,6 @@ static int u_addban(struct chanset_t *chan, char *ban, char *from, char *note,
 {
   char host[1024] = "", s[1024] = "";
   maskrec *p = NULL, *l = NULL, **u = chan ? &chan->bans : &global_bans;
-  module_entry *me = NULL;
 
   strcpy(host, ban);
   /* Choke check: fix broken bans (must have '!' and '@') */
@@ -396,11 +395,11 @@ static int u_addban(struct chanset_t *chan, char *ban, char *from, char *note,
     strcat(host, "!*");
     strcat(host, s);
   }
-  if ((me = module_find("server", 0, 0)) && me->funcs)
-    simple_sprintf(s, "%s!%s", me->funcs[SERVER_BOTNAME],
-		   me->funcs[SERVER_BOTUSERHOST]);
-  else
+#ifdef LEAF
+    simple_sprintf(s, "%s!%s", botname, botuserhost);
+#else
     simple_sprintf(s, "%s!%s@%s", origbotname, botuser, conf.bot->host);
+#endif /* LEAF */
   if (wild_match(host, s)) {
     putlog(LOG_MISC, "*", IRC_IBANNEDME);
     return 0;
@@ -466,7 +465,6 @@ static int u_addinvite(struct chanset_t *chan, char *invite, char *from,
 {
   char host[1024] = "", s[1024] = "";
   maskrec *p = NULL, *l, **u = chan ? &chan->invites : &global_invites;
-  module_entry *me = NULL;
 
   strcpy(host, invite);
   /* Choke check: fix broken invites (must have '!' and '@') */
@@ -481,11 +479,11 @@ static int u_addinvite(struct chanset_t *chan, char *invite, char *from,
     strcat(host, "!*");
     strcat(host, s);
   }
-  if ((me = module_find("server",0,0)) && me->funcs)
-    simple_sprintf(s, "%s!%s", me->funcs[SERVER_BOTNAME],
-		   me->funcs[SERVER_BOTUSERHOST]);
-  else
+#ifdef LEAF
+    simple_sprintf(s, "%s!%s", botname, botuserhost);
+#else
     simple_sprintf(s, "%s!%s@%s", origbotname, botuser, conf.bot->host);
+#endif /* LEAF */
 
   for (l = *u; l; l = l->next)
     if (!rfc_casecmp(l->mask, host)) {
@@ -545,7 +543,6 @@ static int u_addexempt(struct chanset_t *chan, char *exempt, char *from,
 {
   char host[1024] = "", s[1024] = "";
   maskrec *p = NULL, *l, **u = chan ? &chan->exempts : &global_exempts;
-  module_entry *me = NULL;
 
   strcpy(host, exempt);
   /* Choke check: fix broken exempts (must have '!' and '@') */
@@ -560,11 +557,11 @@ static int u_addexempt(struct chanset_t *chan, char *exempt, char *from,
     strcat(host, "!*");
     strcat(host, s);
   }
-  if ((me = module_find("server",0,0)) && me->funcs)
-    simple_sprintf(s, "%s!%s", me->funcs[SERVER_BOTNAME],
-		   me->funcs[SERVER_BOTUSERHOST]);
-  else
+#ifdef LEAF
+    simple_sprintf(s, "%s!%s", botname, botuserhost);
+#else
     simple_sprintf(s, "%s!%s@%s", origbotname, botuser, conf.bot->host);
+#endif /* LEAF */
 
   for (l = *u; l; l = l->next)
     if (!rfc_casecmp(l->mask, host)) {

+ 21 - 17
src/mod/ctcp.mod/ctcp.c

@@ -22,6 +22,7 @@
 #include "src/egg_timer.h"
 
 #ifdef LEAF
+#include "src/mod/server.mod/server.h"
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <sys/utsname.h>
@@ -392,24 +393,27 @@ static void ctcp_minutely()
   int i;
 
 #ifdef S_AUTOAWAY
-  if ((cloak_awaytime == 0) && (cloak_heretime == 0)) {
-    cloak_heretime = now;
-    dprintf(DP_HELP, STR("AWAY :\n"));
-    return;
-  }
-  if (cloak_awaytime == 0) {
-    if (!randint(AVGHERETIME)) {
-      cloak_heretime = 0;
-      cloak_awaytime = now - 600 - randint(60);
-      sendaway();
-    }
-  } else {
-    if (!randint(AVGAWAYTIME)) {
-      cloak_awaytime = 0;
+  if (server_online) {
+    if ((cloak_awaytime == 0) && (cloak_heretime == 0)) {
       cloak_heretime = now;
       dprintf(DP_HELP, STR("AWAY :\n"));
-    } else
-      sendaway();
+      return;
+    }
+
+    if (cloak_awaytime == 0) {
+      if (!randint(AVGHERETIME)) {
+        cloak_heretime = 0;
+        cloak_awaytime = now - 600 - randint(60);
+        sendaway();
+      }
+    } else {
+      if (!randint(AVGAWAYTIME)) {
+        cloak_awaytime = 0;
+        cloak_heretime = now;
+        dprintf(DP_HELP, STR("AWAY :\n"));
+      } else
+        sendaway();
+    }
   }
 #endif /* S_AUTOAWAY */
 
@@ -447,7 +451,7 @@ static int ctcp_FINGER(char *nick, char *uhost, struct userrec *u, char *object,
 #endif
   if ((p = strchr(pwd->pw_gecos, GECOS_DELIMITER)) != NULL)
     *p = 0;
-  dprintf(DP_HELP, STR("NOTICE %s :\001%s %s (%s@%s) Idle %ld second%s\001\n"), nick, keyword, pwd->pw_gecos, pwd->pw_name, (char *) (strchr(botuserhost, '@') + 1), idletime, (idletime == 1) ? "" : "s");
+  dprintf(DP_HELP, STR("NOTICE %s :\001%s %s (%s@%s) Idle %ld second%s\001\n"), nick, keyword, pwd->pw_gecos, conf.username, (char *) (strchr(botuserhost, '@') + 1), idletime, (idletime == 1) ? "" : "s");
   return BIND_RET_BREAK;
 }
 

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

@@ -1572,10 +1572,9 @@ char *irc_start(Function * global_funcs)
   global = global_funcs;
 
   module_register(MODULE_NAME, irc_table, 1, 3);
-  if (!(server_funcs = module_depend(MODULE_NAME, "server", 1, 0))) {
-    module_undepend(MODULE_NAME);
-    return "This module requires server module 1.0 or later.";
-  }
+
+  server_funcs = module_depend(MODULE_NAME, "server", 1, 0);
+
   if (!(channels_funcs = module_depend(MODULE_NAME, "channels", 1, 0))) {
     module_undepend(MODULE_NAME);
     return "This module requires channels module 1.0 or later.";

+ 14 - 18
src/mod/server.mod/server.c

@@ -22,9 +22,9 @@ static int ctcp_mode;
 int serv;		/* sock # of server currently */
 int servidx;		/* idx of server */
 static int strict_host;		/* strict masking of hosts ? */
-static char newserver[121] = "";	/* new server? */
-static int newserverport;	/* new server port? */
-static char newserverpass[121] = "";	/* new server password? */
+char newserver[121] = "";	/* new server? */
+int newserverport;		/* new server port? */
+char newserverpass[121] = "";	/* new server password? */
 static time_t trying_server;	/* trying to connect to a server right now? */
 static int curserv;		/* current position in server list: */
 static int flud_thr;		/* msg flood threshold */
@@ -45,7 +45,7 @@ static int quiet_reject;	/* Quietly reject dcc chat or sends from
 				   users without access? */
 static int waiting_for_awake;	/* set when i unidle myself, cleared when
 				   i get the response */
-static time_t server_online;	/* server connection time */
+time_t server_online;	/* server connection time */
 static time_t server_cycle_wait;	/* seconds to wait before
 					   re-beginning the server list */
 char botrealname[121] = "";	/* realname of bot */
@@ -54,8 +54,8 @@ static int never_give_up;	/* never give up when connecting to servers? */
 static int strict_servernames;	/* don't update server list */
 static struct server_list *serverlist = NULL;	/* old-style queue, still used by
 					   server list */
-static int cycle_time;		/* cycle time till next server connect */
-static int default_port;	/* default IRC port */
+int cycle_time;			/* cycle time till next server connect */
+int default_port;		/* default IRC port */
 static char oldnick[NICKLEN] = "";	/* previous nickname *before* rehash */
 static int trigger_on_ignore;	/* trigger bindings if user is ignored ? */
 static int answer_ctcp;		/* answer how many stacked ctcp's ? */
@@ -1483,7 +1483,7 @@ static Function server_table[] =
   (Function) server_report,
   /* 4 - 7 */
   (Function) NULL,		/* char * (points to botname later on)	*/
-  (Function) botuserhost,	/* char *				*/
+  (Function) 0,
   (Function) & quiet_reject,	/* int					*/
   (Function) 0,
   /* 8 - 11 */
@@ -1502,13 +1502,13 @@ static Function server_table[] =
   (Function) detect_avalanche,
   (Function) 0,
   /* 20 - 23 */
-  (Function) newserver,		/* char *				*/
-  (Function) & newserverport,	/* int					*/
-  (Function) newserverpass,	/* char *				*/
-  (Function) & cycle_time,	/* int					*/
+  (Function) 0,
+  (Function) 0,
+  (Function) 0,
+  (Function) 0,
   /* 24 - 27 */
-  (Function) & default_port,	/* int					*/
-  (Function) & server_online,	/* int					*/
+  (Function) 0,
+  (Function) 0,	
   (Function) 0,	
   (Function) 0,
   /* 28 - 31 */
@@ -1520,16 +1520,12 @@ static Function server_table[] =
   (Function) 0,
   (Function) 0,	
   (Function) 0,
-  (Function) ctcp_reply,
+  (Function) 0,
   /* 36 - 38 */
   (Function) 0,	
   (Function) & nick_len,	/* int					*/
   (Function) 0,
   (Function) & checked_hostmask,
-  (Function) & curserv,
-  (Function) cursrvname,
-  (Function) botrealname,
-
 };
 
 char *server_start(Function *global_funcs)

+ 12 - 12
src/mod/server.mod/server.h

@@ -23,7 +23,7 @@
 
 #ifndef MAKING_SERVER
 /* 4 - 7 */
-#define botuserhost ((char *)(server_funcs[5]))
+/* UNUSED 5 */
 #define quiet_reject (*(int *)(server_funcs[6]))
 /* UNUSED 7 */
 #define servi (*(int *)(server_funcs[7]))
@@ -42,13 +42,13 @@
 #define detect_avalanche ((int(*)(char *))server_funcs[18])
 /* 19 UNUSED */
 /* 20 - 22 */
-#define newserver ((char *)(server_funcs[20]))
-#define newserverport (*(int *)(server_funcs[21]))
-#define newserverpass ((char *)(server_funcs[22]))
+/* UNUSED 20 */
+/* UNUSED 21 */
+/* UNUSED 22 */
 /* 23 - 26 */
-#define cycle_time (*(int *)(server_funcs[23]))
-#define default_port (*(int *)(server_funcs[24]))
-#define server_online (*(int *)(server_funcs[25]))
+/* UNUSED 23 */
+/* UNUSED 24 */
+/* UNUSED 25 */
 /* 26 -- UNUSED */
 /* 27 - 30 */
 /* UNUSED -- 28 */
@@ -58,14 +58,11 @@
 /* UNUSED -- 33 */
 /* UNUSED -- 34 */
 /* 35 - 38 */
-#define ctcp_reply ((char *)(server_funcs[35]))
+/* UNUSED 35 */
 /* 36 UNUSED */
 #define nick_len (*(int *)(server_funcs[37]))
 /* 38 UNUSED */
 #define checked_hostmask (*(int *)(server_funcs[39]))
-#define curserv (*(int *)(server_funcs[40))
-#define cursrvname ((char *)(server_funcs[41]))
-#define botrealname ((char *)(server_funcs[42]))
 
 #else		/* MAKING_SERVER */
 
@@ -107,6 +104,9 @@ enum {
 #endif		/* _EGG_MOD_SERVER_SERVER_H */
 
 void nuke_server(char *);
-extern int serv, servidx;
+extern int 		serv, servidx, cycle_time, default_port, newserverport;
+extern time_t		server_online;
+extern char		cursrvname[], botrealname[], botuserhost[], ctcp_reply[],
+			newserver[], newserverpass[];
 
 #endif /*leaf*/