!editserver only need an alias to exist, not to be currently connected
This commit is contained in:
parent
87a7d74fc3
commit
97c439a9d7
1 changed files with 3 additions and 3 deletions
|
@ -168,8 +168,8 @@ class Module(ModuleManager.BaseModule):
|
|||
@utils.kwarg("permission", "editserver")
|
||||
def edit_server(self, event):
|
||||
alias = event["args_split"][0]
|
||||
server = self.bot.get_server_by_alias(alias)
|
||||
if server == None:
|
||||
server_id = self._id_from_alias(alias)
|
||||
if server_id == None:
|
||||
raise utils.EventError("Unknown server '%s'" % alias)
|
||||
|
||||
option = event["args_split"][1].lower()
|
||||
|
@ -196,5 +196,5 @@ class Module(ModuleManager.BaseModule):
|
|||
else:
|
||||
raise utils.EventError("Unknown option '%s'" % option)
|
||||
|
||||
self.bot.database.servers.edit(server.id, option, value_parsed)
|
||||
self.bot.database.servers.edit(server_id, option, value_parsed)
|
||||
event["stdout"].write("Set %s for %s" % (option, alias))
|
||||
|
|
Loading…
Reference in a new issue