Send broadcast messages with notice command
If the bot has +v or +o, it bypasses target change rate limits. Also, it stands out more in most clients. Change-Id: I1dc7dcb4cbfc8ab6ce70d1e34720a2753cf36a96
This commit is contained in:
parent
e75f59cdb6
commit
efe7f1cf1b
|
@ -303,7 +303,7 @@ class StatusBot(irc.bot.SingleServerIRCBot):
|
|||
t = self.topics.get(channel, channel)
|
||||
self.set_topic(channel, t)
|
||||
if msg:
|
||||
self.send(channel, prefix + msg)
|
||||
self.notice(channel, prefix + msg)
|
||||
if set_topic:
|
||||
self.set_topic(channel, msg)
|
||||
|
||||
|
@ -321,6 +321,10 @@ class StatusBot(irc.bot.SingleServerIRCBot):
|
|||
self.log.info("Current topic on %s is %s" % (channel, topic))
|
||||
self.topics[channel] = topic
|
||||
|
||||
def notice(self, channel, msg):
|
||||
self.connection.notice(channel, msg)
|
||||
time.sleep(ANTI_FLOOD_SLEEP)
|
||||
|
||||
def send(self, channel, msg):
|
||||
self.connection.privmsg(channel, msg)
|
||||
time.sleep(ANTI_FLOOD_SLEEP)
|
||||
|
|
Loading…
Reference in New Issue