summaryrefslogtreecommitdiff
path: root/src/operserv.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/operserv.c')
-rw-r--r--src/operserv.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/operserv.c b/src/operserv.c
index 8f878c6aa..739ea2685 100644
--- a/src/operserv.c
+++ b/src/operserv.c
@@ -3482,11 +3482,35 @@ int add_szline(User * u, char *mask, const char *by, const time_t expires,
entry->expires = expires;
slist_add(&szlines, entry);
- anope_cmd_szline(entry->mask, entry->reason);
+ anope_cmd_szline(entry->mask, entry->reason, entry->by);
return deleted;
}
+/* Check and enforce any Zlines that we have */
+int check_szline(char *nick, char *ip)
+{
+ int i;
+ SXLine *sx;
+
+ if (szlines.count == 0)
+ return 0;
+
+ for (i = 0; i < szlines.count; i++) {
+ sx = szlines.list[i];
+ if (!sx)
+ continue;
+
+ if (match_wild_nocase(sx->mask, ip)) {
+ anope_cmd_szline(sx->mask, sx->reason, sx->by);
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
+
/* Delete any expired SZLINEs. */
void expire_szlines(void)