[cvslog] (2006-10-03 04:02:24 UTC) Module eggdrop1.9: Change committed!

cvslog cvs at tsss.org
Mon Oct 2 22:02:25 CST 2006


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.9
Commit time: 2006-10-03 04:02:23 UTC
Commited by: sven

Modified files:
     lib/eggdrop/binds.c lib/eggdrop/binds.h lib/eggdrop/dns.c
     lib/eggdrop/dns.h lib/eggdrop/hash_table.c
     lib/eggdrop/hash_table.h lib/eggdrop/ident.c lib/eggdrop/ident.h
     lib/eggdrop/module.c lib/eggdrop/net.h lib/eggdrop/script.c
     lib/eggdrop/script.h lib/eggdrop/timer.c lib/eggdrop/timer.h
     modules/dccparty/dccparty.c modules/ircparty/ircparty.c
     modules/script/scriptbind.c modules/telnetparty/telnetparty.c

Log message:

 * Added an owner struct to ident requests. Same as with dns requests and
   just as ugly.
 * Added a function to remove all binds, timers, dns and ident requests of
   an owner and called before unloading a module.
 * Some random cleanups.
 * Note: sockbufs are asyncronous callbacks too and need the same treatment

---------------------- diff included ----------------------
Index: eggdrop1.9/lib/eggdrop/binds.c
diff -u eggdrop1.9/lib/eggdrop/binds.c:1.28 eggdrop1.9/lib/eggdrop/binds.c:1.29
--- eggdrop1.9/lib/eggdrop/binds.c:1.28	Mon Jun 19 10:47:33 2006
+++ eggdrop1.9/lib/eggdrop/binds.c	Mon Oct  2 23:02:12 2006
@@ -18,7 +18,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: binds.c,v 1.28 2006-06-19 15:47:33 stdarg Exp $";
+static const char rcsid[] = "$Id: binds.c,v 1.29 2006-10-03 04:02:12 sven Exp $";
 #endif
 
 #include <eggdrop/eggdrop.h>
@@ -67,7 +67,7 @@
 	while (bind_table_list_head) bind_table_del(bind_table_list_head);
 }
 
-void kill_binds_by_module(egg_module_t *module)
+int kill_binds_by_owner(egg_module_t *module, void *script)
 {
 	int deleted = 0;
 	bind_entry_t *entry;
@@ -77,13 +77,14 @@
 		if (table->flags & BIND_DELETED) continue;
 		for (entry = table->entries; entry; entry = entry->next) {
 			if (entry->flags & BIND_DELETED) continue;
-			if (entry->owner && entry->owner->module == module) {
+			if (entry->owner && entry->owner->module == module && (!script || entry->owner->client_data == script)) {
 				deleted++;
 				entry->flags |= BIND_DELETED;
 			}
 		}
 	}
-	if (deleted) schedule_bind_cleanup();
+	internal_bind_cleanup();
+	return deleted;
 }
 
 bind_table_t *bind_table_add(const char *name, int nargs, const char *syntax, int match_type, int flags)
Index: eggdrop1.9/lib/eggdrop/binds.h
diff -u eggdrop1.9/lib/eggdrop/binds.h:1.11 eggdrop1.9/lib/eggdrop/binds.h:1.12
--- eggdrop1.9/lib/eggdrop/binds.h:1.11	Mon Jun 19 10:47:33 2006
+++ eggdrop1.9/lib/eggdrop/binds.h	Mon Oct  2 23:02:12 2006
@@ -16,7 +16,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  *
- * $Id: binds.h,v 1.11 2006-06-19 15:47:33 stdarg Exp $
+ * $Id: binds.h,v 1.12 2006-10-03 04:02:12 sven Exp $
  */
 
 #ifndef _EGG_BINDS_H_
@@ -94,7 +94,7 @@
 
 bind_table_t *bind_table_add(const char *name, int nargs, const char *syntax, int match_type, int flags);
 void bind_table_del(bind_table_t *table);
-void kill_binds_by_module(struct egg_module *module);
+int kill_binds_by_owner(struct egg_module *module, void *script);
 bind_table_t *bind_table_lookup(const char *name);
 bind_table_t *bind_table_lookup_or_fake(const char *name);
 int bind_entry_add(bind_table_t *table, const char *user_flags, const char *mask, const char *function_name, int bind_flags, Function callback, void *client_data, event_owner_t *owner);
