There maybe something funny with my configuration, in
the function:
public static void StatRollMenuHandler(cTCDescriptor d)
in the file
\Server\Player\Creation\TelnetClient\Handlers.cs .
If you enter an input you get a value such as reroll
you get:
param="˙ţ˙ţ ˙ţ˙ţ'˙ürollreroll"
The function has a bunch of begins with string
functions, but since reroll is at the end, would
endswith be correct? Something like this:
public static void StatRollMenuHandler(cTCDescriptor d)
//modified by revision17 apr 27 2004
//I changed all the starswith to endswith
{
string input = (string)d.InputQueue.Dequeue();
Core.Entities.Common.ICharacter CIC =
(Core.Entities.Common.ICharacter)d.CharacterInCreation;
string param=input.Trim().ToLower();
if\(param.EndsWith\("accept"\)\) \{ return; \} if\(param.EndsWith\("reroll"\) || param.EndsWith\("roll"\)\) \{ Actions.RollStats\(d\); d.TRPStack.Push\(Packages.StatRollMenuPackage\(d\)\); return; \} else if\(param.EndsWith\("help"\) \) \{ param = param.Remove\(0,4\); d.TRPStack.Push\(Packages.StatRollMenuPackage\(d\)\); d.TRPStack.Push\(Packages.DoHelp\(param\)\); return; \} d.TRPStack.Push\(Packages.StatRollMenuPackage\(d\)\); return; \} \}
This works on my system. The component that is the
issue is the PuTTY as the telnet client. Microsoft's
telnet client give param the exact values that the user
entered.
Logged In: YES
user_id=638248
I forgot to mention that this is just a hack and probably
not a solution
Logged In: YES
user_id=897859
Revision17:
Your enthusiasm is greatly appreciated.
While replacing .StartsWith() calls to .EndsWith() certainly
causes it to work in this case, it does not work in the long
run. Using .EndsWith() presumes that the term you are
looking for is the only thing that you will need from the source
string.
The real solution for this is to interpret, (or at least filter
out), all that extra data, at an earlier point of input
processing, such as back in the UpdateInputQueue() method
of the cTCDescriptor class, where the pre-processing is done.
(For instance, thats where I attempt to process backspace
characters.)
I will acquire a copy of PUTTY and use it in future testing. I
cannot guaruntee functionality with all MUD clients at this
point, but I'm sure at some point, these extra characters will
be properly interpretted.