lib/plugins/standup.py
def _cmd_start(self, target, nick, args):
        """ start: start a standup

        1/ all users on the standup channel are asked to say something
        2/ all replies are gathered for 1 min
        3/ starts the standup with the users who replied
        """
        if self._starting is True or self._in_progress is True:
            self._send_msg(target, nick, 'Cannot start a standup twice.')
            return
        self._owner = nick
        self._server.privmsg(self._config['primary_channel'],
                'Starting a daily standup "{0}" on {1}'.format(self._name, self._config['standup_channel']))
        self._starting = True
        def list_users(conn, event):
            self._irc.remove_global_handler('namreply', list_users)
            users = event.arguments.pop().split(' ')
            users.pop(0)
            if self._global_config['nick'] in users:
                users.remove(self._global_config['nick'])
            users = map(lambda c: c.lstrip('@+'), users)
            self._server.privmsg(self._config['standup_channel'],
                    '{0}: Please say something to be part of the standup (starting in {1} seconds)'.format(
                        ', '.join(users), self._config['warmup_duration']))
        self._irc.add_global_handler('namreply', list_users)
        self._server.names([self._config['standup_channel']])
        nick_list = []
        def gather_reply(conn, event):
            if self._starting is False:
                return
            if event.target != self._config['standup_channel']:
                return
            nick = event.source.split('!')[0].lower()
            if nick not in nick_list:
                nick_list.append(nick)
        self._irc.add_global_handler('pubmsg', gather_reply)
        def start():
            self._starting = False
            self._in_progress = True
            self._started = time.time()
            # Stop gathering
            self._irc.remove_global_handler('pubmsg', gather_reply)
            if not nick_list:
                self._server.privmsg(self._config['standup_channel'],
                        'Nobody replied, aborting the standup.')
                return
            self._archives.new(self._name)
            self._user_late_list = []
            self._parking = []
            self._server.privmsg(self._config['standup_channel'],
                    'Let\'s start the standup with {0}'.format(', '.join(nick_list)))
            self._archives.write('*** Starting with: {0}'.format(', '.join(nick_list)))
            self._user_list = nick_list
            self._current_user = nick_list[0]
            self._send_msg(self._config['standup_channel'], self._current_user,
                    'You start.')
            self._set_speak_timer()
            self._archives.write('*** Current: {0}'.format(self._current_user))
        self._irc.execute_at(int(time.time() + self._config['warmup_duration']), start)
 start: start a standup

        1/ all users on the standup channel are asked to say something
        2/ all replies are gathered for 1 min
        3/ starts the standup with the users who replied
        
start a standup
1/ all users on the standup channel are asked to say something
2/ all replies are gathered for 1 min
3/ starts the standup with the users who replied
start a standup 1 / all users on the standup channel are asked to say something 2 / all replies are gathered for 1 min 3 / starts the standup with the users who replied
def _cmd_start(self, target, nick, args):
        if self._starting is True or self._in_progress is True:
            self._send_msg(target, nick, 'Cannot start a standup twice.')
            return
        self._owner = nick
        self._server.privmsg(self._config['primary_channel'],
                'Starting a daily standup "{0}" on {1}'.format(self._name, self._config['standup_channel']))
        self._starting = True
        def list_users(conn, event):
            self._irc.remove_global_handler('namreply', list_users)
            users = event.arguments.pop().split(' ')
            users.pop(0)
            if self._global_config['nick'] in users:
                users.remove(self._global_config['nick'])
            users = map(lambda c: c.lstrip('@+'), users)
            self._server.privmsg(self._config['standup_channel'],
                    '{0}: Please say something to be part of the standup (starting in {1} seconds)'.format(
                        ', '.join(users), self._config['warmup_duration']))
        self._irc.add_global_handler('namreply', list_users)
        self._server.names([self._config['standup_channel']])
        nick_list = []
        def gather_reply(conn, event):
            if self._starting is False:
                return
            if event.target != self._config['standup_channel']:
                return
            nick = event.source.split('!')[0].lower()
            if nick not in nick_list:
                nick_list.append(nick)
        self._irc.add_global_handler('pubmsg', gather_reply)
        def start():
            self._starting = False
            self._in_progress = True
            self._started = time.time()
            self._irc.remove_global_handler('pubmsg', gather_reply)
            if not nick_list:
                self._server.privmsg(self._config['standup_channel'],
                        'Nobody replied, aborting the standup.')
                return
            self._archives.new(self._name)
            self._user_late_list = []
            self._parking = []
            self._server.privmsg(self._config['standup_channel'],
                    'Let\'s start the standup with {0}'.format(', '.join(nick_list)))
            self._archives.write('*** Starting with: {0}'.format(', '.join(nick_list)))
            self._user_list = nick_list
            self._current_user = nick_list[0]
            self._send_msg(self._config['standup_channel'], self._current_user,
                    'You start.')
            self._set_speak_timer()
            self._archives.write('*** Current: {0}'.format(self._current_user))
        self._irc.execute_at(int(time.time() + self._config['warmup_duration']), start)
