extern struct ConfItem *find_xline(const char *, int);
+extern struct ConfItem *find_xline_mask(const char *);
extern struct ConfItem *find_nick_resv(const char *name);
+extern struct ConfItem *find_nick_resv_mask(const char *name);
extern int valid_wild_card_simple(const char *);
extern int clean_resv_nick(const char *);
return;
}
- if(find_nick_resv(name))
+ if(find_nick_resv_mask(name))
{
sendto_one_notice(source_p,
":A RESV has already been placed on nick: %s",
else if(dlink_list_length(&cluster_conf_list) > 0)
cluster_xline(source_p, temp_time, name, reason);
- if((aconf = find_xline(name, 0)) != NULL)
+ if((aconf = find_xline_mask(name)) != NULL)
{
sendto_one(source_p, ":%s NOTICE %s :[%s] already X-Lined by [%s] - %s",
me.name, source_p->name, parv[1], aconf->name, aconf->passwd);
return;
/* already xlined */
- if((aconf = find_xline(name, 0)) != NULL)
+ if((aconf = find_xline_mask(name)) != NULL)
{
sendto_one_notice(source_p, ":[%s] already X-Lined by [%s] - %s", name, aconf->name, aconf->passwd);
return;
continue;
/* sanity checking */
- if((find_xline(gecos_field, 0) != NULL) ||
+ if((find_xline_mask(gecos_field) != NULL) ||
(strchr(reason_field, ':') != NULL))
continue;
}
else if(clean_resv_nick(host_field))
{
- if(find_nick_resv(host_field))
+ if(find_nick_resv_mask(host_field))
continue;
aconf = make_conf();
return NULL;
}
+struct ConfItem *
+find_xline_mask(const char *gecos)
+{
+ struct ConfItem *aconf;
+ dlink_node *ptr;
+
+ DLINK_FOREACH(ptr, xline_conf_list.head)
+ {
+ aconf = ptr->data;
+
+ if(!irccmp(aconf->name, gecos))
+ return aconf;
+ }
+
+ return NULL;
+}
+
struct ConfItem *
find_nick_resv(const char *name)
{
return NULL;
}
+struct ConfItem *
+find_nick_resv_mask(const char *name)
+{
+ struct ConfItem *aconf;
+ dlink_node *ptr;
+
+ DLINK_FOREACH(ptr, resv_conf_list.head)
+ {
+ aconf = ptr->data;
+
+ if(!irccmp(aconf->name, name))
+ return aconf;
+ }
+
+ return NULL;
+}
+
/* clean_resv_nick()
*
* inputs - nick