[ScryMUD] SVN Commit Info r906 - trunk/mud/grrmud/server
scrymud at wanfear.com
scrymud at wanfear.com
Fri Mar 2 23:23:08 PST 2007
Author: eroper
Date: 2007-03-02 23:23:08 -0800 (Fri, 02 Mar 2007)
New Revision: 906
Modified:
trunk/mud/grrmud/server/telnet_handler.cc
Log:
Added "delete" backspace handling in normal text mode. Previously it was
erroneously only implemented while handling the semi-colon state.
We now handle lone '\n' characters in TEXT mode as Hegemon sends these solo
(w/o a preceeding \r) and not doing this prevents Hegemon users from logging
in.
Modified: trunk/mud/grrmud/server/telnet_handler.cc
===================================================================
--- trunk/mud/grrmud/server/telnet_handler.cc 2007-03-03 06:58:20 UTC (rev 905)
+++ trunk/mud/grrmud/server/telnet_handler.cc 2007-03-03 07:23:08 UTC (rev 906)
@@ -293,6 +293,7 @@
break;
case 0x08://backspace
+ case 0x7F://delete
if ( out_buf.size() > 0 ) {
cout << "Doing backspace!" << endl;
out_buf.resize(out_buf.size()-1);
@@ -303,6 +304,18 @@
current_text_state = ST_CR;
break;
+ case 0x0A:
+ //linefeed aka \n
+ //normally we wouldn't handle this here, but
+ //Hegemon sends lone \n's and not handling this
+ //case prevents hegemon users from logging in.
+ out_buf += '\n';
+ my_critter->pc->input += out_buf.c_str();
+ out_buf.clear();
+ parsed_full_command = true;
+ current_text_state = ST_NORM;
+ break;
+
case ';':
current_text_state = ST_SEMICOLON;
break;
More information about the ScryMUD
mailing list