]> jfr.im git - irc/quakenet/newserv.git/blobdiff - newsearch/ns-ip.c
LUA: add function for channel chanop notice
[irc/quakenet/newserv.git] / newsearch / ns-ip.c
index a96f7f1d7c44c1699a804e80f4db9a48b590e129..5bd84e5cb89d6d08750b0c62cb9222425f0a267c 100644 (file)
 void *ip_exe(searchCtx *ctx, struct searchNode *thenode, void *theinput);
 void ip_free(searchCtx *ctx, struct searchNode *thenode);
 
-struct searchNode *ip_parse(searchCtx *ctx, int type, int argc, char **argv) {
+struct searchNode *ip_parse(searchCtx *ctx, int argc, char **argv) {
   struct searchNode *thenode;
 
-  if (type != SEARCHTYPE_NICK) {
-    parseError = "ip: this function is only valid for nick searches.";
-    return NULL;
-  }
-
   if (!(thenode=(struct searchNode *)malloc(sizeof (struct searchNode)))) {
     parseError = "malloc: could not allocate memory for this search.";
     return NULL;
@@ -34,7 +29,7 @@ struct searchNode *ip_parse(searchCtx *ctx, int type, int argc, char **argv) {
 void *ip_exe(searchCtx *ctx, struct searchNode *thenode, void *theinput) {
   nick *np = (nick *)theinput;
 
-  return (void *)IPtostr(np->p_ipaddr);
+  return (void *)IPtostr(np->ipaddress);
 }
 
 void ip_free(searchCtx *ctx, struct searchNode *thenode) {