account_handler.html 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <html><head><title>Python: account_handler</title>
  3. </head><body bgcolor="#f0f0f8">
  4. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
  5. <tr bgcolor="#7799ee">
  6. <td valign=bottom>&nbsp;<br>
  7. <font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>account_handler</strong></big></big></font></td
  8. ><td align=right valign=bottom
  9. ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/Users/hollis/Desktop/nakedmud/lib/pymodules/account_handler.py">/Users/hollis/Desktop/nakedmud/lib/pymodules/account_handler.py</a></font></td></tr></table>
  10. <p><tt>account_handler.py<br>
  11. &nbsp;<br>
  12. The&nbsp;login&nbsp;and&nbsp;creation&nbsp;of&nbsp;accounts,&nbsp;and&nbsp;handles&nbsp;all&nbsp;account&nbsp;procedures,&nbsp;loading<br>
  13. and&nbsp;deleting,&nbsp;of&nbsp;characters.</tt></p>
  14. <p>
  15. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
  16. <tr bgcolor="#aa55cc">
  17. <td colspan=3 valign=bottom>&nbsp;<br>
  18. <font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
  19. <tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
  20. <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="account.html">account</a><br>
  21. <a href="char.html">char</a><br>
  22. <a href="event.html">event</a><br>
  23. </td><td width="25%" valign=top><a href="hooks.html">hooks</a><br>
  24. <a href="mud.html">mud</a><br>
  25. <a href="mudsys.html">mudsys</a><br>
  26. </td><td width="25%" valign=top><a href="socket.html">socket</a><br>
  27. <a href="telnetlib.html">telnetlib</a><br>
  28. <a href="utils.html">utils</a><br>
  29. </td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
  30. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
  31. <tr bgcolor="#eeaa77">
  32. <td colspan=3 valign=bottom>&nbsp;<br>
  33. <font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
  34. <tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
  35. <td width="100%"><dl><dt><a name="-__unload__"><strong>__unload__</strong></a>()</dt><dd><tt>removes&nbsp;the&nbsp;hooks&nbsp;for&nbsp;account&nbsp;handling</tt></dd></dl>
  36. <dl><dt><a name="-account_handler_hook"><strong>account_handler_hook</strong></a>(info)</dt><dd><tt>When&nbsp;a&nbsp;socket&nbsp;connects,&nbsp;put&nbsp;them&nbsp;into&nbsp;the&nbsp;account&nbsp;handler&nbsp;menu.</tt></dd></dl>
  37. <dl><dt><a name="-acct_load_char"><strong>acct_load_char</strong></a>(sock, name)</dt><dd><tt>loads&nbsp;a&nbsp;character&nbsp;attached&nbsp;to&nbsp;the&nbsp;account.&nbsp;Argument&nbsp;supplied&nbsp;must&nbsp;be&nbsp;a<br>
  38. name&nbsp;of&nbsp;the&nbsp;corresponding&nbsp;character</tt></dd></dl>
  39. <dl><dt><a name="-acct_main_menu"><strong>acct_main_menu</strong></a>(sock)</dt><dd><tt>displays&nbsp;the&nbsp;main&nbsp;menu&nbsp;for&nbsp;the&nbsp;account&nbsp;and&nbsp;asks&nbsp;for&nbsp;a&nbsp;command</tt></dd></dl>
  40. <dl><dt><a name="-acct_menu_handler"><strong>acct_menu_handler</strong></a>(sock, arg)</dt><dd><tt>parses&nbsp;account&nbsp;commands&nbsp;(new&nbsp;character,&nbsp;enter&nbsp;game,&nbsp;quit,&nbsp;etc)</tt></dd></dl>
  41. <dl><dt><a name="-acct_new_password_handler"><strong>acct_new_password_handler</strong></a>(sock, arg)</dt><dd><tt>asks&nbsp;a&nbsp;new&nbsp;account&nbsp;for&nbsp;a&nbsp;password</tt></dd></dl>
  42. <dl><dt><a name="-acct_new_password_prompt"><strong>acct_new_password_prompt</strong></a>(sock)</dt></dl>
  43. <dl><dt><a name="-acct_password_handler"><strong>acct_password_handler</strong></a>(sock, arg)</dt><dd><tt>asks&nbsp;an&nbsp;account&nbsp;to&nbsp;verify&nbsp;its&nbsp;password</tt></dd></dl>
  44. <dl><dt><a name="-acct_password_prompt"><strong>acct_password_prompt</strong></a>(sock)</dt></dl>
  45. <dl><dt><a name="-acct_wait_dns_handler"><strong>acct_wait_dns_handler</strong></a>(sock, arg)</dt></dl>
  46. <dl><dt><a name="-acct_wait_dns_prompt"><strong>acct_wait_dns_prompt</strong></a>(sock)</dt></dl>
  47. <dl><dt><a name="-check_acct_name"><strong>check_acct_name</strong></a>(name)</dt><dd><tt>Makes&nbsp;sure&nbsp;an&nbsp;account&nbsp;name&nbsp;is&nbsp;valid</tt></dd></dl>
  48. <dl><dt><a name="-copyover_complete_hook"><strong>copyover_complete_hook</strong></a>(info)</dt></dl>
  49. <dl><dt><a name="-display_acct_chars"><strong>display_acct_chars</strong></a>(sock)</dt><dd><tt>shows&nbsp;the&nbsp;socket&nbsp;a&nbsp;prettied&nbsp;list&nbsp;of&nbsp;characters&nbsp;tied&nbsp;to&nbsp;the&nbsp;account&nbsp;it<br>
  50. has&nbsp;attached.&nbsp;Prints&nbsp;three&nbsp;names&nbsp;per&nbsp;line.</tt></dd></dl>
  51. <dl><dt><a name="-dns_check_event"><strong>dns_check_event</strong></a>(owner, void, info)</dt><dd><tt>After&nbsp;a&nbsp;socket&nbsp;connects,&nbsp;monitor&nbsp;their&nbsp;hostname&nbsp;until&nbsp;dns&nbsp;lookup&nbsp;is<br>
  52. complete.&nbsp;Then,&nbsp;put&nbsp;the&nbsp;socket&nbsp;into&nbsp;the&nbsp;account&nbsp;handler.</tt></dd></dl>
  53. <dl><dt><a name="-find_reconnect"><strong>find_reconnect</strong></a>(name)</dt><dd><tt>searches&nbsp;through&nbsp;the&nbsp;character&nbsp;list&nbsp;for&nbsp;a&nbsp;PC&nbsp;whose&nbsp;name&nbsp;matches&nbsp;the<br>
  54. supplied&nbsp;name</tt></dd></dl>
  55. <dl><dt><a name="-login_method_handler"><strong>login_method_handler</strong></a>(sock, arg)</dt></dl>
  56. <dl><dt><a name="-login_method_prompt"><strong>login_method_prompt</strong></a>(sock)</dt></dl>
  57. <dl><dt><a name="-try_create_account"><strong>try_create_account</strong></a>(sock, name, psswd)</dt></dl>
  58. <dl><dt><a name="-try_load_account"><strong>try_load_account</strong></a>(sock, name, psswd)</dt><dd><tt>Attempt&nbsp;to&nbsp;load&nbsp;an&nbsp;account&nbsp;with&nbsp;the&nbsp;given&nbsp;name&nbsp;and&nbsp;password.</tt></dd></dl>
  59. </td></tr></table><p>
  60. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
  61. <tr bgcolor="#55aa55">
  62. <td colspan=3 valign=bottom>&nbsp;<br>
  63. <font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
  64. <tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
  65. <td width="100%"><strong>squelch</strong> = '<font color="#c040c0">\xff\xfb\x01</font>'<br>
  66. <strong>unsquelch</strong> = '<font color="#c040c0">\xff\xfc\x01</font>'</td></tr></table>
  67. </body></html>