/alias /xx ;tell not working

A forum for reporting bugs NOT related to custom plugins.

Moderator: MacroQuest Developers

BlackShadow
a lesser mummy
a lesser mummy
Posts: 72
Joined: Thu Apr 22, 2004 9:06 am

/alias /xx ;tell not working

Post by BlackShadow » Thu Jul 01, 2004 6:15 pm

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.

BlackShadow
a lesser mummy
a lesser mummy
Posts: 72
Joined: Thu Apr 22, 2004 9:06 am

Post by BlackShadow » Thu Jul 01, 2004 6:25 pm

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?

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

Post by dont_know_at_all » Thu Jul 01, 2004 9:33 pm

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.

BlackShadow
a lesser mummy
a lesser mummy
Posts: 72
Joined: Thu Apr 22, 2004 9:06 am

Post by BlackShadow » Thu Jul 01, 2004 11:41 pm

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?)

BlackShadow
a lesser mummy
a lesser mummy
Posts: 72
Joined: Thu Apr 22, 2004 9:06 am

Post by BlackShadow » Fri Jul 02, 2004 12:31 am

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.

Rusty~
a hill giant
a hill giant
Posts: 244
Joined: Wed Apr 14, 2004 2:55 pm

Post by Rusty~ » Sat Jul 03, 2004 12:40 pm

you could use

Code: Select all

/chat tell
in place of

Code: Select all

;tell

Lax
We're not worthy!
We're not worthy!
Posts: 3524
Joined: Thu Oct 17, 2002 1:01 pm
Location: ISBoxer
Contact:

Post by Lax » Sat Jul 03, 2004 12:46 pm

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 ;)
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

User avatar
aChallenged1
a grimling bloodguard
a grimling bloodguard
Posts: 1804
Joined: Mon Jun 28, 2004 10:12 pm

Post by aChallenged1 » Sat Jul 03, 2004 1:12 pm

Rusty, I think he wanted the ;tell because it works for people on other servers as well as using EQIM.

BlackShadow
a lesser mummy
a lesser mummy
Posts: 72
Joined: Thu Apr 22, 2004 9:06 am

Post by BlackShadow » Sat Jul 03, 2004 7:11 pm

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.

Rusty~
a hill giant
a hill giant
Posts: 244
Joined: Wed Apr 14, 2004 2:55 pm

Post by Rusty~ » Sat Jul 03, 2004 7:46 pm

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 "

BlackShadow
a lesser mummy
a lesser mummy
Posts: 72
Joined: Thu Apr 22, 2004 9:06 am

Post by BlackShadow » Sat Jul 03, 2004 9:56 pm

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.