mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-25 19:44:13 +01:00
Changed strsplit and arg.
This commit is contained in:
parent
15487a6416
commit
33a9e88c76
@ -58,7 +58,7 @@ class Utilities(callbacks.Privmsg):
|
|||||||
(sep, text) = privmsgs.getArgs(args, needed=2)
|
(sep, text) = privmsgs.getArgs(args, needed=2)
|
||||||
if sep == '':
|
if sep == '':
|
||||||
sep = None
|
sep = None
|
||||||
irc.reply(msg, ' '.join(text.split(sep)))
|
irc.reply(msg, ' '.join(map(repr, text.split(sep))))
|
||||||
|
|
||||||
def echo(self, irc, msg, args):
|
def echo(self, irc, msg, args):
|
||||||
"""takes any number of arguments
|
"""takes any number of arguments
|
||||||
@ -68,11 +68,10 @@ class Utilities(callbacks.Privmsg):
|
|||||||
irc.reply(msg, ' '.join(args))
|
irc.reply(msg, ' '.join(args))
|
||||||
|
|
||||||
def arg(self, irc, msg, args):
|
def arg(self, irc, msg, args):
|
||||||
i = int(args.pop(0))
|
(i, rest) = privmsgs.getArgs(needed=2)
|
||||||
L = []
|
i = int(i)
|
||||||
for arg in args:
|
args = callbacks.tokenize(rest)
|
||||||
L.extend(arg.split())
|
irc.reply(msg, args[i])
|
||||||
irc.reply(msg, L[i])
|
|
||||||
|
|
||||||
|
|
||||||
Class = Utilities
|
Class = Utilities
|
||||||
|
Loading…
Reference in New Issue
Block a user