Преглед на файлове

Fix PermissionsDB.data -> PermissionsDB.users.

tags/v0.2
Ben Kurtovic преди 11 години
родител
ревизия
8ef0642e08
променени са 1 файла, в които са добавени 4 реда и са изтрити 4 реда
  1. +4
    -4
      earwigbot/commands/access.py

+ 4
- 4
earwigbot/commands/access.py Целия файл

@@ -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))



Зареждане…
Отказ
Запис