From 5390e58176cd34a8678d86455274f0efe2b14b93 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Sun, 22 Aug 2004 20:45:05 +0000 Subject: [PATCH] Let's notice by default. --- plugins/Herald.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/Herald.py b/plugins/Herald.py index 53a507e2b..4a8d041ba 100644 --- a/plugins/Herald.py +++ b/plugins/Herald.py @@ -75,6 +75,9 @@ conf.registerChannelValue(conf.supybot.plugins.Herald, 'default', registry.String('', """Sets the default herald to use. If a user has a personal herald specified, that will be used instead. If set to the empty string, the default herald will be disabled.""")) +conf.registerChannelValue(conf.supybot.plugins.Herald.default, 'notice', + registry.Boolean(True, """Determines whether the default herald will be + sent as a NOTICE instead of a PRIVMSG.""")) conf.registerChannelValue(conf.supybot.plugins.Herald.default, 'public', registry.Boolean(False, """Determines whether the default herald will be sent publicly.""")) @@ -107,10 +110,13 @@ class Herald(callbacks.Privmsg): default = self.registryValue('default', channel) if default: default = plugins.standardSubstitute(irc, msg, default) + msgmaker = ircmsgs.privmsg + if self.registryValue('default.notice', channel): + msgmaker = ircmsgs.notice target = msg.nick if self.registryValue('default.public', channel): target = channel - irc.queueMsg(ircmsgs.privmsg(target, default)) + irc.queueMsg(msgmaker(target, default)) return now = time.time() throttle = self.registryValue('throttleTime', channel)