diff options
| author | 2019-09-07 15:17:30 +0100 | |
|---|---|---|
| committer | 2019-09-07 15:17:30 +0100 | |
| commit | 4c2c4a501c7b3213f45608c9ee610b193f1cdc0b (patch) | |
| tree | a97b395727f77cec4839a90ea3f794dad5e5bb5a /modules | |
| parent | 477 should check that we're *not* in a channel before trying rejoin (diff) | |
return quote category even if =quote isnt present
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/quotes.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/quotes.py b/modules/quotes.py index 2e972a2b..48ef8661 100644 --- a/modules/quotes.py +++ b/modules/quotes.py @@ -5,9 +5,12 @@ from src import ModuleManager, utils class Module(ModuleManager.BaseModule): def category_and_quote(self, s): - if "=" in s: - return [part.strip() for part in s.split("=", 1)] - return None, None + category, sep, quote = s.partition("=") + category = category.strip() + + if not sep: + return category, None + return category, quote.strip() def _get_quotes(self, server, category): return server.get_setting("quotes-%s" % category, []) |
