mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-02 17:29:22 +01:00
Add dberlin's friendlytoofriendly patch
This commit is contained in:
parent
dc9acab9b5
commit
8f6adf62f5
@ -38,14 +38,15 @@ import plugins
|
|||||||
import callbacks
|
import callbacks
|
||||||
|
|
||||||
class Friendly(callbacks.PrivmsgRegexp):
|
class Friendly(callbacks.PrivmsgRegexp):
|
||||||
|
onlyFirstMatch = True
|
||||||
def greet(self, irc, msg, match):
|
def greet(self, irc, msg, match):
|
||||||
r"(?:heya?|(?:w(?:hat'?s\b|as)s?up)|howdy|hi|hello)"
|
r"(?:heya?|(?:w(?:hat'?s\b|as)s?up)|howdy|hi|hello)$"
|
||||||
if irc.nick in msg.args[1]:
|
if irc.nick in msg.args[1]:
|
||||||
s = 'howdy, %s :)' % msg.nick
|
s = 'howdy, %s :)' % msg.nick
|
||||||
irc.queueMsg(callbacks.reply(msg, s, prefixName=False))
|
irc.queueMsg(callbacks.reply(msg, s, prefixName=False))
|
||||||
|
|
||||||
def goodbye(self, irc, msg, match):
|
def goodbye(self, irc, msg, match):
|
||||||
r"(?:good)?bye|adios|vale|ciao|au revoir|seeya|night"
|
r"(?:good)?bye|adios|vale|ciao|au revoir|seeya|night$"
|
||||||
if irc.nick in msg.args[1]:
|
if irc.nick in msg.args[1]:
|
||||||
s = 'seeya, %s!' % msg.nick
|
s = 'seeya, %s!' % msg.nick
|
||||||
irc.queueMsg(callbacks.reply(msg, s, prefixName=False))
|
irc.queueMsg(callbacks.reply(msg, s, prefixName=False))
|
||||||
|
Loading…
Reference in New Issue
Block a user