mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 19:19:32 +01:00
Let's notice by default.
This commit is contained in:
parent
4371b4e513
commit
5390e58176
@ -75,6 +75,9 @@ conf.registerChannelValue(conf.supybot.plugins.Herald, 'default',
|
|||||||
registry.String('', """Sets the default herald to use. If a user has a
|
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
|
personal herald specified, that will be used instead. If set to the empty
|
||||||
string, the default herald will be disabled."""))
|
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',
|
conf.registerChannelValue(conf.supybot.plugins.Herald.default, 'public',
|
||||||
registry.Boolean(False, """Determines whether the default herald will be
|
registry.Boolean(False, """Determines whether the default herald will be
|
||||||
sent publicly."""))
|
sent publicly."""))
|
||||||
@ -107,10 +110,13 @@ class Herald(callbacks.Privmsg):
|
|||||||
default = self.registryValue('default', channel)
|
default = self.registryValue('default', channel)
|
||||||
if default:
|
if default:
|
||||||
default = plugins.standardSubstitute(irc, msg, default)
|
default = plugins.standardSubstitute(irc, msg, default)
|
||||||
|
msgmaker = ircmsgs.privmsg
|
||||||
|
if self.registryValue('default.notice', channel):
|
||||||
|
msgmaker = ircmsgs.notice
|
||||||
target = msg.nick
|
target = msg.nick
|
||||||
if self.registryValue('default.public', channel):
|
if self.registryValue('default.public', channel):
|
||||||
target = channel
|
target = channel
|
||||||
irc.queueMsg(ircmsgs.privmsg(target, default))
|
irc.queueMsg(msgmaker(target, default))
|
||||||
return
|
return
|
||||||
now = time.time()
|
now = time.time()
|
||||||
throttle = self.registryValue('throttleTime', channel)
|
throttle = self.registryValue('throttleTime', channel)
|
||||||
|
Loading…
Reference in New Issue
Block a user