[NeoStats-Devel] [Commits] r2813 - in trunk: modules/hostserv src

[email protected] Tue, 13 Sep 2005 01:41:50 +1000
Newsgroups gmane.comp.neostats.devel
Message-ID <[email protected]>
Author: Fish
Date: Mon Sep 12 23:41:42 2005
New Revision: 2813

Modified:
   trunk/modules/hostserv/hostserv.c
   trunk/src/nsevents.c
Log:
I need to learn to read. Really fix events this time

Modified: trunk/modules/hostserv/hostserv.c
==============================================================================
--- trunk/modules/hostserv/hostserv.c	(original)
+++ trunk/modules/hostserv/hostserv.c	Mon Sep 12 23:41:42 2005
@@ -402,8 +402,8 @@
 						return -1;
 					}
 #endif
-					dlog( DEBUG2, "Regnick Mode on %s", cmdparams->av[0] );
-					ircsnprintf( vhost, MAXHOST, "%s.%s", cmdparams->av[0], hs_cfg.vhostdom );
+					dlog( DEBUG2, "Regnick Mode on %s", cmdparams->source->name );
+					ircsnprintf( vhost, MAXHOST, "%s.%s", cmdparams->source->name, hs_cfg.vhostdom );
 					irc_svshost( hs_bot, cmdparams->source, vhost );
 					irc_prefmsg( hs_bot, cmdparams->source, "Setting your host to %s", vhost );
 					if( hs_cfg.verbose ) {

Modified: trunk/src/nsevents.c
==============================================================================
--- trunk/src/nsevents.c	(original)
+++ trunk/src/nsevents.c	Mon Sep 12 23:41:42 2005
@@ -295,7 +295,7 @@
 	dlog( DEBUG5, "AddEvent: adding %s to %s", EventStrings[eventptr->event], mod_ptr->info->name );
 
 	/* only standard modules have a handler, perl mods use a custom callback */
-	if (!eventptr->flags & EVENT_FLAG_PERLCALL) {
+	if (!(eventptr->flags & EVENT_FLAG_PERLCALL)) {
 		if(!eventptr->handler )
 		{
 			nlog( LOG_ERROR, "AddEvent: missing handler for %s in module %s", EventStrings[eventptr->event], mod_ptr->info->name );
@@ -305,7 +305,7 @@
 			mod_ptr->event_list = ns_calloc( sizeof( ModuleEvent * ) * EVENT_COUNT );
 		mod_ptr->event_list[eventptr->event] = eventptr;
 	} else {
-		if( !(mod_ptr->pm && mod_ptr->pm->event_list) )
+		if( (mod_ptr->pm && !mod_ptr->pm->event_list) )
 			mod_ptr->pm->event_list = ns_calloc( sizeof( ModuleEvent * ) * EVENT_COUNT );
 		mod_ptr->pm->event_list[eventptr->event] = eventptr;
 	}