relay

Log | Files | Refs

commit 1e3dc7f675f7a9084146f5bf15eec9ca51cf71eb
parent a065098578068132b2125d1abe9d833bd5f6c4f0
Author: xfnw <xfnw@ttm.sh>
Date:   Sat,  9 Jan 2021 16:17:59 -0500

support last long colon params in admin commands

Diffstat:
Mbot.py | 13++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/bot.py b/bot.py @@ -73,7 +73,18 @@ class Server(BaseServer): async def ac(self,name,args): if self.disconnected or "chan" not in list(dir(self)): return - await self.send(build(args[0],[self.chan]+args[1:])) + nargs = [] + isComb = False + for arg in args: + if arg[0] == ':': + isComb = True + nargs.append(arg[1:]) + continue + if isComb: + nargs[-1] += ' '+arg + else: + nargs.append(arg) + await self.send(build(nargs[0],[self.chan]+nargs[1:])) class Bot(BaseBot): def create_server(self, name: str):