Kaynağa Gözat

* FreeBSD compile fixes

svn: 311
Bryan Drewery 22 yıl önce
ebeveyn
işleme
329d760e09

+ 1 - 0
Makefile.in

@@ -120,6 +120,7 @@ eggautoconf:
 
 packconf: makesettings
 	@./makesettings pack/pack.cfg src/settings.tmp
+	@touch src/settings.c
 	@(if test "x`diff -qurN src/settings.tmp src/settings.c`" != "x"; then \
 	cp -f src/settings.tmp src/settings.c; \
 	fi)

+ 1 - 1
src/misc.c

@@ -499,12 +499,12 @@ void show_channels(int idx, char *handle)
   egg_snprintf(format, sizeof format, "  %%c%%-%us %%-s%%-s%%-s%%-s%%-s\n", (l+2));
 
   for (chan = chanset;chan;chan = chan->next) {
-    get_user_flagrec(u, &fr, chan->dname);
 #ifdef LEAF
     int opped = (func[16] (chan));
 #else /* !LEAF */
     int opped = 0;
 #endif /* LEAF */
+    get_user_flagrec(u, &fr, chan->dname);
     if (chk_op(fr, chan)) {
         if (!first) { 
           dprintf(idx, STR("%s %s access to %d channel%s:\n"), handle ? u->handle : "You", handle ? "has" : "have", total, (total > 1) ? "s" : "");

+ 7 - 1
src/mod/channels.mod/channels.c

@@ -8,8 +8,9 @@
 #define MAKING_CHANNELS
 #include <sys/stat.h>
 #include "src/mod/module.h"
+#include "irc.mod/irc.h"
 
-static Function *global		= NULL;
+static Function *global		= NULL, *irc_funcs = NULL;
 
 static int  use_info;
 static int  quiet_save;
@@ -1158,6 +1159,11 @@ char *channels_start(Function * global_funcs)
          "-private "
 	 "-fastop ");
   module_register(MODULE_NAME, channels_table, 1, 0);
+  if (!(irc_funcs = module_depend(MODULE_NAME, "irc", 0, 0))) {
+    module_undepend(MODULE_NAME);
+    return "This module requires channels module 0.0 or later.";
+  }
+
 #ifdef LEAF
   add_hook(HOOK_MINUTELY, (Function) check_limitraise);
 #endif /* LEAF */

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

@@ -1625,6 +1625,7 @@ static Function irc_table[] =
   (Function) check_this_ban,
   (Function) check_this_user,
   (Function) me_voice,
+  (Function) raise_limit,
 };
 
 void irc_describe(struct cfg_entry *cfgent, int idx)

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

@@ -69,6 +69,7 @@ static int gotmode(char *, char *);
 #define check_this_ban ((void (*)(struct chanset_t *, char *, int))irc_funcs[20])
 #define check_this_user ((void(*)(char *, int, char *))irc_funcs[21])
 #define me_voice ((int(*)(struct chanset_t *))irc_funcs[22])
+#define raise_limit ((void (*)(struct chanset_t *))irc_funcs[23])
 //#define getchanmode ((char *(*)(struct chanset_t *))irc_funcs[23])
 
 #endif				/* MAKING_IRC */

+ 0 - 1
src/mod/module.h

@@ -554,7 +554,6 @@
 #define checkchans ((void (*)(int))global[337])
 
 extern int lfprintf(FILE *, char *, ...);
-extern void raise_limit(struct chanset_t *);
 extern int egg_numver;
 extern int cfg_count;
 extern struct cfg_entry **cfg;