Index: eggdrop1.9/lib/eggdrop/dns.c
diff -u eggdrop1.9/lib/eggdrop/dns.c:1.18 eggdrop1.9/lib/eggdrop/dns.c:1.19
--- eggdrop1.9/lib/eggdrop/dns.c:1.18	Mon Sep 11 20:50:50 2006
+++ eggdrop1.9/lib/eggdrop/dns.c	Mon Oct  2 23:02:12 2006
@@ -18,7 +18,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: dns.c,v 1.18 2006-09-12 01:50:50 sven Exp $";
+static const char rcsid[] = "$Id: dns.c,v 1.19 2006-10-03 04:02:12 sven Exp $";
 #endif
 
 #include <eggdrop/eggdrop.h>
@@ -573,6 +573,27 @@
 	return(0);
 }
 
+int egg_dns_cancel_by_owner(egg_module_t *module, void *script)
+{
+	int removed = 0;
+	dns_query_t *q, *prev= NULL, *next;
+
+	for (q = query_head; q; q = next) {
+		next = q->next;
+		if (!q->owner || q->owner->module != module || (script && q->owner->client_data != script)) {
+			prev = q;
+			continue;
+		}
+		if (prev) prev->next = q->next;
+		else query_head = q->next;
+		++removed;
+
+		if (q->owner && q->owner->on_delete) q->owner->on_delete(q->owner, q->client_data);
+		free(q);
+	}
+	return removed;
+}
+
 static int skip_name(unsigned char *ptr)
 {
 	int len;
Index: eggdrop1.9/lib/eggdrop/dns.h
diff -u eggdrop1.9/lib/eggdrop/dns.h:1.3 eggdrop1.9/lib/eggdrop/dns.h:1.4
--- eggdrop1.9/lib/eggdrop/dns.h:1.3	Mon Sep 11 20:50:50 2006
+++ eggdrop1.9/lib/eggdrop/dns.h	Mon Oct  2 23:02:12 2006
@@ -16,7 +16,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  *
- * $Id: dns.h,v 1.3 2006-09-12 01:50:50 sven Exp $
+ * $Id: dns.h,v 1.4 2006-10-03 04:02:12 sven Exp $
  */
 
 #ifndef _EGG_DNS_H_
@@ -37,5 +37,6 @@
 int egg_dns_lookup(const char *host, int timeout, dns_callback_t callback, void *client_data, event_owner_t *owner);
 int egg_dns_reverse(const char *ip, int timeout, dns_callback_t callback, void *client_data, event_owner_t *owner);
 int egg_dns_cancel(int id, int issue_callback);
+int egg_dns_cancel_by_owner(struct egg_module *module, void *script);
 
 #endif /* !_EGG_DNS_H_ */
Index: eggdrop1.9/lib/eggdrop/hash_table.c
diff -u eggdrop1.9/lib/eggdrop/hash_table.c:1.19 eggdrop1.9/lib/eggdrop/hash_table.c:1.20
--- eggdrop1.9/lib/eggdrop/hash_table.c:1.19	Fri Jun 24 14:00:57 2005
+++ eggdrop1.9/lib/eggdrop/hash_table.c	Mon Oct  2 23:02:12 2006
@@ -18,7 +18,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: hash_table.c,v 1.19 2005-06-24 19:00:57 darko Exp $";
+static const char rcsid[] = "$Id: hash_table.c,v 1.20 2006-10-03 04:02:12 sven Exp $";
 #endif
 
 #include <eggdrop/eggdrop.h>
@@ -115,7 +115,7 @@
 	return(0);
 }
 
