]> jfr.im git - irc/quakenet/newserv.git/blobdiff - newsearch/newsearch.h
Merge.
[irc/quakenet/newserv.git] / newsearch / newsearch.h
index 2dc1d0fb1ea60ced0aca9fce966b2b93d605dabc..a4414b30f2f31cf8a22714846e4cc84cab0a9277 100644 (file)
@@ -11,7 +11,6 @@
 
 #define    NSMAX_KILL_LIMIT       500
 #define    NSMAX_GLINE_LIMIT      500
-#define    NSMAX_GLINE_CLONES     5
 
 /* gline duration, in seconds */
 #define    NSGLINE_DURATION       3600
@@ -126,6 +125,7 @@ struct searchNode *modes_parse(searchCtx *ctx, int argc, char **argv);
 /* Nick functions (various types) */
 struct searchNode *hostmask_parse(searchCtx *ctx, int argc, char **argv);
 struct searchNode *realname_parse(searchCtx *ctx, int argc, char **argv);
+struct searchNode *away_parse(searchCtx *ctx, int argc, char **argv);
 struct searchNode *authname_parse(searchCtx *ctx, int argc, char **argv);
 struct searchNode *authts_parse(searchCtx *ctx, int argc, char **argv);
 struct searchNode *ident_parse(searchCtx *ctx, int argc, char **argv);
@@ -138,6 +138,7 @@ struct searchNode *channels_parse(searchCtx *ctx, int argc, char **argv);
 struct searchNode *server_parse(searchCtx *ctx, int argc, char **argv);
 struct searchNode *authid_parse(searchCtx *ctx, int argc, char **argv);
 struct searchNode *cidr_parse(searchCtx *ctx, int argc, char **argv);
+struct searchNode *ipv6_parse(searchCtx *ctx, int argc, char **argv);
 
 /* Channel functions (various types) */
 struct searchNode *exists_parse(searchCtx *ctx, int argc, char **argv);
@@ -152,9 +153,6 @@ struct searchNode *hostpct_parse(searchCtx *ctx, int argc, char **argv);
 struct searchNode *authedpct_parse(searchCtx *ctx, int argc, char **argv);
 struct searchNode *kick_parse(searchCtx *ctx, int argc, char **argv);
 
-/* Interpret a string to give a node */
-struct searchNode *search_parse(searchCtx *ctx, char *input);
-
 /* Iteration functions */
 struct searchNode *any_parse(searchCtx *ctx, int argc, char **argv);
 struct searchNode *all_parse(searchCtx *ctx, int argc, char **argv);
@@ -185,6 +183,10 @@ void unregdisp( searchCmd *cmd, const char *name, void *handler);
 /* Special nick* printf */
 void nssnprintf(char *, size_t, const char *, nick *);
 
+#ifdef NEWSEARCH_NEWPARSER
+void displaystrerror(replyFunc reply, nick *np, const char *input);
+#endif
+
 extern const char *parseError;
 extern nick *senderNSExtern;
 
@@ -236,6 +238,12 @@ typedef struct searchASTExpr {
   } u;
 } searchASTExpr;
 
+typedef struct searchASTCache {
+  searchASTExpr *tree;
+  searchASTExpr *cache[AST_RECENT];
+  int nextpos;
+} searchASTCache;
+
 #define __NSASTSizeOfArray(x) (sizeof(x) / sizeof(x[0]))
 
 #define __NSASTExpr(x, y, ...) (searchASTExpr){.type = x, .u.y = __VA_ARGS__}