ADC: support for the ME parameter?

Asked by Bastien Gorissen

Hello,

I was wondering if you plan to make use of the ME parameter that ADC defines to make messages appear as

*Nick message

like with the IRC /me command. That is, I saw in the source code (ProtoCmds/MSG.java lines 191-204) that you check for it, but then it's never used. A friend's using DSHub and it's really great, that /me thing is the only thing we're missing, so at first I thought about writing a plugin to try to do that, but that doesn't look feasible. And that led me to the aforementioned discovery.

So will it be used ? I'm willing to offer whatever help I can provide regarding this issue, even if I have next to no experience writing DC-related stuff... (And maybe there's already an easy way to accomplish what I seek via plugins, and I just didn't see it :D)

Thanks in advance !

Question information

Language:
English Edit question
Status:
Solved
For:
DSHub Edit question
Assignee:
No assignee Edit question
Solved by:
Bastien Gorissen
Solved:
Last query:
Last reply:
Revision history for this message
Pietry (pietry) said :
#1

Hi,
I think this should work anyway. DSHub is only checking if ME is there or not, it has nothing to do with how the message is printed. Example:
BMSG sid hello\smessage ME1
and
BMSG sid hello\smessage
are identical except that the ME1 is there in the first case.
DSHub just sends this messages to the other clients as they are.
If the client receiving this message sees the flag ME1 then it prints it like 3rd person talk :
*nick hello message
or, if the ME1 is not there,
<nick> hello message
So there is nothing that DSHub can do about it, but how the client interprets the flags. As far as I know, DC++ based clients did not have this functionality until 0.702 or something. Try with latest DC++ version and see if it works there.

/P

Revision history for this message
Bastien Gorissen (kadomony) said :
#2

Thanks, I began to think along that line later last night, but since I had already asked...

Anyway, I'm using the DC++ core 0.705, so it should be there, and I will look into the matter.

That said, is it up to the client to "force" the ME1 flag when using the +me command ? As I understand it (correct me if I'm wrong of course), it's the hub that needs to parse that command, and then broadcast a message with the ME1 flag for all clients to display. Is that right ?

Anyway, thanks already for your reply!

Revision history for this message
Pietry (pietry) said :
#3

No, not like that. There is no forcing . When you type "+me ...", the client sees that you want to speak in 3rd person and adds the flag ME1 to the message. The hub does the same thing like before, just send the message to the other clients. When a receiving client gets the message and sees that the ME1 flag is present, then it prints the message in "* nick " format.
So , for the hub, there is no difference between the messages ( just the extra flag that is added to the message). It's up to the clients to interpret it as they should.
Also, the +me command is just some convention. Some other client could use /me or -me or .me or whatever they want. This is just for the interaction between client and the human user. Behind that, the client must send the ME1 so that other clients can understand that it wants to speak in 3rd person...

Hope this clarifies the things...
/P

Revision history for this message
Bastien Gorissen (kadomony) said :
#4

Okay, thanks ^^ I think I got a little confused by that post : http://dcpp.wordpress.com/2007/08/02/dont-hijack-me/
Thanks for helping me grasp how all that is working!

Revision history for this message
Pietry (pietry) said :
#5

I explained how the adc thingy is done ( the ME flag ). In that post are presented some ways to hijack this feature if you don't use the ME flag ( which is rather ugly , since ADC includes it in the specification so there shouldn't be any problem)

Revision history for this message
Bastien Gorissen (kadomony) said :
#6

Yeah, hence the problem of me thinking about two separate things (the ME flag, that is indeed used client-side to display the message in third person, and the ugly hijacking) as if they were the same.