From f43c5de11c575b8fcf7974eaeb95899b332c87f1 Mon Sep 17 00:00:00 2001 From: GLolol Date: Tue, 11 Feb 2014 18:28:50 -0800 Subject: [PATCH] Hostmasks: use ircutils.splitHostmask() --- Hostmasks/plugin.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Hostmasks/plugin.py b/Hostmasks/plugin.py index a8de28d..90b1c98 100644 --- a/Hostmasks/plugin.py +++ b/Hostmasks/plugin.py @@ -51,15 +51,9 @@ class Hostmasks(callbacks.Plugin): def _SplitHostmask(self, irc, nick): # Split the hostmask into 3 sections: nick, ident, and host. try: - splithostmask = re.split('[!@]', irc.state.nickToHostmask(nick)) + splithostmask = ircutils.splitHostmask(irc.state.nickToHostmask(nick)) except KeyError: irc.error('There is no such nick \'%s\'.' % nick, Raise=True) - if len(splithostmask) != 3: - self.log.warning('Hostmasks: Invalid hostmask length received' - ' for %s on %s. This should not be happening!' - % (nick, irc.network)) - irc.error('Invalid hostmask length received! (this should not ' - 'be happening!)', Raise=True) return splithostmask def gethost(self, irc, msg, args, nick):