mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Slight efficiency increase
This commit is contained in:
parent
88dbed38a1
commit
846b4853d7
@ -39,16 +39,16 @@ import callbacks
|
|||||||
class Friendly(callbacks.PrivmsgRegexp):
|
class Friendly(callbacks.PrivmsgRegexp):
|
||||||
def greet(self, irc, msg, match):
|
def greet(self, irc, msg, match):
|
||||||
"(?:heya?|(?:w(?:hat'?s\b|as)s?up)|howdy|hi|hello)"
|
"(?:heya?|(?:w(?:hat'?s\b|as)s?up)|howdy|hi|hello)"
|
||||||
if re.search(irc.nick, msg.args[1]):
|
if msg.args[1].find(irc.nick) != -1:
|
||||||
irc.queueMsg(ircmsgs.privmsg(msg.args[0], 'howdy :)'))
|
irc.queueMsg(ircmsgs.privmsg(msg.args[0], 'howdy :)'))
|
||||||
|
|
||||||
def goodbye(self, irc, msg, match):
|
def goodbye(self, irc, msg, match):
|
||||||
"(?:good)?bye|adios|vale|ciao|au revoir|seeya|night"
|
"(?:good)?bye|adios|vale|ciao|au revoir|seeya|night"
|
||||||
if re.search(irc.nick, msg.args[1]):
|
if msg.args[1].find(irc.nick) != -1:
|
||||||
irc.queueMsg(ircmsgs.privmsg(msg.args[0], 'seeya, d00d!'))
|
irc.queueMsg(ircmsgs.privmsg(msg.args[0], 'seeya, d00d!'))
|
||||||
|
|
||||||
def exclaim(self, irc, msg, match):
|
def exclaim(self, irc, msg, match):
|
||||||
"([^\s]+)!"
|
"^([^\s]+)!"
|
||||||
if match.group(1) == irc.nick:
|
if match.group(1) == irc.nick:
|
||||||
irc.queueMsg(ircmsgs.privmsg(msg.args[0], '%s!' % msg.nick))
|
irc.queueMsg(ircmsgs.privmsg(msg.args[0], '%s!' % msg.nick))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user