3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-27 13:09:23 +01:00

antispam, changehost: remove references to ircmatch (#636)

This commit is contained in:
James Lu 2019-06-21 12:42:53 -07:00
parent 9f31a0a587
commit 74566c3aab
2 changed files with 1 additions and 7 deletions

View File

@ -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),

View File

@ -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