فهرست منبع

* Pulled out channels.mod from the modules

svn: 785
Bryan Drewery 22 سال پیش
والد
کامیت
dbdd31c4c7

+ 1 - 1
src/main.c

@@ -715,7 +715,7 @@ int main(int argc, char **argv)
   }
 
   dns_init();
-  module_load("channels");
+  channels_init();
 #ifdef LEAF
   server_init();
   irc_init();

+ 43 - 43
src/mod/channels.mod/channels.c

@@ -4,30 +4,46 @@
  *
  */
 
-#define MODULE_NAME "channels"
+#undef MAKING_MODS
 #define MAKING_CHANNELS
-#include <sys/stat.h>
-#include "src/mod/module.h"
-#include "src/mod/irc.mod/irc.h"
+#include "src/common.h"
+#include "src/modules.h"
 #include "src/mod/share.mod/share.h"
 #ifdef LEAF
+#include "src/mod/irc.mod/irc.h"
 #include "src/mod/server.mod/server.h"
 #endif /* LEAF */
 #include "src/chanprog.h"
 #include "src/egg_timer.h"
+#include "src/misc.h"
+#include "src/main.h"
+#include "src/color.h"
+#include "src/userrec.h"
+#include "src/users.h"
+#include "src/cfg.h"
+#include "src/rfc1459.h"
+#include "src/match.h"
+#include "src/settings.h"
+#include "src/tandem.h"
+#include "src/botnet.h"
+#include "src/botmsg.h"
+#include "src/net.h"
+#include "src/tclhash.h"
+#include "src/cmds.h"
 
-static Function *global = NULL;
 
-int 			use_info;
+#include <sys/stat.h>
+
+static int 			use_info;
 static char 			glob_chanmode[64];		/* Default chanmode (drummer,990731) */
 static char 			*lastdeletedmask = NULL;
 static struct udef_struct 	*udef = NULL;
 static int 			global_stopnethack_mode;
 static int 			global_revenge_mode;
 static int 			global_idle_kick;		/* Default idle-kick setting. */
-int 			global_ban_time;
-int 			global_exempt_time;
-int 			global_invite_time;
+static int 			global_ban_time;
+static int 			global_exempt_time;
+static int 			global_invite_time;
 
 /* Global channel settings (drummer/dw) */
 static char 			glob_chanset[512] = "";
@@ -661,7 +677,7 @@ static cmd_t my_chon[] =
   {NULL,	NULL,	NULL,				NULL}
 };
 
-static void channels_report(int idx, int details)
+void channels_report(int idx, int details)
 {
   struct chanset_t *chan = NULL;
   int i;
@@ -784,18 +800,18 @@ static void channels_report(int idx, int details)
 }
 
 cmd_t channels_bot[] = {
-  {"cjoin",    "", (Function) got_cjoin, NULL},
-  {"cpart",    "", (Function) got_cpart, NULL},
-  {"cset",     "", (Function) got_cset,  NULL},
+  {"cjoin",	"", 	(Function) got_cjoin, 	NULL},
+  {"cpart",	"", 	(Function) got_cpart, 	NULL},
+  {"cset",	"", 	(Function) got_cset,  	NULL},
 #ifdef LEAF
-  {"cycle",    "", (Function) got_cycle, NULL},
-  {"down",     "", (Function) got_down,  NULL},
+  {"cycle",	"", 	(Function) got_cycle, 	NULL},
+  {"down",	"", 	(Function) got_down,  	NULL},
 #endif /* LEAF */
-  {"rl",       "", (Function) got_role,  NULL},
-  {"kl",       "", (Function) got_kl,    NULL},
-  {"sj",       "", (Function) got_sj,    NULL},
-  {"sp",       "", (Function) got_sp,    NULL},
-  {"jn",       "", (Function) got_jn,    NULL},
+  {"rl",	"", 	(Function) got_role,  	NULL},
+  {"kl",	"", 	(Function) got_kl,    	NULL},
+  {"sj",	"", 	(Function) got_sj,    	NULL},
+  {"sp",	"", 	(Function) got_sp,    	NULL},
+  {"jn",	"", 	(Function) got_jn,    	NULL},
 /*
 #ifdef HUB
   {"o1", "", (Function) got_o1, NULL},
@@ -803,18 +819,7 @@ cmd_t channels_bot[] = {
 #endif
   {"ltp", "", (Function) got_locktopic, NULL},
 */
-  {NULL, NULL, NULL, NULL}
-};
-
-EXPORT_SCOPE char *channels_start();
-
-static Function channels_table[] =
-{
-  /* 0 - 3 */
-  (Function) channels_start,
-  (Function) NULL,
-  (Function) 0,
-  (Function) channels_report,
+  {NULL, 	NULL, 	NULL, 			NULL}
 };
 
 void channels_describe(struct cfg_entry *cfgent, int idx)