-int hash_table_insert(hash_table_t *ht, const void *key, void *data)
+int hash_table_insert(hash_table_t *ht, void *key, void *data)
 {
 	unsigned int hash;
 	int idx;
@@ -276,7 +276,7 @@
 	const unsigned char *k;
 	unsigned int hash;
 
-        k = key;
+	k = key;
 	hash = 0;
 	while (*k) {
 		hash *= 16777619;
Index: eggdrop1.9/lib/eggdrop/hash_table.h
diff -u eggdrop1.9/lib/eggdrop/hash_table.h:1.7 eggdrop1.9/lib/eggdrop/hash_table.h:1.8
--- eggdrop1.9/lib/eggdrop/hash_table.h:1.7	Fri Jun 24 14:00:57 2005
+++ eggdrop1.9/lib/eggdrop/hash_table.h	Mon Oct  2 23:02:12 2006
@@ -16,7 +16,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  *
- * $Id: hash_table.h,v 1.7 2005-06-24 19:00:57 darko Exp $
+ * $Id: hash_table.h,v 1.8 2006-10-03 04:02:12 sven Exp $
  */
 
 #ifndef _EGG_HASH_TABLE_H_
@@ -42,7 +42,7 @@
 
 typedef struct hash_table_entry_b {
 	struct hash_table_entry_b *next;
-	const void *key;
+	void *key;
 	void *data;
 	unsigned int hash;
 } hash_table_entry_t;
@@ -65,7 +65,7 @@
 int hash_table_delete(hash_table_t *ht);
 int hash_table_check_resize(hash_table_t *ht);
 int hash_table_resize(hash_table_t *ht, int nrows);
-int hash_table_insert(hash_table_t *ht, const void *key, void *data);
+int hash_table_insert(hash_table_t *ht, void *key, void *data);
 int hash_table_replace(hash_table_t *ht, const void *key, void *data);
 int hash_table_find(hash_table_t *ht, const void *key, void *dataptr);
 int hash_table_remove(hash_table_t *ht, const void *key, void *dataptr);
Index: eggdrop1.9/lib/eggdrop/ident.c
diff -u eggdrop1.9/lib/eggdrop/ident.c:1.5 eggdrop1.9/lib/eggdrop/ident.c:1.6
--- eggdrop1.9/lib/eggdrop/ident.c:1.5	Thu Dec  1 09:02:32 2005
+++ eggdrop1.9/lib/eggdrop/ident.c	Mon Oct  2 23:02:12 2006
@@ -18,7 +18,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: ident.c,v 1.5 2005-12-01 15:02:32 stdarg Exp $";
+static const char rcsid[] = "$Id: ident.c,v 1.6 2006-10-03 04:02:12 sven Exp $";
 #endif
 
 #include <stdio.h>
@@ -34,14 +34,15 @@
 	int their_port, our_port;
 	int idx;
 	int timeout;
-	int (*callback)();
+	ident_callback_t *callback;
 	void *client_data;
+	event_owner_t *owner;
 } ident_info_t;
 
 static int ident_on_connect(void *client_data, int idx, const char *peer_ip, int peer_port);
 static int ident_on_read(void *client_data, int idx, char *data, int len);
 static int ident_on_eof(void *client_data, int idx, int err, const char *errmsg);
-static int ident_result(void *client_data, const char *ident);
+static int ident_result(ident_info_t *ident_info, const char *ident);
 
 static sockbuf_handler_t ident_handler = {
 	"ident",
@@ -54,7 +55,7 @@
 
 
 /* Perform an async ident lookup and call 'callback' with the result. */
-int egg_ident_lookup(const char *ip, int their_port, int our_port, int timeout, int (*callback)(), void *client_data)
+int egg_ident_lookup(const char *ip, int their_port, int our_port, int timeout, ident_callback_t *callback, void *client_data, event_owner_t *owner)
 {
 	static int ident_id = 0;
 	int idx;
@@ -63,6 +64,7 @@
 	idx = egg_connect(ip, 113, -1);
 	if (idx < 0) {
 		callback(client_data, ip, their_port, NULL);
+		if (owner && owner->on_delete) owner->on_delete(owner, client_data);
 		return(-1);
 	}
 	ident_info = calloc(1, sizeof(*ident_info));
@@ -72,6 +74,7 @@
 	ident_info->timeout = timeout;
 	ident_info->callback = callback;
 	ident_info->client_data = client_data;
+	ident_info->owner = owner;
 	ident_info->idx = idx;
 	ident_info->id = ident_id++;
 	ident_info->next = ident_head;
@@ -97,11 +100,34 @@
 	if (issue_callback) {
 		ptr->callback(ptr->client_data, ptr->ip, ptr->their_port, NULL);
 	}
+	if (ptr->owner && ptr->owner->on_delete) ptr->owner->on_delete(ptr->owner, ptr->client_data);
 	free(ptr->ip);
 	free(ptr);
 	return(0);
 }
 
+int egg_ident_cancel_by_owner(egg_module_t *module, void *script)
+{
+	int removed = 0;
+	ident_info_t *ptr, *prev = NULL, *next;
+
+	for (ptr = ident_head; ptr; ptr = next) {
+		next = ptr->next;
+		if (!ptr->owner || ptr->owner->module != module || (script && ptr->owner->client_data != script)) {
+			prev = ptr;
+			continue;
+		}
+		if (prev) prev->next = ptr->next;
+		else ident_head = ptr->next;
+		++removed;
+		sockbuf_delete(ptr->idx);
+		if (ptr->owner && ptr->owner->on_delete) ptr->owner->on_delete(ptr->owner, ptr->client_data);
+		free(ptr->ip);
+		free(ptr);
+	}
+	return removed;
+}
+
 static int ident_on_connect(void *client_data, int idx, const char *peer_ip, int peer_port)
 {
 	ident_info_t *ident_info = client_data;
@@ -132,7 +158,7 @@
 	ident = strchr(colon, ':');
 	if (!ident) goto ident_error;
 	ident++;
-	while (isspace(*ident)) ident++;
+	while (*ident && isspace(*ident)) ident++;
 
 	/* Replace bad chars. */
 	len = strlen(ident);
@@ -143,6 +169,7 @@
 		}
 		if (!isalnum(ident[i]) && ident[i] != '_') ident[i] = 'x';
 	}
+	if (!*ident) goto ident_error;
 	if (len > 20) ident[20] = 0;
 	ident_result(client_data, ident);
 	return(0);
@@ -158,9 +185,8 @@
 	return(0);
 }
 
