def identify(*args): """Identify nick and user with the server, send server password, and join channels.""" yield cc.identify(nickname='Sakubot', username='******') # wait for the welcome message to know we've successfully joined yield from sakubot.wait_for(RPL_WELCOME) password = os.environ.get('RIZON_BOT') yield cc.privmsg('nickserv', 'identify {0}'.format(password)) # wait for our password to be accepted so our vhost will show up yield from sakubot.wait_for('NOTICE', text=cc.operator.contains('password accepted')) yield cc.join('#sakubot', '#padg')
def rejoin(prefix, channel, target, reason): return cc.join(channel)