Update plugin.py

This commit is contained in:
Gordon Shumway 2019-11-18 01:15:36 -05:00 committed by GitHub
parent dc9bb07761
commit 085c5f99a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -273,14 +273,16 @@ class Fun(callbacks.Plugin):
def rot(self, irc, msg, args, text):
"""
<text> Encode text with ROT13
<text>
Encode text with ROT13
"""
irc.reply(codecs.encode(text, "rot_13"))
rot = wrap(rot, ['text'])
def unrot(self, irc, msg, args, text):
"""
<text> Decode ROT13 text
<text>
Decode ROT13 text
"""
irc.reply(codecs.decode(text, "rot_13"))
unrot = wrap(unrot, ['text'])