Phenny2, now being tested on Freenode as the main phenny.

This commit is contained in:
Sean B. Palmer
2008-02-21 12:06:33 +00:00
commit 7931fab145
26 changed files with 6610 additions and 0 deletions

23
modules/ping.py Executable file
View File

@@ -0,0 +1,23 @@
#!/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)
hello.rule = r'(?i)(hi|hello|hey) $nickname\b'
def interjection(phenny, input):
phenny.say(input.nick + '!')
interjection.rule = r'$nickname!'
interjection.priority = 'high'
interjection.thread = False
if __name__ == '__main__':
print __doc__.strip()