]> jfr.im git - irc/quakenet/newserv.git/blobdiff - chanserv/newsearch/csns-qlasthost.c
HELPMOD2: don't ignore +h clients
[irc/quakenet/newserv.git] / chanserv / newsearch / csns-qlasthost.c
index 0aba845285ce2654193ccca4782ebabee3d81c23..ee96e3e502165a3ff0b686db64fb77f95e41f2c2 100644 (file)
 void *qlasthost_exe(searchCtx *ctx, struct searchNode *thenode, void *theinput);
 void qlasthost_free(searchCtx *ctx, struct searchNode *thenode);
 
-struct searchNode *qlasthost_parse(searchCtx *ctx, int type, int argc, char **argv) {
+struct searchNode *qlasthost_parse(searchCtx *ctx, int argc, char **argv) {
   struct searchNode *thenode;
 
-  if (type != SEARCHTYPE_USER) {
-    parseError = "qlasthost: this function is only valid for user searches.";
-    return NULL;
-  }
-
   if (!(thenode=(struct searchNode *)malloc(sizeof (struct searchNode)))) {
     parseError = "malloc: could not allocate memory for this search.";
     return NULL;
@@ -32,7 +27,7 @@ struct searchNode *qlasthost_parse(searchCtx *ctx, int type, int argc, char **ar
 
 void *qlasthost_exe(searchCtx *ctx, struct searchNode *thenode, void *theinput) {
   authname *ap = (authname *)theinput;
-  reguser *rup = ap->exts[chanservext];
+  reguser *rup = ap->exts[chanservaext];
   if(!rup || !rup->lastuserhost)
     return "";