@@ -864,21 +869,21 @@ void channels_changed(struct cfg_entry *cfgent, char *oldval, int *valid)
 
 #ifdef S_AUTOLOCK
 struct cfg_entry CFG_LOCKTHRESHOLD = {
-  "lock-threshold", CFGF_GLOBAL, NULL, NULL,
-  channels_changed, NULL, channels_describe
+	"lock-threshold", CFGF_GLOBAL, NULL, NULL,
+	channels_changed, NULL, channels_describe
 };
 
 struct cfg_entry CFG_KILLTHRESHOLD = {
-  "kill-threshold", CFGF_GLOBAL, NULL, NULL,
-  channels_changed, NULL, channels_describe
+	"kill-threshold", CFGF_GLOBAL, NULL, NULL,
+	channels_changed, NULL, channels_describe
 };
 #endif /* S_AUTOLOCK */
 
 
 #ifdef LEAF
-int checklimit = 1;
 static void check_limitraise() {
   int i = 0;
+  static int checklimit = 1;
   struct chanset_t *chan = NULL;
 
   for (chan = chanset; chan; chan = chan->next, i++) {
@@ -893,11 +898,8 @@ static void check_limitraise() {
 #endif /* LEAF */
 
 
-char *channels_start(Function * global_funcs)
+void channels_init()
 {
-  global = global_funcs;
-
-
   gfld_chan_thr = 0;
   gfld_chan_time = 0;
   gfld_deop_thr = 8;
@@ -939,7 +941,6 @@ char *channels_start(Function * global_funcs)
 	 "-voice "
          "-private "
 	 "-fastop ");
-  module_register(MODULE_NAME, channels_table, 1, 0);
 #ifdef LEAF
   timer_create_secs(60, "check_limitraise", (Function) check_limitraise);
 #endif /* LEAF */
@@ -960,6 +961,5 @@ char *channels_start(Function * global_funcs)
   add_cfg(&CFG_LOCKTHRESHOLD);
   add_cfg(&CFG_KILLTHRESHOLD);
 #endif /* S_AUTOLOCK */
-  return NULL;
 }
 

+ 3 - 1
src/mod/channels.mod/channels.h

@@ -17,6 +17,8 @@
 
 #ifdef MAKING_CHANNELS
 
+#define add_mode real_add_mode
+
 /* Structure for udef channel values. Udef setting have one such
  * structure for each channel where they have a defined value.
  */
@@ -90,7 +92,7 @@ int u_match_mask(struct maskrec *, char *);
 int ismasked(masklist *, char *);
 int ismodeline(masklist *, char *);
 
-extern int		use_info, global_ban_time, global_exempt_time, global_invite_time;
+void channels_report(int, int);
 
 /* Macro's here because their functions were replaced by something more
  * generic. <cybah>

+ 54 - 32
src/mod/channels.mod/cmdschan.c

@@ -254,7 +254,9 @@ static void cmd_pls_exempt(struct userrec *u, int idx, char *par)
 	       dcc[idx].u.chat->con_chan, s, chan->dname, par);
 	dprintf(idx, "New %s exempt: %s (%s)\n", chan->dname, s, par);
       }
+#ifdef LEAF
       add_mode(chan, '+', 'e', s);
+#endif /* LEAF */
     } else {
       u_addexempt(NULL, s, dcc[idx].nick, par,
 		  expire_time ? now + expire_time : 0, 0);
@@ -268,8 +270,10 @@ static void cmd_pls_exempt(struct userrec *u, int idx, char *par)
 	       s, par);
 	dprintf(idx, "New exempt: %s (%s)\n", s, par);
       }
