def dns_check_event(owner, void, info): '''After a socket connects, monitor their hostname until dns lookup is complete. Then, put the socket into the account handler. ''' sock, = hooks.parse_info(info) if sock != None and sock.can_use: sock.send(" Lookup complete.") sock.send("================================================================================") sock.send(mud.get_greeting()) sock.pop_ih() sock.bust_prompt() # mud.log_string("new connection from " + sock.hostname) else: event.start_event(None, 0.2, dns_check_event, None, info)
def account_handler_hook(info): '''When a socket connects, put them into the account handler menu.''' # put a nonfunctional prompt up while waiting for the DNS to resolve sock, = hooks.parse_info(info) sock.push_ih(login_method_handler, login_method_prompt) mud.log_string("new socket, %d, attempting to connect" % sock.uid) sock.send(mud.get_greeting()) sock.send("== Options Are ================================================================") sock.send(" Load account : load <account> <password>") sock.send(" Create account : create <account> <password>") sock.send(" Play as guest : guest") sock.send("===============================================================================") sock.send("") '''