forked from Firepup650/FireBot
Fix admin check, and fix a un-updated line
This commit is contained in:
parent
1b48269d17
commit
374ff215d6
1 changed files with 6 additions and 6 deletions
8
bot.py
8
bot.py
|
@ -196,7 +196,7 @@ class bot:
|
||||||
def sendraw(self, command: str) -> int:
|
def sendraw(self, command: str) -> int:
|
||||||
self.log(f"RAW sending {command}")
|
self.log(f"RAW sending {command}")
|
||||||
command = f"{command}\n"
|
command = f"{command}\n"
|
||||||
return self.send(command.replace("$BOTNICK", botnick))
|
return self.send(command.replace("$BOTNICK", self.nick))
|
||||||
|
|
||||||
def mainloop(self) -> NoReturn:
|
def mainloop(self) -> NoReturn:
|
||||||
self.log("Starting connection..")
|
self.log("Starting connection..")
|
||||||
|
@ -269,6 +269,9 @@ class bot:
|
||||||
triggers,
|
triggers,
|
||||||
cmds.data[cmd]["prefix"],
|
cmds.data[cmd]["prefix"],
|
||||||
):
|
):
|
||||||
|
if ("admin" in cmds.data[cmd] and cmds.data[cmd]["admin"]) and name not in self.adminnames:
|
||||||
|
self.msg(f"Sorry {name}, you don't have permission to use {cmd}.", chan)
|
||||||
|
else:
|
||||||
cmds.call[cmd](self, chan, name, message)
|
cmds.call[cmd](self, chan, name, message)
|
||||||
handled = True
|
handled = True
|
||||||
break
|
break
|
||||||
|
@ -280,9 +283,6 @@ class bot:
|
||||||
),
|
),
|
||||||
message,
|
message,
|
||||||
):
|
):
|
||||||
if ("admin" in cmds.data[cmd] and cmds.data[cmd]["admin"]) and name not in self.adminnames:
|
|
||||||
self.msg(f"Sorry {name}, you don't have permission to use {cmd}.", chan)
|
|
||||||
else:
|
|
||||||
cmds.call[check](self, chan, name, message)
|
cmds.call[check](self, chan, name, message)
|
||||||
handled = True
|
handled = True
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in a new issue