2019-05-25 20:40:06 +00:00
|
|
|
#--depends-on commands
|
|
|
|
|
2018-10-11 11:44:22 +00:00
|
|
|
import codecs
|
|
|
|
from src import ModuleManager, utils
|
|
|
|
|
|
|
|
class Module(ModuleManager.BaseModule):
|
|
|
|
@utils.hook("received.command.rot13")
|
|
|
|
def rot13(self, event):
|
|
|
|
line = event["args"] or event["target"].buffer.get().message
|
|
|
|
event["stdout"].write("%s: %s" % (event["user"].nickname,
|
|
|
|
codecs.encode(line, "rot_13")))
|