+#ifdef LEAF
       for (chan = chanset; chan != NULL; chan = chan->next)
 	add_mode(chan, '+', 'e', s);
+#endif /* LEAF */
     }
   }
 }
@@ -383,7 +387,9 @@ static void cmd_pls_invite(struct userrec *u, int idx, char *par)
 	       dcc[idx].u.chat->con_chan, s, chan->dname, par);
 	dprintf(idx, "New %s invite: %s (%s)\n", chan->dname, s, par);
       }
+#ifdef LEAF
       add_mode(chan, '+', 'I', s);
+#endif /* LEAF */
     } else {
       u_addinvite(NULL, s, dcc[idx].nick, par,
 		  expire_time ? now + expire_time : 0, 0);
@@ -397,8 +403,10 @@ static void cmd_pls_invite(struct userrec *u, int idx, char *par)
 	       s, par);
 	dprintf(idx, "New invite: %s (%s)\n", s, par);
       }
+#ifdef LEAF
       for (chan = chanset; chan != NULL; chan = chan->next)
 	add_mode(chan, '+', 'I', s);
+#endif /* LEAF */
     }
   }
 }
@@ -446,8 +454,10 @@ static void cmd_mns_ban(struct userrec *u, int idx, char *par)
         mask = s;
       putlog(LOG_CMDS, "*", "#%s# -ban %s", dcc[idx].nick, mask);
       dprintf(idx, "%s: %s\n", IRC_REMOVEDBAN, mask);
+#ifdef LEAF
       for (chan = chanset; chan != NULL; chan = chan->next)
         add_mode(chan, '-', 'b', mask);
+#endif /* LEAF */
       return;
     }
   }
@@ -471,10 +481,11 @@ static void cmd_mns_ban(struct userrec *u, int idx, char *par)
           mask = lastdeletedmask;
         else
           mask = s;
-        putlog(LOG_CMDS, "*", "#%s# (%s) -ban %s", dcc[idx].nick, chan->dname,
-               mask);
+        putlog(LOG_CMDS, "*", "#%s# (%s) -ban %s", dcc[idx].nick, chan->dname, mask);
         dprintf(idx, "Removed %s channel ban: %s\n", chan->dname, mask);
+#ifdef LEAF
         add_mode(chan, '-', 'b', mask);
+#endif /* LEAF */
         return;
       }
     }
@@ -484,11 +495,11 @@ static void cmd_mns_ban(struct userrec *u, int idx, char *par)
           (!u_equals_mask(chan->bans, b->mask))) {
         i++;
         if (i == -j) {
+#ifdef LEAF
           add_mode(chan, '-', 'b', b->mask);
-          dprintf(idx, "%s '%s' on %s.\n", IRC_REMOVEDBAN,
-                  b->mask, chan->dname);
-          putlog(LOG_CMDS, "*", "#%s# (%s) -ban %s [on channel]",
-                 dcc[idx].nick, dcc[idx].u.chat->con_chan, ban);
+#endif /* LEAF */
+          dprintf(idx, "%s '%s' on %s.\n", IRC_REMOVEDBAN, b->mask, chan->dname);
+          putlog(LOG_CMDS, "*", "#%s# (%s) -ban %s [on channel]", dcc[idx].nick, dcc[idx].u.chat->con_chan, ban);
           return;
         }
       }
