]> jfr.im git - irc/quakenet/newserv.git/commitdiff
Add controlid function.
authorChris Porter <redacted>
Mon, 13 Oct 2008 04:45:45 +0000 (05:45 +0100)
committerChris Porter <redacted>
Mon, 13 Oct 2008 04:45:45 +0000 (05:45 +0100)
control/control.c
control/control.h

index 335f0f028ded76da93efc1fca6c68005b748d2d6..d29f93876f6cf46f134ea9d3827257be6a0f64fd 100644 (file)
@@ -720,3 +720,12 @@ void controldestroycmdext(void *ext) {
     free( ((cmdhelp *)ext)->helpstr);
   free(ext);
 }
+
+char *controlid(nick *np) {
+  static char buf[512];
+
+  snprintf(buf, sizeof(buf), "%s!%s@%s/%s", np->nick, np->ident, np->host->name->content, np->authname);
+
+  return buf;
+}
+
index 517c99ae0b1b77e80b84612b1b53e7e1073b6f50..a72d2649f2f1e552d849b662eba1fa3d8f25c8ac 100644 (file)
@@ -43,6 +43,7 @@ void controlspecialrmmod(void *arg);
 void controlspecialreloadmod(void *arg);
 void controlhelp(nick *np, Command *cmd);
 void controlnswall(int noticelevel, char *format, ...) __attribute__ ((format (printf, 2, 3)));
+char *controlid(nick *);
 
 /* NEVER USE THE FOLLOWING IN COMMANDS, you'll end up missing bits off and users'll end up being able to gline people */
 #define __NO_ANYONE      0x000