Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions ircbot/plugins/rot.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import codecs

from ircbot import bot


@bot.command('rot13')
def rot13(bot, channel, sender, args):
"""
Usage: {bot.trigget}rot13 <message>

Applies the Caesar cypher to the string and returns it. Currently only supports rot-13.
"""
if not args:
bot.message(channel, f"USAGE: {bot.trigger}rot13 <message>")
return

bot.message(channel, "{}: {}".format(sender, codecs.encode(' '.join(args), 'rot-13')))