phenny-1/modules/ping.py

24 lines
592 B
Python
Raw Normal View History

#!/usr/bin/env python
"""
ping.py - Phenny Ping Module
Author: Sean B. Palmer, inamidst.com
About: http://inamidst.com/phenny/
"""
import random
def hello(phenny, input):
greeting = random.choice(('Hi', 'Hey', 'Hello'))
punctuation = random.choice(('', '!'))
phenny.say(greeting + ' ' + input.nick + punctuation)
2011-06-17 11:49:37 -04:00
hello.rule = r'(?i)(hi|hello|hey) $nickname[ \t]*$'
def interjection(phenny, input):
phenny.say(input.nick + '!')
interjection.rule = r'$nickname!'
interjection.priority = 'high'
interjection.thread = False
if __name__ == '__main__':
2011-09-22 14:17:27 -04:00
print(__doc__.strip())