Update sweebot.py
This commit is contained in:
parent
a2515bee48
commit
a87bab8b70
1 changed files with 4 additions and 3 deletions
|
@ -21,6 +21,7 @@ class config:
|
||||||
output = self.database.fetchall()
|
output = self.database.fetchall()
|
||||||
return output[0][1]
|
return output[0][1]
|
||||||
except:
|
except:
|
||||||
|
print(traceback.format_exc())
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
# Code snippet from my buddy Irish
|
# Code snippet from my buddy Irish
|
||||||
|
@ -218,7 +219,7 @@ while True:
|
||||||
nick = text.split(" ")[0][1:].split("!")[0]
|
nick = text.split(" ")[0][1:].split("!")[0]
|
||||||
username = text.split(" ")[0][1:].split("@")[1]
|
username = text.split(" ")[0][1:].split("@")[1]
|
||||||
try:
|
try:
|
||||||
perms = config.perms(username)
|
perms = sbconfig.perms(username)
|
||||||
except:
|
except:
|
||||||
perms = ""
|
perms = ""
|
||||||
print(command)
|
print(command)
|
||||||
|
@ -272,8 +273,8 @@ while True:
|
||||||
|
|
||||||
elif command[0] == "$perms":
|
elif command[0] == "$perms":
|
||||||
if len(command) == 2:
|
if len(command) == 2:
|
||||||
if config.perms(command[1]) != "":
|
if sbconfig.perms(command[1]) != "":
|
||||||
irc.send_irc(channel, nick + ": permissions of cloak " + command[1] + ": " + config.perms(command[1]))
|
irc.send_irc(channel, nick + ": permissions of cloak " + command[1] + ": " + sbconfig.perms(command[1]))
|
||||||
else:
|
else:
|
||||||
irc.send_irc(channel, nick + ": The cloak " + command[1] + " Doesn't have permissions.")
|
irc.send_irc(channel, nick + ": The cloak " + command[1] + " Doesn't have permissions.")
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue