[NeoStats-Devel] [Commits] r2615 - trunk/src

[email protected]
Newsgroups gmane.comp.neostats.devel
Message-ID <[email protected]>
Author: Mark
Date: Mon May 23 04:06:36 2005
New Revision: 2615

Modified:
   trunk/src/bots.c
Log:
improve error messages when AddBot fails

Modified: trunk/src/bots.c
==============================================================================
--- trunk/src/bots.c	(original)
+++ trunk/src/bots.c	Mon May 23 04:06:36 2005
@@ -634,12 +634,12 @@
 		return(ns_botptr );
 	}
 	if( GetBotNick( botinfo, nick ) == NULL ) {
-		nlog( LOG_WARNING, "Unable to init bot" );
+		nlog( LOG_WARNING, "Unable to find free nick for bot %s", botinfo->nick );
 		return NULL;
 	}
 	botptr = new_bot( nick );
 	if( !botptr ) {
-		nlog( LOG_WARNING, "new_bot failed for module %s bot %s", modptr->info->name, nick );
+		nlog( LOG_WARNING, "Unable to create bot %s", modptr->info->name, nick );
 		return NULL;
 	}
 	botptr->moduleptr = modptr;
@@ -655,12 +655,11 @@
 		add_bot_cmd_list( botptr, botinfo->bot_cmd_list );
 		add_bot_setting_list( botptr, botinfo->bot_setting_list );
 		/* Do not add set botinfo options for root bot */
-		if( !( botptr->flags & 0x80000000 ) ) {
+		if( !( botptr->flags & 0x80000000 ) )
 			add_bot_info_settings( botptr, botinfo );
-		}
-		if( botptr->moduleptr->info->flags & MODULE_FLAG_LOCAL_EXCLUDES ) {
+		/* Create module exclusion command handlers if needed */
+		if( botptr->moduleptr->info->flags & MODULE_FLAG_LOCAL_EXCLUDES )
 			add_bot_cmd_list( botptr, GetModExcludeCommands( botptr->moduleptr ) );
-		}
 	}
 	return botptr;
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.