Page 1 of 1
/alias /xx ;tell not working
Posted: Thu Jul 01, 2004 6:15 pm
by BlackShadow
doing:
/alias /xx ;tell xxx.xxx test
then doing:
/xx
and you get an error about faulty command or something..
Guessing the /alias routine doesn't support ; atm, and too lazy to poke around someone elses code atm, perhaps later.
Posted: Thu Jul 01, 2004 6:25 pm
by BlackShadow
Wierd, both Void HideDoCommand and Class CCommandHook seems harmless enough, and not caring about / or ;..
Or I might just be to tired to start with... But can someone else please try to do an /alias with a ;tell and see what results you get?
Posted: Thu Jul 01, 2004 9:33 pm
by dont_know_at_all
It's probably the ;
In mq2commandapi.cpp:
if (szCmd[0]==';')
causes the command to be handed off to EQ without doing any MQ2 stuff.
You can probably remove that if statement. I haven't had time to research the implications of this.
Posted: Thu Jul 01, 2004 11:41 pm
by BlackShadow
Hmm, what about changing:
Code: Select all
if (szCmd[0]==';')
{
pEverQuest->InterpretCmd((EQPlayer*)pChar,szOriginalLine);
return;
}
into
Code: Select all
if (szCmd[0]==';')
{
pEverQuest->InterpretCmd((EQPlayer*)pChar,szLine);
return;
}
So it sends the parsed line instead of the unparsed one.. Should work?
Actually, its kinda dangerous that it do sent the original line istead, since it will send the unparsed line to SOE which might contain MQ2 clues.
I don't feel too comfortable with just removing the statement, since it must have been put there for a reason.
(And why aint I sleeping?)
Posted: Fri Jul 02, 2004 12:31 am
by BlackShadow
After reading some more and thinking about it, I am pretty sure it really is a bug and its supposed to be like the change I wrote above.
The reason to check if there is a ; at the start should be because there are no MQ2 commands that starts with it, and its useless for the system to parse thru the rest of the code since it wont find any command starting with it etc anyway.
Removing it should work aswell, but its "prettier" to just fix the code.
Posted: Sat Jul 03, 2004 12:40 pm
by Rusty~
you could use
in place of
Posted: Sat Jul 03, 2004 12:46 pm
by Lax
The reason to check if there's a ; is there is no list of ; commands on the client, so previously you would get an error about an invalid command. All ; commands get sent to the server for processing. Although, I do agree that it could be parsed for replacements etc

Posted: Sat Jul 03, 2004 1:12 pm
by aChallenged1
Rusty, I think he wanted the ;tell because it works for people on other servers as well as using EQIM.
Posted: Sat Jul 03, 2004 7:11 pm
by BlackShadow
Lax wrote:The reason to check if there's a ; is there is no list of ; commands on the client, so previously you would get an error about an invalid command. All ; commands get sent to the server for processing. Although, I do agree that it could be parsed for replacements etc

In HideDoCommand it gets szLine as a parameter, then a bit further down it copies that to szOriginalLine and sets szCmd to the first argument.
But then it goes thru the alias substitution routine and changes szLine as "ordered", AND also gets a new szCmd after.
This means that the line with "if (szCmd[0]==';')" checks the first argument from the altered line, but if the result is true, it sends the original line to InterpretCmd.
Either it should check the original szCmd (save it in a new variable szOriginalCmd or something) and then send the original line.
Or it should check the new szCmd and send the new, substituted, line.
Or even both, but not a mix of the two.
Cause a mix will not really do what the routine is intended to do, so my guess is that this really is an overlooked bug.
Posted: Sat Jul 03, 2004 7:46 pm
by Rusty~
Rusty, I think he wanted the ;tell because it works for people on other servers as well as using EQIM.
yeah i know... /chat tell is identical to ;tell.. just gotta type more. all the ";" commands can be executed by replacing the semicolo with "/chat "
Posted: Sat Jul 03, 2004 9:56 pm
by BlackShadow
Well, it started out that I wanted a function to work that didnt, and the "/chat tell" function would solve that I guess, but now its more about fixing the code instead of the function. It wasn't that important anyway.