-static int ident_result(void *client_data, const char *ident)
+static int ident_result(ident_info_t *ident_info, const char *ident)
 {
-	ident_info_t *ident_info = client_data;
 	ident_info_t *ptr, *prev = NULL;
 	
 	for (ptr = ident_head; ptr; ptr = ptr->next) {
@@ -173,6 +199,7 @@
 
 	sockbuf_delete(ident_info->idx);
 	ident_info->callback(ident_info->client_data, ident_info->ip, ident_info->their_port, ident);
+	if (ident_info->owner && ident_info->owner->on_delete) ident_info->owner->on_delete(ident_info->owner, ident_info->client_data);
 	free(ident_info->ip);
 	free(ident_info);
 	return(0);
Index: eggdrop1.9/lib/eggdrop/ident.h
diff -u eggdrop1.9/lib/eggdrop/ident.h:1.1 eggdrop1.9/lib/eggdrop/ident.h:1.2
--- eggdrop1.9/lib/eggdrop/ident.h:1.1	Mon Jun 21 15:35:11 2004
+++ eggdrop1.9/lib/eggdrop/ident.h	Mon Oct  2 23:02:12 2006
@@ -16,13 +16,16 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  *
- * $Id: ident.h,v 1.1 2004-06-21 20:35:11 wingman Exp $
+ * $Id: ident.h,v 1.2 2006-10-03 04:02:12 sven Exp $
  */
 
 #ifndef _EGG_IDENT_H_
 #define _EGG_IDENT_H_
 
-int egg_ident_lookup(const char *ip, int their_port, int our_port, int timeout, int (*callback)(), void *client_data);
+typedef int ident_callback_t(void *client_data, const char *ip, int port, const char *ident);
+
+int egg_ident_lookup(const char *ip, int their_port, int our_port, int timeout, ident_callback_t *callback, void *client_data, event_owner_t *owner);
 int egg_ident_cancel(int id, int issue_callback);
+int egg_ident_cancel_by_owner(struct egg_module *module, void *script);
 
 #endif /* !_EGG_IDENT_H_ */
Index: eggdrop1.9/lib/eggdrop/module.c
diff -u eggdrop1.9/lib/eggdrop/module.c:1.10 eggdrop1.9/lib/eggdrop/module.c:1.11
--- eggdrop1.9/lib/eggdrop/module.c:1.10	Tue Aug 22 00:21:01 2006
+++ eggdrop1.9/lib/eggdrop/module.c	Mon Oct  2 23:02:12 2006
@@ -18,7 +18,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: module.c,v 1.10 2006-08-22 05:21:01 sven Exp $";
+static const char rcsid[] = "$Id: module.c,v 1.11 2006-10-03 04:02:12 sven Exp $";
 #endif
 
 #include <eggdrop/eggdrop.h>
@@ -146,8 +146,7 @@
 		retval = (entry->modinfo.close_func)(why);
 		if (retval) return(-3);
 	}
-	kill_binds_by_module(&entry->modinfo);
-	timer_destroy_by_module(&entry->modinfo);
+	script_remove_events_by_owner(&entry->modinfo, 0);
 
 	lt_dlclose(entry->hand);
 	if (prev) prev->next = entry->next;
Index: eggdrop1.9/lib/eggdrop/net.h
diff -u eggdrop1.9/lib/eggdrop/net.h:1.2 eggdrop1.9/lib/eggdrop/net.h:1.3
--- eggdrop1.9/lib/eggdrop/net.h:1.2	Tue Jun 22 13:47:28 2004
+++ eggdrop1.9/lib/eggdrop/net.h	Mon Oct  2 23:02:12 2006
@@ -16,7 +16,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  *
- * $Id: net.h,v 1.2 2004-06-22 18:47:28 wingman Exp $
+ * $Id: net.h,v 1.3 2006-10-03 04:02:12 sven Exp $
  */
 
 #ifndef _EGG_NET_H_
@@ -37,7 +37,6 @@
 int egg_listen(int port, int *real_port);
 int egg_connect(const char *host, int port, int timeout);
 int egg_reconnect(int idx, const char *host, int port, int timeout);
-int egg_ident_lookup(const char *ip, int their_port, int our_port, int timeout, int (*callback)(), void *client_data);
 
 /* Proxy interface functions. */
 int egg_proxy_add(egg_proxy_t *proxy);
Index: eggdrop1.9/lib/eggdrop/script.c
diff -u eggdrop1.9/lib/eggdrop/script.c:1.23 eggdrop1.9/lib/eggdrop/script.c:1.24
--- eggdrop1.9/lib/eggdrop/script.c:1.23	Mon Sep 11 20:50:50 2006
+++ eggdrop1.9/lib/eggdrop/script.c	Mon Oct  2 23:02:12 2006
@@ -18,7 +18,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: script.c,v 1.23 2006-09-12 01:50:50 sven Exp $";
+static const char rcsid[] = "$Id: script.c,v 1.24 2006-10-03 04:02:12 sven Exp $";
 #endif
 
 #include <eggdrop/eggdrop.h>
@@ -89,6 +89,17 @@
 	return (0);
 }
 
+int script_remove_events_by_owner(egg_module_t *module, void *script)
+{
+	int removed = 0;
+
+	removed += kill_binds_by_owner(module, script);
+	removed += timer_destroy_by_owner(module, script);
+	removed += egg_dns_cancel_by_owner(module, script);
+	removed += egg_ident_cancel_by_owner(module, script);
+	return removed;
+}
+
 /* Called by scripting modules to register themselves. */
 int script_register_module(script_module_t *module)
 {
Index: eggdrop1.9/lib/eggdrop/script.h
diff -u eggdrop1.9/lib/eggdrop/script.h:1.18 eggdrop1.9/lib/eggdrop/script.h:1.19
--- eggdrop1.9/lib/eggdrop/script.h:1.18	Mon Sep 11 20:50:50 2006
+++ eggdrop1.9/lib/eggdrop/script.h	Mon Oct  2 23:02:13 2006
@@ -16,7 +16,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  *
- * $Id: script.h,v 1.18 2006-09-12 01:50:50 sven Exp $
+ * $Id: script.h,v 1.19 2006-10-03 04:02:13 sven Exp $
  */
 
 #ifndef _EGG_SCRIPT_H_
@@ -174,6 +174,7 @@
 
 extern int script_init(void);
 extern int script_shutdown(void);
+extern int script_remove_events_by_owner(egg_module_t *module, void *script);
 
 extern int script_load(char *filename);
 extern int script_link_vars(script_linked_var_t *table);
Index: eggdrop1.9/lib/eggdrop/timer.c
diff -u eggdrop1.9/lib/eggdrop/timer.c:1.12 eggdrop1.9/lib/eggdrop/timer.c:1.13
--- eggdrop1.9/lib/eggdrop/timer.c:1.12	Mon Jan  2 21:00:17 2006
+++ eggdrop1.9/lib/eggdrop/timer.c	Mon Oct  2 23:02:13 2006
@@ -18,7 +18,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: timer.c,v 1.12 2006-01-03 03:00:17 guppy Exp $";
+static const char rcsid[] = "$Id: timer.c,v 1.13 2006-10-03 04:02:13 sven Exp $";
 #endif
 
 #include <eggdrop/eggdrop.h>
@@ -225,16 +225,18 @@
 	return(0);
 }
 
-void timer_destroy_by_module(egg_module_t *module)
+int timer_destroy_by_owner(egg_module_t *module, void *script)
 {
+	int removed = 0;
 	egg_timer_t *timer, *prev = 0, *next;
 
 	for (timer = timer_list_head; timer; timer = next) {
 		next = timer->next;
 
-		if (timer->owner && timer->owner->module == module) {
+		if (timer->owner && timer->owner->module == module && (!script || timer->owner->client_data == script)) {
 			if (prev) prev->next = timer->next;
 			else timer_list_head = timer->next;
+			++removed;
 
 			if (timer->owner && timer->owner->on_delete) timer->owner->on_delete(timer->owner, timer->client_data);
 			if (timer->name) free(timer->name);
@@ -243,6 +245,7 @@
 			prev = timer;
 		}
 	}
+	return removed;
 }
 
 int timer_get_shortest(egg_timeval_t *howlong)
@@ -319,7 +322,7 @@
 
 char *timer_get_timestamp(void)
 {
-        time_t now_secs = (time_t)now.sec;
+	time_t now_secs = (time_t)now.sec;
 	int len;
 
 	while (1) {
Index: eggdrop1.9/lib/eggdrop/timer.h
diff -u eggdrop1.9/lib/eggdrop/timer.h:1.5 eggdrop1.9/lib/eggdrop/timer.h:1.6
--- eggdrop1.9/lib/eggdrop/timer.h:1.5	Wed Dec 28 11:27:31 2005
+++ eggdrop1.9/lib/eggdrop/timer.h	Mon Oct  2 23:02:13 2006
@@ -16,7 +16,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  *
- * $Id: timer.h,v 1.5 2005-12-28 17:27:31 sven Exp $
+ * $Id: timer.h,v 1.6 2006-10-03 04:02:13 sven Exp $
  */
 
 #ifndef _EGG_TIMER_H_
@@ -58,7 +58,7 @@
 extern int timer_create_complex(egg_timeval_t *howlong, const char *name, Function callback, void *client_data, int flags, event_owner_t *owner);
 extern int timer_destroy(int timer_id);
 extern int timer_destroy_all();
-extern void timer_destroy_by_module(egg_module_t *module);
+extern int timer_destroy_by_owner(egg_module_t *module, void *script);
 extern int timer_get_shortest(egg_timeval_t *howlong);
 extern int timer_run();
 extern egg_timer_t *timer_list();
Index: eggdrop1.9/modules/dccparty/dccparty.c
diff -u eggdrop1.9/modules/dccparty/dccparty.c:1.12 eggdrop1.9/modules/dccparty/dccparty.c:1.13
--- eggdrop1.9/modules/dccparty/dccparty.c:1.12	Mon Sep 11 20:50:50 2006
+++ eggdrop1.9/modules/dccparty/dccparty.c	Mon Oct  2 23:02:13 2006
@@ -18,7 +18,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: dccparty.c,v 1.12 2006-09-12 01:50:50 sven Exp $";
+static const char rcsid[] = "$Id: dccparty.c,v 1.13 2006-10-03 04:02:13 sven Exp $";
 #endif
 
 #include <eggdrop/eggdrop.h>
@@ -120,7 +120,7 @@
 	session->count = 0;
 
 	/* Start lookups. */
-	session->ident_id = egg_ident_lookup(peer_ip, peer_port, our_port, -1, ident_result, session);
+	session->ident_id = egg_ident_lookup(peer_ip, peer_port, our_port, -1, ident_result, session, &dcc_owner);
 	session->dns_id = egg_dns_reverse(peer_ip, -1, dns_result, session, &dcc_owner);
 
 	return(0);
Index: eggdrop1.9/modules/ircparty/ircparty.c
diff -u eggdrop1.9/modules/ircparty/ircparty.c:1.15 eggdrop1.9/modules/ircparty/ircparty.c:1.16
--- eggdrop1.9/modules/ircparty/ircparty.c:1.15	Mon Sep 11 20:50:50 2006
+++ eggdrop1.9/modules/ircparty/ircparty.c	Mon Oct  2 23:02:13 2006
@@ -18,7 +18,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: ircparty.c,v 1.15 2006-09-12 01:50:50 sven Exp $";
+static const char rcsid[] = "$Id: ircparty.c,v 1.16 2006-10-03 04:02:13 sven Exp $";
 #endif
 
 #include <eggdrop/eggdrop.h>
@@ -138,7 +138,7 @@
 	}
 
 	/* Start lookups. */
-	session->ident_id = egg_ident_lookup(peer_ip, peer_port, irc_port, -1, ident_result, session);
+	session->ident_id = egg_ident_lookup(peer_ip, peer_port, irc_port, -1, ident_result, session, &irc_owner);
 	session->dns_id = egg_dns_reverse(peer_ip, -1, dns_result, session, &irc_owner);
 
 	return(0);
Index: eggdrop1.9/modules/script/scriptbind.c
diff -u eggdrop1.9/modules/script/scriptbind.c:1.17 eggdrop1.9/modules/script/scriptbind.c:1.18
--- eggdrop1.9/modules/script/scriptbind.c:1.17	Mon Jun 19 10:47:33 2006
+++ eggdrop1.9/modules/script/scriptbind.c	Mon Oct  2 23:02:13 2006
@@ -18,7 +18,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: scriptbind.c,v 1.17 2006-06-19 15:47:33 stdarg Exp $";
+static const char rcsid[] = "$Id: scriptbind.c,v 1.18 2006-10-03 04:02:13 sven Exp $";
 #endif
 
 #include <eggdrop/eggdrop.h>
@@ -32,7 +32,6 @@
 static int script_bind(char *table_name, char *flags, char *mask, script_callback_t *callback)
 {
 	bind_table_t *table;
-	int retval;
 
 	table = bind_table_lookup(table_name);
 	if (!table) {
Index: eggdrop1.9/modules/telnetparty/telnetparty.c
diff -u eggdrop1.9/modules/telnetparty/telnetparty.c:1.21 eggdrop1.9/modules/telnetparty/telnetparty.c:1.22
--- eggdrop1.9/modules/telnetparty/telnetparty.c:1.21	Mon Sep 11 20:50:51 2006
+++ eggdrop1.9/modules/telnetparty/telnetparty.c	Mon Oct  2 23:02:13 2006
@@ -18,7 +18,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: telnetparty.c,v 1.21 2006-09-12 01:50:51 sven Exp $";
+static const char rcsid[] = "$Id: telnetparty.c,v 1.22 2006-10-03 04:02:13 sven Exp $";
 #endif
 
 #include <eggdrop/eggdrop.h>
@@ -319,7 +319,7 @@
 	}
 
 	/* Start lookups. */
-	session->ident_id = egg_ident_lookup(peer_ip, peer_port, telnet_port, -1, ident_result, session);
+	session->ident_id = egg_ident_lookup(peer_ip, peer_port, telnet_port, -1, ident_result, session, &telnet_owner);
 	session->dns_id = egg_dns_reverse(peer_ip, -1, dns_result, session, &telnet_owner);
 
 	return(0);
----------------------- End of diff -----------------------



More information about the Changes mailing list