]> jfr.im git - irc/quakenet/newserv.git/blobdiff - chanprofile/chanprofile.c
A4STATS: remove E style escapes and switch to createtable for indices
[irc/quakenet/newserv.git] / chanprofile / chanprofile.c
index aec6f7752d1a434819d147b0f4c6a08f6c85c716..a4c4a8dc03235e58c55eaeb03a26dcc0504f2e2b 100644 (file)
@@ -3,6 +3,9 @@
 #include "../channel/channel.h"
 #include "../control/control.h"
 #include "../newsearch/newsearch.h"
+#include "../lib/version.h"
+
+MODULE_VERSION("");
 
 #include <stdio.h>
 #include <string.h>
@@ -24,7 +27,7 @@ struct chanprofile *getcprec(nick *np) {
   
   for (i=0;i<np->channels->cursi;i++) {
     clen+=cs[i]->index->name->length;
-    hash ^= (unsigned int )cs[i];
+    hash ^= (unsigned long)cs[i];
   }
   
   mhash=hash%CPHASHSIZE;
@@ -109,7 +112,8 @@ void reportprofile(nick *sender, struct chanprofile *cpp) {
   char buf[1024];
   unsigned int repwidth=80;
   unsigned int bufpos;
-  
+  searchCtx ctx;
+
   controlreply(sender,"============================================================");
 
   if (cpp->ccount==0) {
@@ -136,9 +140,10 @@ void reportprofile(nick *sender, struct chanprofile *cpp) {
     controlreply(sender," %s",buf);
     
   controlreply(sender,"Users (%u):",cpp->clones);
-  
+
+  ctx.reply = controlreply;
   for (i=0;i<cpp->clones;i++) {
-    printnick(sender,cpp->nicks[i]);
+    printnick(&ctx, sender,cpp->nicks[i]);
   }
 }
 
@@ -169,6 +174,8 @@ int reportprofiles(void *source, int cargc, char **cargv) {
     reportprofile(sender,cpary[i]);
   }
    
+  free(cpary);
+
   controlreply(sender,"--- End of list."); 
 
   clearprofiles();