[cvslog] Module eggdrop1.6: Change committed

cvslog cvs at tsss.org
Sun Oct 14 09:26:01 CST 2001


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.6
Commit time: 2001-10-14 14:25:40 UTC
Commited by: Matthew Hallacy <poptix at techmonkeys.org>

Modified files:
     src/mod/uptime.mod/uptime.c

Log message:

Since we're running the uptime stats now, we're free to send the server
again, as per guppy's request.

---------------------- diff included ----------------------
Index: eggdrop1.6/src/mod/uptime.mod/uptime.c
diff -u eggdrop1.6/src/mod/uptime.mod/uptime.c:1.11 eggdrop1.6/src/mod/uptime.mod/uptime.c:1.12
--- eggdrop1.6/src/mod/uptime.mod/uptime.c:1.11	Wed Oct  3 10:58:07 2001
+++ eggdrop1.6/src/mod/uptime.mod/uptime.c	Sun Oct 14 09:25:30 2001
@@ -1,6 +1,6 @@
 /* Original Copyright (c) 2000-2001 proton
  * 
- * $Id: uptime.c,v 1.11 2001/10/03 15:58:07 poptix Exp $
+ * $Id: uptime.c,v 1.12 2001/10/14 14:25:30 poptix Exp $
  * Borrowed from Emech, reports to http://uptime.energymech.net, feel free to opt out if you
  * dont like it by not loading the module.
  * 
@@ -143,8 +143,8 @@
 	struct  sockaddr_in sai;
 	struct  stat st;
 	PackUp  *mem;
-	int     len;
-        char    s[10]="server";
+	int     len, servidx = findanyidx(serv);
+
 	uptimecookie = (uptimecookie + 1) * 18457;
 	upPack.cookie = htonl(uptimecookie);
 	upPack.now2 = htonl(time(NULL));
@@ -160,16 +160,15 @@
 		if (uptimeip == -1)
 			return -2;
 	}
-	len = sizeof(upPack) + strlen(botnetnick) + strlen(s) + strlen(uptime_version);
+	len = sizeof(upPack) + strlen(botnetnick) + strlen(dcc[servidx].host) + strlen(uptime_version);
 	mem = (PackUp*)nmalloc(len);
 	memcpy(mem,&upPack,sizeof(upPack));
-	sprintf(mem->string,"%s %s %s",botnetnick,s,uptime_version);
+	sprintf(mem->string,"%s %s %s",botnetnick,dcc[servidx].host,uptime_version);
 	memset(&sai,0,sizeof(sai));
 	sai.sin_family = AF_INET;
 	sai.sin_addr.s_addr = uptimeip;
 	sai.sin_port = htons(uptimeport);
 	len = sendto(uptimesock,(void*)mem,len,0,(struct sockaddr*)&sai,sizeof(sai));
-	putlog(LOG_DEBUG, "*", "len = %d",len);
 	nfree(mem);
 	return len;
 }
----------------------- End of diff -----------------------



More information about the Changes mailing list