rewrite quote search categories to account name when possible
This commit is contained in:
parent
fd4729729b
commit
83f0eacb1c
1 changed files with 4 additions and 0 deletions
|
@ -89,6 +89,10 @@ class Module(ModuleManager.BaseModule):
|
||||||
@utils.kwarg("usage", "<category> [= <search>]")
|
@utils.kwarg("usage", "<category> [= <search>]")
|
||||||
def quote(self, event):
|
def quote(self, event):
|
||||||
category, search = self.category_and_quote(event["args"])
|
category, search = self.category_and_quote(event["args"])
|
||||||
|
if event["server"].has_user(category):
|
||||||
|
category = event["server"].get_user_nickname(
|
||||||
|
event["server"].get_user(category).get_id())
|
||||||
|
|
||||||
quotes = event["server"].get_setting("quotes-%s" % category, [])
|
quotes = event["server"].get_setting("quotes-%s" % category, [])
|
||||||
if event["is_channel"]:
|
if event["is_channel"]:
|
||||||
quotes += self._get_quotes(event["target"], category)
|
quotes += self._get_quotes(event["target"], category)
|
||||||
|
|
Loading…
Reference in a new issue