<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: account_handler</title>
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>account_handler</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/mud/nakedmud-mod/lib/pymodules/account_handler.py">/mud/nakedmud-mod/lib/pymodules/account_handler.py</a></font></td></tr></table>
<p><tt>account_handler.py<br>
<br>
The login and creation of accounts, and handles all account procedures, loading<br>
and deleting, of characters.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom> <br>
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="account.html">account</a><br>
<a href="char.html">char</a><br>
<a href="event.html">event</a><br>
</td><td width="25%" valign=top><a href="hooks.html">hooks</a><br>
<a href="mud.html">mud</a><br>
<a href="mudsys.html">mudsys</a><br>
</td><td width="25%" valign=top><a href="socket.html">socket</a><br>
<a href="telnetlib.html">telnetlib</a><br>
<a href="utils.html">utils</a><br>
</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
<td width="100%"><dl><dt><a name="-__unload__"><strong>__unload__</strong></a>()</dt><dd><tt>removes the hooks for account handling</tt></dd></dl>
<dl><dt><a name="-account_handler_hook"><strong>account_handler_hook</strong></a>(info)</dt><dd><tt>When a socket connects, put them into the account handler menu.</tt></dd></dl>
<dl><dt><a name="-acct_load_char"><strong>acct_load_char</strong></a>(sock, name)</dt><dd><tt>loads a character attached to the account. Argument supplied must be a<br>
name of the corresponding character</tt></dd></dl>
<dl><dt><a name="-acct_main_menu"><strong>acct_main_menu</strong></a>(sock)</dt><dd><tt>displays the main menu for the account and asks for a command</tt></dd></dl>
<dl><dt><a name="-acct_menu_handler"><strong>acct_menu_handler</strong></a>(sock, arg)</dt><dd><tt>parses account commands (new character, enter game, quit, etc)</tt></dd></dl>
<dl><dt><a name="-acct_new_password_handler"><strong>acct_new_password_handler</strong></a>(sock, arg)</dt><dd><tt>asks a new account for a password</tt></dd></dl>
<dl><dt><a name="-acct_new_password_prompt"><strong>acct_new_password_prompt</strong></a>(sock)</dt></dl>
<dl><dt><a name="-acct_password_handler"><strong>acct_password_handler</strong></a>(sock, arg)</dt><dd><tt>asks an account to verify its password</tt></dd></dl>
<dl><dt><a name="-acct_password_prompt"><strong>acct_password_prompt</strong></a>(sock)</dt></dl>
<dl><dt><a name="-acct_wait_dns_handler"><strong>acct_wait_dns_handler</strong></a>(sock, arg)</dt></dl>
<dl><dt><a name="-acct_wait_dns_prompt"><strong>acct_wait_dns_prompt</strong></a>(sock)</dt></dl>
<dl><dt><a name="-check_acct_name"><strong>check_acct_name</strong></a>(name)</dt><dd><tt>Makes sure an account name is valid</tt></dd></dl>
<dl><dt><a name="-copyover_complete_hook"><strong>copyover_complete_hook</strong></a>(info)</dt></dl>
<dl><dt><a name="-display_acct_chars"><strong>display_acct_chars</strong></a>(sock)</dt><dd><tt>shows the socket a prettied list of characters tied to the account it<br>
has attached. Prints three names per line.</tt></dd></dl>
<dl><dt><a name="-dns_check_event"><strong>dns_check_event</strong></a>(owner, void, info)</dt><dd><tt>After a socket connects, monitor their hostname until dns lookup is<br>
complete. Then, put the socket into the account handler.</tt></dd></dl>
<dl><dt><a name="-find_reconnect"><strong>find_reconnect</strong></a>(name)</dt><dd><tt>searches through the character list for a PC whose name matches the<br>
supplied name</tt></dd></dl>
<dl><dt><a name="-login_method_handler"><strong>login_method_handler</strong></a>(sock, arg)</dt></dl>
<dl><dt><a name="-login_method_prompt"><strong>login_method_prompt</strong></a>(sock)</dt></dl>
<dl><dt><a name="-try_create_account"><strong>try_create_account</strong></a>(sock, name, psswd)</dt></dl>
<dl><dt><a name="-try_load_account"><strong>try_load_account</strong></a>(sock, name, psswd)</dt><dd><tt>Attempt to load an account with the given name and password.</tt></dd></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
<td width="100%"><strong>squelch</strong> = '<font color="#c040c0">\xff\xfb\x01</font>'<br>
<strong>unsquelch</strong> = '<font color="#c040c0">\xff\xfc\x01</font>'</td></tr></table>
</body></html>