Fixed mime/unmime and docstring.

This commit is contained in:
Jeremy Fincher 2003-08-25 06:24:42 +00:00
parent 12ec2a805b
commit c9c77f92c2

View File

@ -35,19 +35,6 @@
""" """
Provides several commands that shamelessly imitate Moobot, if only to show Provides several commands that shamelessly imitate Moobot, if only to show
developers coming from Moobot how to code to Supybot. developers coming from Moobot how to code to Supybot.
Commands include:
cool
hi
morse
unmorse
ditdaw
dawdit
reverse
mime
unmime
stack
give
""" """
from baseplugin import * from baseplugin import *
@ -161,11 +148,7 @@ class Moobot(callbacks.Privmsg):
""" """
text = privmsgs.getArgs(args) text = privmsgs.getArgs(args)
s = base64.encodestring(text).strip() s = base64.encodestring(text).strip()
if ircutils.isValidArgument(s): irc.reply(msg, s)
irc.reply(msg, s)
else:
irc.error(msg, 'Base64 requires a newline in that string. '\
'Try a smaller string.')
def unmime(self, irc, msg, args): def unmime(self, irc, msg, args):
"""<text> """<text>
@ -175,10 +158,7 @@ class Moobot(callbacks.Privmsg):
""" """
text = privmsgs.getArgs(args) text = privmsgs.getArgs(args)
s = base64.decodestring(text) s = base64.decodestring(text)
if ircutils.isValidArgument(s): irc.reply(msg, s)
irc.reply(msg, s)
else:
irc.error(msg, 'I can\'t send \\n, \\r, or \\0.')
_stack = [] _stack = []
def stack(self, irc, msg, args): def stack(self, irc, msg, args):