diff --git a/SpiffyTitles/config.py b/SpiffyTitles/config.py index f4edbac..8baa594 100644 --- a/SpiffyTitles/config.py +++ b/SpiffyTitles/config.py @@ -201,6 +201,19 @@ conf.registerChannelValue( registry.Regexp("", _("""Titles matching this pattern will be ignored.""")), ) +conf.registerChannelValue( + SpiffyTitles, + "prefixNick", + registry.Boolean( + False, + _( + """ + Determines whether SpiffyTitles will prefix replies with the user's nick. + """ + ), + ), +) + # default configs conf.registerGroup(SpiffyTitles, "default") diff --git a/SpiffyTitles/plugin.py b/SpiffyTitles/plugin.py index 55a478e..a32af3a 100644 --- a/SpiffyTitles/plugin.py +++ b/SpiffyTitles/plugin.py @@ -215,11 +215,12 @@ class SpiffyTitles(callbacks.Plugin): return title = self.get_title_by_url(url, channel, msg.nick) if title: + prefixed = self.registryValue("prefixNick", channel=channel) ignore_match = self.title_matches_ignore_pattern(title, channel) if ignore_match: return elif not is_ignored: - irc.reply(title, prefixNick=False) + irc.reply(title, prefixNick=prefixed) else: if self.registryValue("default.enabled", channel): log.debug("SpiffyTitles: could not get a title for %s" % (url))