예제 #1
0
    def __init__(self):
        fragmon.ScoreBot.__init__(self)

        self.chan = '#roquet'
        irc.on_text('#*', '*love*', self.on_text)
        irc.on_notice('#*', '*love*', self.on_text)

        irc.join(self.chan)
        irc.msg(self.chan, 'i love you bayebe')
예제 #2
0
    def broadcast_players(self):
        print 'GOT broadcast_players'

        players = self.get_players()
        alist = [plr for plr in players if plr.teamid == 0]
        blist = [plr for plr in players if plr.teamid == 1]
        flist = [plr for plr in players if plr.teamid not in (0,1)]
      
        for ls, name in [(alist, self.name_a), (blist, self.name_b), (flist, 'specs/other')]:
            if ls:
                irc.msg(self.channel, 'Pts   Ping  Name (%s)' % name)
                irc.msg(self.channel, '----------------')
                for plr in ls:
                    irc.msg(self.channel, '%-5d %-5d %s' % (plr.score, plr.ping, plr.name))
예제 #3
0
def on_acttext(mask, location, text):
    irc.msg(location, 'man you sure stink, ' + mask.nick)
예제 #4
0
 def on_text(self, mask, location, text):
     irc.msg(mask.nick, 'got msg from %s -> %s' % (location, text))
     irc.msg(mask.nick, 'thanks, i love you too, ' + mask.nick)