2013-01-07 19:00:44 +01:00
|
|
|
#!/usr/bin/env python
|
|
|
|
"""
|
|
|
|
ping.py - Phenny Ping Module
|
|
|
|
Author: Sean B. Palmer, inamidst.com
|
|
|
|
About: http://inamidst.com/phenny/
|
|
|
|
"""
|
|
|
|
|
|
|
|
import random
|
|
|
|
|
2013-02-14 21:27:04 +01:00
|
|
|
def hello(phenny, input):
|
2013-07-08 14:31:49 +02:00
|
|
|
greeting = random.choice(('Hi', 'Hey', 'Hello', 'sup'))
|
|
|
|
punctuation = random.choice(('', '!', '.'))
|
2013-01-07 19:00:44 +01:00
|
|
|
phenny.say(greeting + ' ' + input.nick + punctuation)
|
|
|
|
hello.rule = r'(?i)(hi|hello|hey) $nickname[ \t]*$'
|
|
|
|
|
2014-06-22 12:32:15 +02:00
|
|
|
def interjection(phenny, input):
|
2013-01-07 19:00:44 +01:00
|
|
|
phenny.say(input.nick + '!')
|
|
|
|
interjection.rule = r'$nickname!'
|
|
|
|
interjection.priority = 'high'
|
2013-12-11 22:25:16 +01:00
|
|
|
|
2014-06-22 12:32:15 +02:00
|
|
|
def l3(phenny, input):
|
2013-12-11 22:25:16 +01:00
|
|
|
phenny.say('<3 ' + input.nick)
|
2014-07-20 16:13:59 +02:00
|
|
|
l3.rule = r'<3 $nickname\s*'
|
2013-12-11 22:25:16 +01:00
|
|
|
l3.priority = 'low'
|
2013-01-07 19:00:44 +01:00
|
|
|
|
2014-06-22 12:32:15 +02:00
|
|
|
if __name__ == '__main__':
|
2014-07-20 16:13:59 +02:00
|
|
|
print(__doc__.strip())
|