]> jfr.im git - irc/quakenet/newserv.git/blobdiff - newsearch/ns-authts.c
LUA: add function for channel chanop notice
[irc/quakenet/newserv.git] / newsearch / ns-authts.c
index 46b02bfa7e4d34c69b5081441b9b7d46cd8ca417..5551d5aba069209af11a79000d025ba865f3e457 100644 (file)
@@ -7,17 +7,12 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-void *authts_exe(struct searchNode *thenode, void *theinput);
-void authts_free(struct searchNode *thenode);
+void *authts_exe(searchCtx *ctx, struct searchNode *thenode, void *theinput);
+void authts_free(searchCtx *ctx, struct searchNode *thenode);
 
-struct searchNode *authts_parse(int type, int argc, char **argv) {
+struct searchNode *authts_parse(searchCtx *ctx, int argc, char **argv) {
   struct searchNode *thenode;
 
-  if (type != SEARCHTYPE_NICK) {
-    parseError = "authts: 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;
@@ -31,7 +26,7 @@ struct searchNode *authts_parse(int type, int argc, char **argv) {
   return thenode;
 }
 
-void *authts_exe(struct searchNode *thenode, void *theinput) {
+void *authts_exe(searchCtx *ctx, struct searchNode *thenode, void *theinput) {
   nick *np = (nick *)theinput;
 
   if (IsAccount(np))
@@ -41,6 +36,6 @@ void *authts_exe(struct searchNode *thenode, void *theinput) {
 
 }
 
-void authts_free(struct searchNode *thenode) {
+void authts_free(searchCtx *ctx, struct searchNode *thenode) {
   free(thenode);
 }