[NeoStats-Devel] [Commits] rev 4 - trunk

[email protected]
Newsgroups gmane.comp.neostats.devel
Message-ID <[email protected]>
Author: DNB
Date: Wed Mar 16 09:57:33 2005
New Revision: 4

Modified:
   trunk/events.c
Log:
fix bug introduced in last update when no message data during event

Modified: trunk/events.c
==============================================================================
--- trunk/events.c	(original)
+++ trunk/events.c	Wed Mar 16 09:57:33 2005
@@ -28,7 +28,10 @@
  * Signon Events
 */
 int SeenSignon (CmdParams *cmdparams) {
-	addseenentry(cmdparams->source->name, cmdparams->source->user->username, cmdparams->source->user->hostname, cmdparams->source->user->vhost, cmdparams->param, SS_CONNECTED);
+	char tmpmsg[512];
+
+	ircsnprintf(tmpmsg, 512, "%s", cmdparams->param);
+	addseenentry(cmdparams->source->name, cmdparams->source->user->username, cmdparams->source->user->hostname, cmdparams->source->user->vhost, tmpmsg, SS_CONNECTED);
 	return NS_SUCCESS;
 }
 
@@ -58,7 +61,10 @@
  * Nick Events
 */
 int SeenNickChange (CmdParams *cmdparams) {
-	addseenentry(cmdparams->param, cmdparams->source->user->username, cmdparams->source->user->hostname, cmdparams->source->user->vhost, cmdparams->source->name, SS_NICKCHANGE);
+	char tmpmsg[512];
+
+	ircsnprintf(tmpmsg, 512, "%s", cmdparams->source->name);
+	addseenentry(cmdparams->param, cmdparams->source->user->username, cmdparams->source->user->hostname, cmdparams->source->user->vhost, tmpmsg, SS_NICKCHANGE);
 	return NS_SUCCESS;
 }
 
@@ -66,10 +72,13 @@
  * Join Events
 */
 int SeenJoinChan (CmdParams *cmdparams) {
+	char tmpmsg[512];
+
 	if (is_hidden_chan(cmdparams->channel)) {
 		return NS_SUCCESS;
 	}
-	addseenentry(cmdparams->source->name, cmdparams->source->user->username, cmdparams->source->user->hostname, cmdparams->source->user->vhost, cmdparams->channel->name, SS_JOIN);
+	ircsnprintf(tmpmsg, 512, "%s", cmdparams->channel->name);
+	addseenentry(cmdparams->source->name, cmdparams->source->user->username, cmdparams->source->user->hostname, cmdparams->source->user->vhost, tmpmsg, SS_JOIN);
 	return NS_SUCCESS;
 }
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.