summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/conf.h1
-rw-r--r--include/resv.h1
-rw-r--r--src/conf.c31
-rw-r--r--src/resv.c31
4 files changed, 32 insertions, 32 deletions
diff --git a/include/conf.h b/include/conf.h
index 81cfb30..311ad38 100644
--- a/include/conf.h
+++ b/include/conf.h
@@ -338,6 +338,7 @@ extern struct config_channel_entry ConfigChannel;/* defined in channel.c*/
extern struct config_server_hide ConfigServerHide; /* defined in s_conf.c */
extern struct server_info ServerInfo; /* defined in ircd.c */
extern struct admin_info AdminInfo; /* defined in ircd.c */
+extern int valid_wild_card_simple(const char *);
extern int valid_wild_card(struct Client *, int, int, ...);
/* End GLOBAL section */
diff --git a/include/resv.h b/include/resv.h
index 4705b52..8d4a6a0 100644
--- a/include/resv.h
+++ b/include/resv.h
@@ -29,7 +29,6 @@ extern dlink_list nresv_items;
extern dlink_list resv_channel_list;
extern struct MaskItem *create_resv(const char *, const char *, const dlink_list *);
-extern int valid_wild_card_simple(const char *);
extern int resv_find_exempt(const struct Client *, const struct MaskItem *);
extern struct MaskItem *match_find_resv(const char *);
#endif /* INCLUDED_resv_h */
diff --git a/src/conf.c b/src/conf.c
index 84149c1..2704e52 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -1754,6 +1754,37 @@ valid_tkline(const char *p, int minutes)
return result;
}
+/* valid_wild_card_simple()
+ *
+ * inputs - data to check for sufficient non-wildcard characters
+ * outputs - 1 if valid, else 0
+ * side effects - none
+ */
+int
+valid_wild_card_simple(const char *data)
+{
+ const unsigned char *p = (const unsigned char *)data;
+ unsigned char tmpch = '\0';
+ int nonwild = 0;
+
+ while ((tmpch = *p++))
+ {
+ if (tmpch == '\\')
+ {
+ ++p;
+ if (++nonwild >= ConfigFileEntry.min_nonwildcard_simple)
+ return 1;
+ }
+ else if (!IsMWildChar(tmpch))
+ {
+ if (++nonwild >= ConfigFileEntry.min_nonwildcard_simple)
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
/* valid_wild_card()
*
* input - pointer to client
diff --git a/src/resv.c b/src/resv.c
index 1f5b057..29380b2 100644
--- a/src/resv.c
+++ b/src/resv.c
@@ -186,34 +186,3 @@ match_find_resv(const char *name)
return NULL;
}
-
-/* valid_wild_card_simple()
- *
- * inputs - data to check for sufficient non-wildcard characters
- * outputs - 1 if valid, else 0
- * side effects - none
- */
-int
-valid_wild_card_simple(const char *data)
-{
- const unsigned char *p = (const unsigned char *)data;
- unsigned char tmpch = '\0';
- int nonwild = 0;
-
- while ((tmpch = *p++))
- {
- if (tmpch == '\\')
- {
- ++p;
- if (++nonwild >= ConfigFileEntry.min_nonwildcard_simple)
- return 1;
- }
- else if (!IsMWildChar(tmpch))
- {
- if (++nonwild >= ConfigFileEntry.min_nonwildcard_simple)
- return 1;
- }
- }
-
- return 0;
-}