diff --git a/config.py b/config.py index 4d3199b..6bd3a76 100644 --- a/config.py +++ b/config.py @@ -14,6 +14,6 @@ SERVERS = { NICKNAME = 'hbot' -ADMINS=['hedy'] +ADMINS=['hedy', 'hedyli'] -NOPING=[] \ No newline at end of file +NOPING=[] diff --git a/main.py b/main.py index 1fcbefd..68e20cb 100644 --- a/main.py +++ b/main.py @@ -76,6 +76,7 @@ class Server(BaseServer): if line.command == "INVITE": await self.send(build("JOIN",[line.params[1]])) + # TODO: add to relay chans if needed self.chans.append(line.params[1]) async def line_send(self, line: Line): @@ -91,11 +92,12 @@ class Server(BaseServer): await self.send(build("PRIVMSG",[c,f"\x0f\x0f\x0f\x0f<{nick[:1]}\u200c{nick[1:]}@{name}{chan}> {msg}"])) async def ac(self,name,args): - if self.disconnected or "chan" not in list(dir(self)): + if self.disconnected or "chans" not in list(dir(self)): return nargs = [] isComb = False for arg in args: + print("a", arg) if arg[0] == ':': isComb = True nargs.append(arg[1:]) @@ -104,7 +106,8 @@ class Server(BaseServer): nargs[-1] += ' '+arg else: nargs.append(arg) - await self.send(build(nargs[0],[self.chan]+nargs[1:])) + print("nargs:", nargs) + await self.send(build(nargs[0],[self.chans[0]]+nargs[1:])) # TODO: loop over chans class Bot(BaseBot): def create_server(self, name: str):