@@ -496,18 +507,20 @@ static void cmd_mns_ban(struct userrec *u, int idx, char *par)
   } else {
     j = u_delban(chan, ban, 1);
     if (j > 0) {
-      putlog(LOG_CMDS, "*", "#%s# (%s) -ban %s", dcc[idx].nick,
-             dcc[idx].u.chat->con_chan, ban);
+      putlog(LOG_CMDS, "*", "#%s# (%s) -ban %s", dcc[idx].nick, dcc[idx].u.chat->con_chan, ban);
       dprintf(idx, "Removed %s channel ban: %s\n", chname, ban);
+#ifdef LEAF
       add_mode(chan, '-', 'b', ban);
+#endif /* LEAF */
       return;
     }
     for (b = chan->channel.ban; b && b->mask && b->mask[0]; b = b->next) {
       if (!rfc_casecmp(b->mask, ban)) {
+#ifdef LEAF
         add_mode(chan, '-', 'b', b->mask);
+#endif /* LEAF */
         dprintf(idx, "%s '%s' on %s.\n", IRC_REMOVEDBAN, b->mask, chan->dname);
-        putlog(LOG_CMDS, "*", "#%s# (%s) -ban %s [on channel]",
-               dcc[idx].nick, dcc[idx].u.chat->con_chan, ban);
+        putlog(LOG_CMDS, "*", "#%s# (%s) -ban %s [on channel]", dcc[idx].nick, dcc[idx].u.chat->con_chan, ban);
         return;
       }
     }
@@ -562,8 +575,10 @@ static void cmd_mns_exempt(struct userrec *u, int idx, char *par)
         mask = s;
       putlog(LOG_CMDS, "*", "#%s# -exempt %s", dcc[idx].nick, mask);
       dprintf(idx, "%s: %s\n", IRC_REMOVEDEXEMPT, mask);
+#ifdef LEAF
       for (chan = chanset; chan != NULL; chan = chan->next)
         add_mode(chan, '-', 'e', mask);
+#endif /* LEAF */
       return;
     }
   }
@@ -587,10 +602,11 @@ static void cmd_mns_exempt(struct userrec *u, int idx, char *par)
           mask = lastdeletedmask;
         else
           mask = s;
-        putlog(LOG_CMDS, "*", "#%s# (%s) -exempt %s", dcc[idx].nick,
-               chan->dname, mask);
+        putlog(LOG_CMDS, "*", "#%s# (%s) -exempt %s", dcc[idx].nick, chan->dname, mask);
         dprintf(idx, "Removed %s channel exempt: %s\n", chan->dname, mask);
+#ifdef LEAF
         add_mode(chan, '-', 'e', mask);
+#endif /* LEAF */
         return;
       }
     }
@@ -600,9 +616,10 @@ static void cmd_mns_exempt(struct userrec *u, int idx, char *par)
           !u_equals_mask(chan->exempts, e->mask)) {
         i++;
         if (i == -j) {
+#ifdef LEAF
           add_mode(chan, '-', 'e', e->mask);
-          dprintf(idx, "%s '%s' on %s.\n", IRC_REMOVEDEXEMPT,
-                  e->mask, chan->dname);
+#endif /* LEAF */
+          dprintf(idx, "%s '%s' on %s.\n", IRC_REMOVEDEXEMPT, e->mask, chan->dname);
           putlog(LOG_CMDS, "*", "#%s# (%s) -exempt %s [on channel]",
                  dcc[idx].nick, dcc[idx].u.chat->con_chan, exempt);
           return;
@@ -612,19 +629,20 @@ static void cmd_mns_exempt(struct userrec *u, int idx, char *par)
   } else {
     j = u_delexempt(chan, exempt, 1);
     if (j > 0) {
-      putlog(LOG_CMDS, "*", "#%s# (%s) -exempt %s", dcc[idx].nick,
-             dcc[idx].u.chat->con_chan, exempt);
+      putlog(LOG_CMDS, "*", "#%s# (%s) -exempt %s", dcc[idx].nick, dcc[idx].u.chat->con_chan, exempt);
       dprintf(idx, "Removed %s channel exempt: %s\n", chname, exempt);
+#ifdef LEAF
       add_mode(chan, '-', 'e', exempt);
+#endif /* LEAF */
       return;
     }
     for (e = chan->channel.exempt; e && e->mask && e->mask[0]; e = e->next) {
       if (!rfc_casecmp(e->mask, exempt)) {
+#ifdef LEAF
         add_mode(chan, '-', 'e', e->mask);
-        dprintf(idx, "%s '%s' on %s.\n",
-                IRC_REMOVEDEXEMPT, e->mask, chan->dname);
-        putlog(LOG_CMDS, "*", "#%s# (%s) -exempt %s [on channel]",
-               dcc[idx].nick, dcc[idx].u.chat->con_chan, exempt);
+#endif /* LEAF */
+        dprintf(idx, "%s '%s' on %s.\n", IRC_REMOVEDEXEMPT, e->mask, chan->dname);
+        putlog(LOG_CMDS, "*", "#%s# (%s) -exempt %s [on channel]", dcc[idx].nick, dcc[idx].u.chat->con_chan, exempt);
         return;
       }
     }
@@ -679,8 +697,10 @@ static void cmd_mns_invite(struct userrec *u, int idx, char *par)
         mask = s;
       putlog(LOG_CMDS, "*", "#%s# -invite %s", dcc[idx].nick, mask);
       dprintf(idx, "%s: %s\n", IRC_REMOVEDINVITE, mask);
+#ifdef LEAF
       for (chan = chanset; chan != NULL; chan = chan->next)
         add_mode(chan, '-', 'I', mask);
+#endif /* LEAF */
       return;
     }
   }
