Add antiabuse handler to interjection "command"
parent
902f327f7a
commit
9afe8f68ae
8
ping.py
8
ping.py
|
@ -12,12 +12,16 @@ def hello(phenny, input):
|
||||||
if x[0].__name__ == "aa_hook":
|
if x[0].__name__ == "aa_hook":
|
||||||
if x[0](phenny, input):
|
if x[0](phenny, input):
|
||||||
return # Abort function
|
return # Abort function
|
||||||
greeting = random.choice(('Hi', 'Hey', 'Hello'))
|
greeting = random.choice(('Hi', 'Hey', 'Hello', 'sup'))
|
||||||
punctuation = random.choice(('', '!'))
|
punctuation = random.choice(('', '!', '.'))
|
||||||
phenny.say(greeting + ' ' + input.nick + punctuation)
|
phenny.say(greeting + ' ' + input.nick + punctuation)
|
||||||
hello.rule = r'(?i)(hi|hello|hey) $nickname[ \t]*$'
|
hello.rule = r'(?i)(hi|hello|hey) $nickname[ \t]*$'
|
||||||
|
|
||||||
def interjection(phenny, input):
|
def interjection(phenny, input):
|
||||||
|
for x in phenny.bot.commands["high"].values():
|
||||||
|
if x[0].__name__ == "aa_hook":
|
||||||
|
if x[0](phenny, input):
|
||||||
|
return # Abort function
|
||||||
phenny.say(input.nick + '!')
|
phenny.say(input.nick + '!')
|
||||||
interjection.rule = r'$nickname!'
|
interjection.rule = r'$nickname!'
|
||||||
interjection.priority = 'high'
|
interjection.priority = 'high'
|
||||||
|
|
Loading…
Reference in New Issue