phenny-1/tools.py

32 lines
680 B
Python
Raw Normal View History

2012-12-16 17:09:43 -05:00
#!/usr/bin/env python3
"""
tools.py - Phenny Tools
Copyright 2008, Sean B. Palmer, inamidst.com
Licensed under the Eiffel Forum License 2.
http://inamidst.com/phenny/
"""
class GrumbleError(Exception):
pass
def deprecated(old):
2012-06-02 01:33:13 -04:00
def new(phenny, input, old=old):
self = phenny
origin = type('Origin', (object,), {
'sender': input.sender,
'nick': input.nick
})()
match = input.match
args = [input.bytes, input.sender, '@@']
2012-06-02 01:33:13 -04:00
old(self, origin, match, args)
new.__module__ = old.__module__
new.__name__ = old.__name__
return new
if __name__ == '__main__':
2012-06-02 01:33:13 -04:00
print(__doc__.strip())