mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-19 08:59:27 +01:00
Stupid tabs.
This commit is contained in:
parent
94c10ca5da
commit
f6066236a9
@ -85,30 +85,29 @@ class FunCommands(callbacks.Privmsg):
|
|||||||
(self.recvdMsgs, self.recvdBytes,
|
(self.recvdMsgs, self.recvdBytes,
|
||||||
self.sentMsgs, self.sentBytes))
|
self.sentMsgs, self.sentBytes))
|
||||||
|
|
||||||
def ord(self, irc, msg, args):
|
def ord(self, irc, msg, args):
|
||||||
"""<letter>
|
"""<letter>
|
||||||
|
|
||||||
Returns the 8-bit value of <letter>.
|
Returns the 8-bit value of <letter>.
|
||||||
"""
|
"""
|
||||||
letter = privmsgs.getArgs(args)
|
letter = privmsgs.getArgs(args)
|
||||||
if len(letter) != 1:
|
if len(letter) != 1:
|
||||||
irc.error(msg, 'Letter must be of length 1 (for obvious reasons)')
|
irc.error(msg, 'Letter must be of length 1 (for obvious reasons)')
|
||||||
else:
|
else:
|
||||||
i = ord(letter)
|
i = ord(letter)
|
||||||
irc.reply(msg, str(i))
|
irc.reply(msg, str(i))
|
||||||
|
|
||||||
def chr(self, irc, msg, args):
|
def chr(self, irc, msg, args):
|
||||||
"""<number>
|
"""<number>
|
||||||
|
|
||||||
Returns the character associated with the 8-bit value <number>
|
Returns the character associated with the 8-bit value <number>
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
i = int(privmsgs.getArgs(args))
|
i = int(privmsgs.getArgs(args))
|
||||||
irc.reply(msg, chr(i))
|
irc.reply(msg, chr(i))
|
||||||
except ValueError:
|
except ValueError:
|
||||||
irc.error(msg, 'That number doesn\'t map to an 8-bit character.')
|
irc.error(msg, 'That number doesn\'t map to an 8-bit character.')
|
||||||
|
|
||||||
|
|
||||||
def hexlify(self, irc, msg, args):
|
def hexlify(self, irc, msg, args):
|
||||||
"<text>; turn string into a hexstring."
|
"<text>; turn string into a hexstring."
|
||||||
text = privmsgs.getArgs(args)
|
text = privmsgs.getArgs(args)
|
||||||
|
Loading…
Reference in New Issue
Block a user