[NeoStats-Devel] [Commits] r2734 - in trunk: include src

[email protected] Mon, 15 Aug 2005 06:43:38 +1000
Newsgroups gmane.comp.neostats.devel
Message-ID <[email protected]>
Author: Mark
Date: Mon Aug 15 04:43:35 2005
New Revision: 2734

Modified:
   trunk/include/exclude.h
   trunk/src/bots.c
   trunk/src/exclude.c
   trunk/src/nsdba.c
Log:
tidy up modexclude command setup and add debug text to database closing

Modified: trunk/include/exclude.h
==============================================================================
--- trunk/include/exclude.h	(original)
+++ trunk/include/exclude.h	Mon Aug 15 04:43:35 2005
@@ -35,8 +35,8 @@
 int InitExcludes( void );
 void FiniExcludes( void );
 int InitModExcludes( Module *mod_ptr );
+void AddBotExcludeCommands( Bot *botptr );
 void FiniModExcludes( Module *mod_ptr );
-bot_cmd *GetModExcludeCommands( Module *mod_ptr );
 
 void ns_do_exclude_chan( Channel *c );
 void ns_do_exclude_server( Client *s );

Modified: trunk/src/bots.c
==============================================================================
--- trunk/src/bots.c	(original)
+++ trunk/src/bots.c	Mon Aug 15 04:43:35 2005
@@ -712,7 +712,7 @@
 			add_bot_info_settings( botptr, botinfo );
 		/* Create module exclusion command handlers if needed */
 		if( botptr->moduleptr->info->flags & MODULE_FLAG_LOCAL_EXCLUDES )
-			add_bot_cmd_list( botptr, GetModExcludeCommands( botptr->moduleptr ) );
+			AddBotExcludeCommands( botptr );
 	}
 	return botptr;
 }

Modified: trunk/src/exclude.c
==============================================================================
--- trunk/src/exclude.c	(original)
+++ trunk/src/exclude.c	Mon Aug 15 04:43:35 2005
@@ -492,7 +492,7 @@
 	return NS_FALSE;
 }
 
-bot_cmd *GetModExcludeCommands( Module *mod_ptr )
+void AddBotExcludeCommands( Bot *botptr )
 {
-	return bot_cmd_lists[mod_ptr->modnum];
+	add_bot_cmd_list( botptr, bot_cmd_lists[botptr->moduleptr->modnum] );
 }

Modified: trunk/src/nsdba.c
==============================================================================
--- trunk/src/nsdba.c	(original)
+++ trunk/src/nsdba.c	Mon Aug 15 04:43:35 2005
@@ -146,6 +146,7 @@
 		hash_scan_begin( &ts, dbe->tablehash );
 		while(( tnode = hash_scan_next( &ts ) ) != NULL  ) {
 			tbe = (tableentry *) hnode_get( tnode );
+			dlog(DEBUG1, "Closing Table %s", tbe->name);
 			DBACloseTable( tbe->table );
 			hash_scan_delete( dbe->tablehash, tnode );
 			hnode_destroy( tnode );
@@ -203,9 +204,11 @@
 	node = hash_lookup( dbhash, GET_CUR_MODNAME() );
 	if (node) {
 		dbe = ( dbentry* )hnode_get( node );
+		dlog(DEBUG1, "Closing Database %s", dbe->name);
 		hash_scan_begin( &ts, dbe->tablehash );
 		while(( tnode = hash_scan_next( &ts ) ) != NULL  ) {
 			tbe = (tableentry *) hnode_get( tnode );
+			dlog(DEBUG1, "Closing Table %s", tbe->name);
 			DBMCloseTable( tbe->handle );
 			hash_delete( dbe->tablehash, tnode );
 			hnode_destroy( tnode );