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:
James E. Blair 2014-04-25 11:33:09 -07:00
parent e75f59cdb6
commit efe7f1cf1b
1 changed files with 5 additions and 1 deletions

View File

@ -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)