From 74566c3aab8a3e0355bf014f1dc3934ef5b0cb41 Mon Sep 17 00:00:00 2001 From: James Lu Date: Fri, 21 Jun 2019 12:42:53 -0700 Subject: [PATCH] antispam, changehost: remove references to ircmatch (#636) --- plugins/antispam.py | 4 +--- plugins/changehost.py | 4 ---- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/plugins/antispam.py b/plugins/antispam.py index f6c16a1..40ecc20 100644 --- a/plugins/antispam.py +++ b/plugins/antispam.py @@ -1,7 +1,5 @@ # antispam.py: Basic services-side spamfilters for IRC -import ircmatch - from pylinkirc import utils, world, conf from pylinkirc.log import log @@ -355,7 +353,7 @@ def handle_textfilter(irc, source, command, args): punished = False for filterglob in txf_globs: - if ircmatch.match(1, filterglob, text): + if utils.match_text(filterglob, text): log.info("(%s) antispam: punishing %s => %s for text filter %r", irc.name, irc.get_friendly_name(source), diff --git a/plugins/changehost.py b/plugins/changehost.py index 98a36a0..d27ad7f 100644 --- a/plugins/changehost.py +++ b/plugins/changehost.py @@ -7,10 +7,6 @@ from pylinkirc.coremods import permissions import string -# ircmatch library from https://github.com/mammon-ircd/ircmatch -# (pip install ircmatch) -import ircmatch - # Characters allowed in a hostname. allowed_chars = string.ascii_letters + '-./:' + string.digits