@@ -704,10 +724,11 @@ static void cmd_mns_invite(struct userrec *u, int idx, char *par)
           mask = lastdeletedmask;
         else
           mask = s;
-        putlog(LOG_CMDS, "*", "#%s# (%s) -invite %s", dcc[idx].nick,
-               chan->dname, mask);
+        putlog(LOG_CMDS, "*", "#%s# (%s) -invite %s", dcc[idx].nick, chan->dname, mask);
         dprintf(idx, "Removed %s channel invite: %s\n", chan->dname, mask);
+#ifdef LEAF
         add_mode(chan, '-', 'I', mask);
+#endif /* LEAF */
         return;
       }
     }
@@ -718,11 +739,11 @@ static void cmd_mns_invite(struct userrec *u, int idx, char *par)
           !u_equals_mask(chan->invites, inv->mask)) {
         i++;
         if (i == -j) {
+#ifdef LEAF
           add_mode(chan, '-', 'I', inv->mask);
-          dprintf(idx, "%s '%s' on %s.\n", IRC_REMOVEDINVITE,
-                  inv->mask, chan->dname);
-          putlog(LOG_CMDS, "*", "#%s# (%s) -invite %s [on channel]",
-                 dcc[idx].nick, dcc[idx].u.chat->con_chan, invite);
+#endif /* LEAF */
+          dprintf(idx, "%s '%s' on %s.\n", IRC_REMOVEDINVITE, inv->mask, chan->dname);
+          putlog(LOG_CMDS, "*", "#%s# (%s) -invite %s [on channel]", dcc[idx].nick, dcc[idx].u.chat->con_chan, invite);
           return;
         }
       }
