From 112c90859603b54e43560df9e88e8aa5db9cb61e Mon Sep 17 00:00:00 2001 From: "Vgr E. Barry" Date: Thu, 17 Nov 2016 10:10:53 -0500 Subject: [PATCH] Allow an arbitrary number of arguments to IRCContext.send --- src/context.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/context.py b/src/context.py index 75430e4..21036c4 100644 --- a/src/context.py +++ b/src/context.py @@ -129,7 +129,8 @@ class IRCContext: extra, line = line[:length], line[length:] client.send("{0} {1} :{2}".format(send_type, name, extra)) - def send(self, data, *, notice=False, privmsg=False, prefix=None): + def send(self, *data, notice=False, privmsg=False, prefix=None): + data = " ".join(data) if self.is_fake: # Leave out 'fake' from the message; get_context_type() takes care of that debuglog("Would message {0} {1}: {2!r}".format(self.get_context_type(), self.name, data))