def do_join(self, cmdargs, nick, msgtype, send, c):
        """Join a channel.

        | Checks if bot is already joined to channel.

        """
        if not cmdargs:
            send("Join what?")
            return
        if cmdargs == '0':
            send("I'm sorry, Dave. I'm afraid I can't do that.")
            return
        if not cmdargs.startswith(('#', '+', '@')):
            cmdargs = '#' + cmdargs
        cmd = cmdargs.split()
        # FIXME: use argparse
        if cmd[0] in self.channels and not (len(cmd) > 1 and cmd[1] == "force"):
            send("%s is already a member of %s" % (self.config['core']['nick'], cmd[0]))
            return
        c.join(cmd[0])
        self.send(cmd[0], nick, "Joined at the request of " + nick, msgtype)
def do_join ( self , cmdargs , nick , msgtype , send , c ) : if not cmdargs : send ( "Join what?" ) return if cmdargs == '0' : send ( "I'm sorry, Dave. I'm afraid I can't do that." ) return if not cmdargs . startswith ( ( '#' , '+' , '@' ) ) : cmdargs = '#' + cmdargs cmd = cmdargs . split ( ) if cmd [ 0 ] in self . channels and not ( len ( cmd ) > 1 and cmd [ 1 ] == "force" ) : send ( "%s is already a member of %s" % ( self . config [ 'core' ] [ 'nick' ] , cmd [ 0 ] ) ) return c . join ( cmd [ 0 ] ) self . send ( cmd [ 0 ] , nick , "Joined at the request of " + nick , msgtype )
Join a channel.

        | Checks if bot is already joined to channel.