@@ -730,20 +751,21 @@ static void cmd_mns_invite(struct userrec *u, int idx, char *par)
   } else {
     j = u_delinvite(chan, invite, 1);
     if (j > 0) {
-      putlog(LOG_CMDS, "*", "#%s# (%s) -invite %s", dcc[idx].nick,
-             dcc[idx].u.chat->con_chan, invite);
+      putlog(LOG_CMDS, "*", "#%s# (%s) -invite %s", dcc[idx].nick, dcc[idx].u.chat->con_chan, invite);
       dprintf(idx, "Removed %s channel invite: %s\n", chname, invite);
+#ifdef LEAF
       add_mode(chan, '-', 'I', invite);
+#endif /* LEAF */
       return;
     }
     for (inv = chan->channel.invite; inv && inv->mask && inv->mask[0];
          inv = inv->next) {
       if (!rfc_casecmp(inv->mask, invite)) {
+#ifdef LEAF
         add_mode(chan, '-', 'I', inv->mask);
-        dprintf(idx, "%s '%s' on %s.\n",
-                IRC_REMOVEDINVITE, inv->mask, chan->dname);
-        putlog(LOG_CMDS, "*", "#%s# (%s) -invite %s [on channel]",
-               dcc[idx].nick, dcc[idx].u.chat->con_chan, invite);
+#endif /* LEAF */
+        dprintf(idx, "%s '%s' on %s.\n", IRC_REMOVEDINVITE, inv->mask, chan->dname);
+        putlog(LOG_CMDS, "*", "#%s# (%s) -invite %s [on channel]", dcc[idx].nick, dcc[idx].u.chat->con_chan, invite);
         return;
       }
     }

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

@@ -1427,13 +1427,13 @@ static void check_expired_bans(void)
   for (u = global_bans; u; u = u2) { 
     u2 = u->next;
     if (!(u->flags & MASKREC_PERM) && (now >= u->expire)) {
-      putlog(LOG_MISC, "*", "%s %s (%s)", BANS_NOLONGER,
-	     u->mask, MISC_EXPIRED);
+      putlog(LOG_MISC, "*", "%s %s (%s)", BANS_NOLONGER, u->mask, MISC_EXPIRED);
       for (chan = chanset; chan; chan = chan->next)
-	for (b = chan->channel.ban; b->mask[0]; b = b->next)
-	  if (!rfc_casecmp(b->mask, u->mask) &&
-	      expired_mask(chan, b->who) && b->timer != now) {
+        for (b = chan->channel.ban; b->mask[0]; b = b->next)
+	  if (!rfc_casecmp(b->mask, u->mask) && expired_mask(chan, b->who) && b->timer != now) {
+#ifdef LEAF
 	    add_mode(chan, '-', 'b', u->mask);
+#endif /* LEAF */
 	    b->timer = now;
 	  }
       u_delban(NULL, u->mask, 1);
@@ -1447,9 +1447,10 @@ static void check_expired_bans(void)
 	putlog(LOG_MISC, "*", "%s %s %s %s (%s)", BANS_NOLONGER,
 	       u->mask, MISC_ONLOCALE, chan->dname, MISC_EXPIRED);
 	for (b = chan->channel.ban; b->mask[0]; b = b->next)
-	  if (!rfc_casecmp(b->mask, u->mask) &&
-	      expired_mask(chan, b->who) && b->timer != now) {
+          if (!rfc_casecmp(b->mask, u->mask) && expired_mask(chan, b->who) && b->timer != now) {
+#ifdef LEAF
 	    add_mode(chan, '-', 'b', u->mask);
+#endif /* LEAF */
 	    b->timer = now;
 	  }
 	u_delban(chan, u->mask, 1);
@@ -1490,9 +1491,10 @@ static void check_expired_exempts(void)
             chan->dname);
 	else
 	  for (e = chan->channel.exempt; e->mask[0]; e = e->next)
-	    if (!rfc_casecmp(e->mask, u->mask) &&
-		expired_mask(chan, e->who) && e->timer != now) {
+	    if (!rfc_casecmp(e->mask, u->mask) && expired_mask(chan, e->who) && e->timer != now) {
+#ifdef LEAF
 	      add_mode(chan, '-', 'e', u->mask);
+#endif /* LEAF */
 	      e->timer = now;
 	    }
       }
@@ -1521,9 +1523,10 @@ static void check_expired_exempts(void)
           putlog(LOG_MISC, "*", "%s %s %s %s (%s)", EXEMPTS_NOLONGER,
 		 u->mask, MISC_ONLOCALE, chan->dname, MISC_EXPIRED);
 	  for (e = chan->channel.exempt; e->mask[0]; e = e->next)
-	    if (!rfc_casecmp(e->mask, u->mask) &&
-		expired_mask(chan, e->who) && e->timer != now) {
+	    if (!rfc_casecmp(e->mask, u->mask) && expired_mask(chan, e->who) && e->timer != now) {
+#ifdef LEAF
 	      add_mode(chan, '-', 'e', u->mask);
+#endif /* LEAF */
 	      e->timer = now;
 	    }
           u_delexempt(chan, u->mask, 1);
@@ -1551,9 +1554,10 @@ static void check_expired_invites(void)
       for (chan = chanset; chan; chan = chan->next)
 	if (!(chan->channel.mode & CHANINV))
 	  for (b = chan->channel.invite; b->mask[0]; b = b->next)
-	    if (!rfc_casecmp(b->mask, u->mask) &&
-		expired_mask(chan, b->who) && b->timer != now) {
+	    if (!rfc_casecmp(b->mask, u->mask) && expired_mask(chan, b->who) && b->timer != now) {
+#ifdef LEAF
 	      add_mode(chan, '-', 'I', u->mask);
+#endif /* LEAF */
 	      b->timer = now;
 	    }
       u_delinvite(NULL, u->mask,1);
@@ -1568,9 +1572,10 @@ static void check_expired_invites(void)
 	       u->mask, MISC_ONLOCALE, chan->dname, MISC_EXPIRED);
 	if (!(chan->channel.mode & CHANINV))
 	  for (b = chan->channel.invite; b->mask[0]; b = b->next)
-	    if (!rfc_casecmp(b->mask, u->mask) &&
-		expired_mask(chan, b->who) && b->timer != now) {
+	    if (!rfc_casecmp(b->mask, u->mask) && expired_mask(chan, b->who) && b->timer != now) {
+#ifdef LEAF
 	      add_mode(chan, '-', 'I', u->mask);
+#endif /* LEAF */
 	      b->timer = now;
 	    }
 	u_delinvite(chan, u->mask, 1);

+ 1 - 1
src/mod/irc.mod/irc.h

@@ -22,7 +22,6 @@
 #ifdef S_AUTHCMDS
 
 #define add_mode real_add_mode
-static void real_add_mode(struct chanset_t *, char, char, char *);
 
 static int check_bind_pubc(char *, char *, char *, struct userrec *, char *, char *);
 #endif /* S_AUTHCMDS */
@@ -64,6 +63,7 @@ static int gotmode(char *, char *);
 
 #endif /* MAKING_IRC */
 
+void real_add_mode(struct chanset_t *, char, char, char *);
 int me_op(struct chanset_t *);
 void check_this_ban(struct chanset_t *, char *, int);
 void check_this_user(char *, int, char *);

+ 2 - 2
src/mod/irc.mod/mode.c

@@ -277,7 +277,7 @@ void queue_deop(struct chanset_t *chan, char *op) {
 
 /* Queue a channel mode change
  */
-static void real_add_mode(struct chanset_t *chan, char plus, char mode, char *op)
+void real_add_mode(struct chanset_t *chan, char plus, char mode, char *op)
 {
   int i, type, modes, l;
   masklist *m = NULL;
@@ -575,7 +575,7 @@ static void flush_mode(struct chanset_t *chan, int pri)
 
 /* Queue a channel mode change
  */
-static void real_add_mode(struct chanset_t *chan, char plus, char mode, char *op)
+void real_add_mode(struct chanset_t *chan, char plus, char mode, char *op)
 {
   int i, type, modes, l;
   masklist *m = NULL;

+ 1 - 5
src/mod/static.h

@@ -5,11 +5,7 @@
 #ifndef _EGG_MOD_STATIC_H
 #define _EGG_MOD_STATIC_H
 
-char *channels_start();
 char *compress_start();
-#ifdef LEAF
-char *irc_start();
-#endif /* LEAF */
 char *share_start();
 char *transfer_start();
 
@@ -22,10 +18,10 @@ void notes_init();
 void server_init();
 void irc_init();
 #endif /* LEAF */
+void channels_init();
 
 static void link_statics()
 {
-  check_static("channels", channels_start);
   check_static("compress", compress_start);
   check_static("share", share_start);
   check_static("transfer", transfer_start);