def _cmd_start ( self , target , nick , args ) : if self . _starting is True or self . _in_progress is True : self . _send_msg ( target , nick , 'Cannot start a standup twice.' ) return self . _owner = nick self . _server . privmsg ( self . _config [ 'primary_channel' ] , 'Starting a daily standup "{0}" on {1}' . format ( self . _name , self . _config [ 'standup_channel' ] ) ) self . _starting = True def list_users ( conn , event ) : self . _irc . remove_global_handler ( 'namreply' , list_users ) users = event . arguments . pop ( ) . split ( ' ' ) users . pop ( 0 ) if self . _global_config [ 'nick' ] in users : users . remove ( self . _global_config [ 'nick' ] ) users = map ( lambda c : c . lstrip ( '@+' ) , users ) self . _server . privmsg ( self . _config [ 'standup_channel' ] , '{0}: Please say something to be part of the standup (starting in {1} seconds)' . format ( ', ' . join ( users ) , self . _config [ 'warmup_duration' ] ) ) self . _irc . add_global_handler ( 'namreply' , list_users ) self . _server . names ( [ self . _config [ 'standup_channel' ] ] ) nick_list = [ ] def gather_reply ( conn , event ) : if self . _starting is False : return if event . target != self . _config [ 'standup_channel' ] : return nick = event . source . split ( '!' ) [ 0 ] . lower ( ) if nick not in nick_list : nick_list . append ( nick ) self . _irc . add_global_handler ( 'pubmsg' , gather_reply ) def start ( ) : self . _starting = False self . _in_progress = True self . _started = time . time ( ) self . _irc . remove_global_handler ( 'pubmsg' , gather_reply ) if not nick_list : self . _server . privmsg ( self . _config [ 'standup_channel' ] , 'Nobody replied, aborting the standup.' ) return self . _archives . new ( self . _name ) self . _user_late_list = [ ] self . _parking = [ ] self . _server . privmsg ( self . _config [ 'standup_channel' ] , 'Let\'s start the standup with {0}' . format ( ', ' . join ( nick_list ) ) ) self . _archives . write ( '*** Starting with: {0}' . format ( ', ' . join ( nick_list ) ) ) self . _user_list = nick_list self . _current_user = nick_list [ 0 ] self . _send_msg ( self . _config [ 'standup_channel' ] , self . _current_user , 'You start.' ) self . _set_speak_timer ( ) self . _archives . write ( '*** Current: {0}' . format ( self . _current_user ) ) self . _irc . execute_at ( int ( time . time ( ) + self . _config [ 'warmup_duration' ] ) , start )
start: start a standup
1/ all users on the standup channel are asked to say something
2/ all replies are gathered for 1 min
3/ starts the standup with the users who replied
start : start a standup 1 / all users on the standup channel are asked to say something 2 / all replies are gathered for 1 min 3 / starts the standup with the users who replied
""" start: start a standup

        1/ all users on the standup channel are asked to say something
        2/ all replies are gathered for 1 min
        3/ starts the standup with the users who replied
        """ # Stop gathering
self
target
nick
args