diff --git a/modules/TextTransform.py b/modules/TextTransform.py index 92fe2f3..76b5120 100644 --- a/modules/TextTransform.py +++ b/modules/TextTransform.py @@ -39,6 +39,8 @@ class TextTransform(Module): return self.reply(connection, replypath, reply[0]) elif self.base64(what, reply): return self.reply(connection, replypath, reply[0]) + elif self.upper(what, reply): + return self.reply(connection, replypath, reply[0]) def rot13(self, what, reply): """ @@ -63,5 +65,15 @@ class TextTransform(Module): reply[0] = base64.decodestring(' '.join(whats[1:])).replace('\n','') return True + def upper(self, what, reply): + """ + Convert a string to uppercase. + """ + + whats = what.split(' ') + if whats[0] == 'upper' and len(whats) >= 2: + reply[0] = ' '.join(whats[1:]).upper() + return True + # vi:tabstop=4:expandtab:autoindent # kate: indent-mode python;indent-width 4;replace-tabs on;