fix users.match_hostmask only working on full hostmasks
fixes admins list in botconfig.py when DISABLE_ACCOUNTS is true
This commit is contained in:
parent
c615a62f9d
commit
bc6375cf24
@ -350,8 +350,8 @@ class User(IRCContext):
|
|||||||
nick, ident, host = re.match("(?:(?:(.*?)!)?(.*?)@)?(.*)", hostmask).groups("")
|
nick, ident, host = re.match("(?:(?:(.*?)!)?(.*?)@)?(.*)", hostmask).groups("")
|
||||||
temp = self.lower()
|
temp = self.lower()
|
||||||
|
|
||||||
return (fnmatch.fnmatch(temp.nick, lower(nick)) and
|
return ((not nick or fnmatch.fnmatch(temp.nick, lower(nick))) and
|
||||||
fnmatch.fnmatch(temp.ident, lower(ident)) and
|
(not ident or fnmatch.fnmatch(temp.ident, lower(ident))) and
|
||||||
fnmatch.fnmatch(temp.host, lower(host, casemapping="ascii")))
|
fnmatch.fnmatch(temp.host, lower(host, casemapping="ascii")))
|
||||||
|
|
||||||
def prefers_notice(self):
|
def prefers_notice(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user