add uppercase text transform
This commit is contained in:
parent
699f550ba3
commit
bda1eb9560
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue