rewrite quote search categories to account name when possible

This commit is contained in:
jesopo 2020-06-03 12:48:27 +01:00
parent fd4729729b
commit 83f0eacb1c

View file

@ -89,6 +89,10 @@ class Module(ModuleManager.BaseModule):
@utils.kwarg("usage", "<category> [= <search>]")
def quote(self, event):
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, [])
if event["is_channel"]:
quotes += self._get_quotes(event["target"], category)