2008-02-21 07:06:33 -05:00
|
|
|
#!/usr/bin/env python
|
|
|
|
"""
|
|
|
|
tools.py - Phenny Tools
|
|
|
|
Copyright 2008, Sean B. Palmer, inamidst.com
|
|
|
|
Licensed under the Eiffel Forum License 2.
|
|
|
|
|
|
|
|
http://inamidst.com/phenny/
|
|
|
|
"""
|
|
|
|
|
|
|
|
def deprecated(old):
|
|
|
|
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, '@@']
|
|
|
|
|
|
|
|
old(self, origin, match, args)
|
2008-03-31 11:17:32 -04:00
|
|
|
new.__module__ = old.__module__
|
2008-02-21 07:06:33 -05:00
|
|
|
new.__name__ = old.__name__
|
|
|
|
return new
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
2011-09-22 14:17:27 -04:00
|
|
|
print(__doc__.strip())
|