Add commad via PM support
This commit is contained in:
parent
2107166407
commit
cd71b3f443
9
main.py
9
main.py
|
@ -50,6 +50,15 @@ class Server(BaseServer):
|
|||
await self.send(build("JOIN", [c.strip("!")]))
|
||||
self.chans_actual.append(c.strip("!"))
|
||||
|
||||
if line.command == "PRIVMSG" and line.params[0] == self.nickname:
|
||||
line.params.pop(0)
|
||||
nick = line.source.split("!")[0]
|
||||
text = line.params[0]
|
||||
if text.startswith("!") and nick in ADMINS:
|
||||
args = text[1:].split(" ")
|
||||
asyncio.create_task(self.ac(self.name, args))
|
||||
return
|
||||
|
||||
if line.command == "PRIVMSG" and line.params[0] in self.chans_actual:
|
||||
chan = line.params.pop(0)
|
||||
me = False
|
||||
|
|
Loading…
Reference in New Issue