support last long colon params in admin commands

This commit is contained in:
vulpine 2021-01-09 16:17:59 -05:00
parent a065098578
commit 1e3dc7f675
1 changed files with 12 additions and 1 deletions

13
bot.py
View File

@ -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):