diff --git a/plugins/AutoMode/plugin.py b/plugins/AutoMode/plugin.py index 3a139bd4a..672cf2cf0 100644 --- a/plugins/AutoMode/plugin.py +++ b/plugins/AutoMode/plugin.py @@ -108,7 +108,7 @@ class AutoMode(callbacks.Plugin): user = ircdb.users.getUser(ircdb.users.getUserId(msg.prefix)) except KeyError: return - pattern = re.compile('-|\+') + pattern = re.compile(r'-|\+') for item in self.registryValue('extra', channel, network): try: username, modes = pattern.split(item, maxsplit=1) diff --git a/plugins/Channel/plugin.py b/plugins/Channel/plugin.py index 6c9b60bc3..a7e8050f5 100644 --- a/plugins/Channel/plugin.py +++ b/plugins/Channel/plugin.py @@ -620,7 +620,7 @@ class Channel(callbacks.Plugin): If you have the #channel,op capability, this will show you the current persistent bans on the that match the given mask, if any (returns all of them otherwise). - Note that you can use * as a wildcard on masks and \* to match + Note that you can use * as a wildcard on masks and \\* to match actual * in masks """ all_bans = ircdb.channels.getChannel(channel).bans diff --git a/plugins/Nickometer/plugin.py b/plugins/Nickometer/plugin.py index 59751cf95..d8ec60163 100644 --- a/plugins/Nickometer/plugin.py +++ b/plugins/Nickometer/plugin.py @@ -139,7 +139,7 @@ class Nickometer(callbacks.Plugin): nick=re.sub('^C--$', 'C', nick); # Punish consecutive non-alphas - matches=re.findall('[^\w\d]{2,}',nick) + matches=re.findall(r'[^\w\d]{2,}',nick) for match in matches: score += self.punish(slowPow(10, len(match)), '%s consecutive non-alphas ' % len(match)) @@ -147,9 +147,9 @@ class Nickometer(callbacks.Plugin): # Remove balanced brackets ... while True: nickInitial = nick - nick=re.sub('^([^()]*)(\()(.*)(\))([^()]*)$', '\1\3\5', nick, 1) - nick=re.sub('^([^{}]*)(\{)(.*)(\})([^{}]*)$', '\1\3\5', nick, 1) - nick=re.sub('^([^\[\]]*)(\[)(.*)(\])([^\[\]]*)$', '\1\3\5', nick, 1) + nick = re.sub(r'^([^()]*)(\()(.*)(\))([^()]*)$', r'\1\3\5', nick, 1) + nick = re.sub(r'^([^{}]*)(\{)(.*)(\})([^{}]*)$', r'\1\3\5', nick, 1) + nick = re.sub(r'^([^\[\]]*)(\[)(.*)(\])([^\[\]]*)$', r'\1\3\5', nick, 1) if nick == nickInitial: break self.log.debug('Removed some matching brackets %r => %r',