[cvslog] (2006-08-22 05:21:12 UTC) Module eggdrop1.9: Change committed!

cvslog cvs at tsss.org
Mon Aug 21 23:21:12 CST 2006


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.9
Commit time: 2006-08-22 05:21:12 UTC
Commited by: sven

Modified files:
     lib/eggdrop/module.c lib/eggdrop/partymember.c

Log message:

 * remote partymembers don't have a user struct
 * added a string to the unload module bind callback explaining why it was unloaded

---------------------- diff included ----------------------
Index: eggdrop1.9/lib/eggdrop/module.c
diff -u eggdrop1.9/lib/eggdrop/module.c:1.9 eggdrop1.9/lib/eggdrop/module.c:1.10
--- eggdrop1.9/lib/eggdrop/module.c:1.9	Fri Jan  6 13:01:40 2006
+++ eggdrop1.9/lib/eggdrop/module.c	Tue Aug 22 00:21:01 2006
@@ -18,7 +18,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: module.c,v 1.9 2006-01-06 19:01:40 sven Exp $";
+static const char rcsid[] = "$Id: module.c,v 1.10 2006-08-22 05:21:01 sven Exp $";
 #endif
 
 #include <eggdrop/eggdrop.h>
@@ -48,7 +48,7 @@
 int module_init(void)
 {
 	BT_load = bind_table_add(BTN_LOAD_MODULE, 1, "s", MATCH_MASK, 0);		/* DDD	*/
-	BT_unload = bind_table_add(BTN_UNLOAD_MODULE, 1, "s", MATCH_MASK, 0);		/* DDD	*/
+	BT_unload = bind_table_add(BTN_UNLOAD_MODULE, 2, "ss", MATCH_MASK, 0);		/* DDD	*/
 	return(0);
 }
 
@@ -153,7 +153,7 @@
 	if (prev) prev->next = entry->next;
 	else module_list_head = entry->next;
 	free(entry);
-	bind_check(BT_unload, NULL, name, name);
+	bind_check(BT_unload, NULL, name, name, why == MODULE_USER ? "request" : why == MODULE_SHUTDOWN ? "shutdown" : "restart");
 	putlog(LOG_MISC, "*", "Module unloaded: %s", name);
 	return(0);
 }
Index: eggdrop1.9/lib/eggdrop/partymember.c
diff -u eggdrop1.9/lib/eggdrop/partymember.c:1.20 eggdrop1.9/lib/eggdrop/partymember.c:1.21
--- eggdrop1.9/lib/eggdrop/partymember.c:1.20	Mon Aug 21 20:41:28 2006
+++ eggdrop1.9/lib/eggdrop/partymember.c	Tue Aug 22 00:21:02 2006
@@ -18,7 +18,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: partymember.c,v 1.20 2006-08-22 01:41:28 sven Exp $";
+static const char rcsid[] = "$Id: partymember.c,v 1.21 2006-08-22 05:21:02 sven Exp $";
 #endif
 
 #include <eggdrop/eggdrop.h>
@@ -144,7 +144,7 @@
 	party_head = mem;
 	hash_table_insert(pid_ht, (void *)pid, mem);
 	npartymembers++;
-	bind_check(BT_new, &user->settings[0].flags, user->handle, mem);
+	bind_check(BT_new, NULL, nick, mem);
 	return(mem);
 }
 
@@ -156,7 +156,7 @@
 
 	if (p->flags & PARTY_DELETED) return(-1);
 
-	bind_check(BT_quit, &p->user->settings[0].flags, p->user->handle, p, text);
+	bind_check(BT_quit, NULL, p->nick, p, text);
 
 	/* Mark it as deleted so it doesn't get reused before it's free. */
 	p->flags |= PARTY_DELETED;
@@ -208,7 +208,7 @@
 		}
 		partychan_free_common(common);
 	}
-	bind_check(BT_nick, &p->user->settings[0].flags, NULL, p, oldnick, p->nick);
+	bind_check(BT_nick, NULL, NULL, p, oldnick, p->nick);
 	if (oldnick) free(oldnick);
 	p->flags &= ~PARTY_SELECTED;
 	return(0);
----------------------- End of diff -----------------------



More information about the Changes mailing list