Procházet zdrojové kódy

Fix PermissionsDB.data -> PermissionsDB.users.

tags/v0.2
Ben Kurtovic před 11 roky
rodič
revize
8ef0642e08
1 změnil soubory, kde provedl 4 přidání a 4 odebrání
  1. +4
    -4
      earwigbot/commands/access.py

+ 4
- 4
earwigbot/commands/access.py Zobrazit soubor

@@ -58,9 +58,9 @@ class Access(Command):
def do_list(self, data, permdb):
if len(data.args) > 1:
if data.args[1] in ["owner", "owners"]:
name, rules = "owners", permdb.data.get(permdb.OWNER)
name, rules = "owners", permdb.users.get(permdb.OWNER)
elif data.args[1] in ["admin", "admins"]:
name, rules = "admins", permdb.data.get(permdb.ADMIN)
name, rules = "admins", permdb.users.get(permdb.ADMIN)
else:
msg = "Unknown access level \x0302{0}\x0F."
self.reply(data, msg.format(data.args[1]))
@@ -71,8 +71,8 @@ class Access(Command):
msg = "No bot {0}.".format(name)
self.reply(data, msg)
else:
owners = len(permdb.data.get(permdb.OWNER, []))
admins = len(permdb.data.get(permdb.ADMIN, []))
owners = len(permdb.users.get(permdb.OWNER, []))
admins = len(permdb.users.get(permdb.ADMIN, []))
msg = "There are \x02{0}\x0F bot owners and \x02{1}\x0F bot admins. Use '!{2} list owners' or '!{2} list admins' for details."
self.reply(data, msg.format(owners, admins, data.command))



Načítá se…
Zrušit
Uložit