[cvslog] (2006-10-01 21:59:36 UTC) Module eggdrop1.9: Change committed!

cvslog cvs at tsss.org
Sun Oct 1 15:59:36 CST 2006


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.9
Commit time: 2006-10-01 21:59:36 UTC
Commited by: sven

Modified files:
     lib/eggdrop/users.c

Log message:

Allow setting flags on a channel that has no flags set. Paradox!

---------------------- diff included ----------------------
Index: eggdrop1.9/lib/eggdrop/users.c
diff -u eggdrop1.9/lib/eggdrop/users.c:1.50 eggdrop1.9/lib/eggdrop/users.c:1.51
--- eggdrop1.9/lib/eggdrop/users.c:1.50	Sat Sep 30 19:48:59 2006
+++ eggdrop1.9/lib/eggdrop/users.c	Sun Oct  1 16:59:25 2006
@@ -18,7 +18,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: users.c,v 1.50 2006-10-01 00:48:59 sven Exp $";
+static const char rcsid[] = "$Id: users.c,v 1.51 2006-10-01 21:59:25 sven Exp $";
 #endif
 
 #include <eggdrop/eggdrop.h>
@@ -560,7 +560,10 @@
 {
 	flags_t *oldflags, newflags;
 
-	if (get_flags(u, chan, &oldflags)) return(-1);
+	if (get_flags(u, chan, &oldflags)) {
+		append_setting(u, chan, NULL, NULL);
+		if (get_flags(u, chan, &oldflags)) return -1;
+	}
 	newflags.builtin = flags->builtin;
 	newflags.udef = flags->udef;
 	if (check_flag_change(u, chan, oldflags, &newflags)) return(0);
@@ -577,7 +580,10 @@
 {
 	flags_t *oldflags, newflags;
 
-	if (get_flags(u, chan, &oldflags)) return(-1);
+	if (get_flags(u, chan, &oldflags)) {
+		append_setting(u, chan, NULL, NULL);
+		if (get_flags(u, chan, &oldflags)) return(-1);
+	}
 	newflags.builtin = oldflags->builtin;
 	newflags.udef = oldflags->udef;
 	flag_merge_str(&newflags, flags);
----------------------- End of diff -----------------------



More information about the Changes mailing list