Example #1
0
 def testJoins(self):
     channels = ['#osu', '#umich']
     keys = ['michiganSucks', 'osuSucks']
     self.assertEqual(ircmsgs.joins(channels).args, ('#osu,#umich',))
     self.assertEqual(ircmsgs.joins(channels, keys).args,
                      ('#osu,#umich', 'michiganSucks,osuSucks'))
     keys.pop()
     self.assertEqual(ircmsgs.joins(channels, keys).args,
                      ('#osu,#umich', 'michiganSucks'))
Example #2
0
 def testJoins(self):
     channels = ['#osu', '#umich']
     keys = ['michiganSucks', 'osuSucks']
     self.assertEqual(ircmsgs.joins(channels).args, ('#osu,#umich',))
     self.assertEqual(ircmsgs.joins(channels, keys).args,
                      ('#osu,#umich', 'michiganSucks,osuSucks'))
     keys.pop()
     self.assertEqual(ircmsgs.joins(channels, keys).args,
                      ('#osu,#umich', 'michiganSucks'))
Example #3
0
    def __init__(self, irc):
        self.__parent = super(TailNFL, self)
        self.__parent.__init__(irc)

        self._chan_lobby = '##tailnfl'
        self._chan_format = '##tailnfl-game%s' # chan = format % index
        self._chans_used = [] # int list of occupied chans
        self._games = {}
        self._irc = irc

        self._loop_should_stop = threading.Event()
        self._loop_is_stopped = threading.Event()
        self._loop_is_stopped.set()
        self._irc.queueMsg(ircmsgs.join(self._chan_lobby))
        self._irc.queueMsg(ircmsgs.joins([self._chan_format%str(i) for i in range(1, 21)]))