In case people don't have forts:
[17:10] <Kirucat> for team in self.teams:
[17:10] <Kirucat> if team not in self.forts:
[17:10] <Kirucat> irc.reply("aaaa %s isn't a fort")
[17:10] <Kirucat> return
And here's kittybot's topic-changing function:
def topic(self, irc, msg, args, topic):
"""<text>
Changes the topic."""
c = irc.state.channels[msg.args[0]]
if irc.nick not in c.ops and 't' in c.modes:
irc.reply("I don't have permission to change the topic.")
return
irc.queueMsg(ircmsgs.topic(msg.args[0], topic=topic))
topic = wrap(topic, [rest('something')])
For bluebird, delete the wrap and rename it to _topic. Then use it like this:
def use(stuff):
[all the stuff inside of use]
[place where topic needs to change]
topic = "Team %s: %s HP. Team %s: %s HP." %(stuff, la, la)
self._topic(irc, msg, args, topic)
And "place where topic needs to change" would be right after you're done telling _roundstories, and also right after death occurs.
[17:10] <Kirucat> for team in self.teams:
[17:10] <Kirucat> if team not in self.forts:
[17:10] <Kirucat> irc.reply("aaaa %s isn't a fort")
[17:10] <Kirucat> return
And here's kittybot's topic-changing function:
def topic(self, irc, msg, args, topic):
"""<text>
Changes the topic."""
c = irc.state.channels[msg.args[0]]
if irc.nick not in c.ops and 't' in c.modes:
irc.reply("I don't have permission to change the topic.")
return
irc.queueMsg(ircmsgs.topic(msg.args[0], topic=topic))
topic = wrap(topic, [rest('something')])
For bluebird, delete the wrap and rename it to _topic. Then use it like this:
def use(stuff):
[all the stuff inside of use]
[place where topic needs to change]
topic = "Team %s: %s HP. Team %s: %s HP." %(stuff, la, la)
self._topic(irc, msg, args, topic)
And "place where topic needs to change" would be right after you're done telling _roundstories, and also right after death occurs.