dc++ private message?

Technical discussion about the NMDC and <a href="http://dcpp.net/ADC.html">ADC</A> protocol. The NMDC protocol is documented in the <a href="http://dcpp.net/wiki/">Wiki</a>, so feel free to refer to it.

Moderator: Moderators

Locked
thedash
Posts: 4
Joined: 2005-10-14 12:43

dc++ private message?

Post by thedash » 2005-10-14 12:47

Hey, does anyone know the (raw) command to send a private message to someone else through dc++... say my name is thedash and im sending "hello" to a user named abcdefg, what is the exact syntax for the command (as if im sending it from a connection through telnet)...???

i think its something like:

$To: abcdefg From: thedash $<thedash> heyy |


but that doesn't seem to be working...

PseudonympH
Forum Moderator
Posts: 366
Joined: 2004-03-06 02:46

Post by PseudonympH » 2005-10-14 13:14


GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2005-10-14 14:37

The NMDC protocol is documented pretty well in the DC++ Wiki, and there are even Talk: pages if you have questions about a particular entry. Please use it. :)

thedash
Posts: 4
Joined: 2005-10-14 12:43

Post by thedash » 2005-10-14 15:09

Thanks for the link to the Wiki site, it's been a big help...however i tried the suggested syntax on that site and for some reason its not working for me. Maybe i'm not logged in fully or something, but i connect, send the key and validatenick commands, it replies with hello, and then i try sending my:

$To: abcdefg From: thedash $<thedash> hey|

command...and it doesn't send...is there another command i have to give before i'm "fully logged in" and allowed to send messages ...or is my syntax incorrect?

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2005-10-14 15:48

Are you sending the PM from a user that is online? Hubs commonly filter such bad commands.

Edit: wait, you're only sending the PM command?

thedash
Posts: 4
Joined: 2005-10-14 12:43

Post by thedash » 2005-10-14 17:29

literally what im doing is opening telnet, connecting to the server on port 411, sending (the key doesn't matter on this server):

first...
$Key <1234>|

then...
$ValidateNick thedash|

then...
$To: abcdefg From: thedash $<thedash> hey|



thats literally what the script exactly sends in that order and that's all it sends. Am i missing some intermediary step?

PseudonympH
Forum Moderator
Posts: 366
Joined: 2004-03-06 02:46

Post by PseudonympH » 2005-10-14 18:52

Hubs probably won't like it if you skip MyINFO and (possibly) GetNickList.

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2005-10-14 18:56

thedash wrote:Am i missing some intermediary step?
Yeah, that's why it doesn't work.

Take a look at this: http://wiki.dcpp.net/index.php/Client-Hub_Handshake

It is not set in stone, but if you follow that your program will probably start working.

Edit: please tell me you're not writing a bot to spam PMs.

thedash
Posts: 4
Joined: 2005-10-14 12:43

Post by thedash » 2005-10-14 19:37

hey, so yeah apparently i am missing the:

$Version <version>|$MyINFO <info string>|$GetNickList|

step. Can you please give me a full example $MyINFO string, because although that site has the syntax, it's hard to follow and i'm not sure how to split arguements etc, so an exact $MyINFO string i can use would be of great help. OH and is the version supposed to be the version number of the client or server or what exactly do i put in for <version> ??? (it also doesn't go into depth on this on the site)

PS: lol no i'm actually trying to make my own client but its not going too well :oops: [/list]

Admiral
Posts: 2
Joined: 2004-01-14 12:32
Location: Budapest, Hungary

Post by Admiral » 2005-10-15 00:22

An example of MyINFO string:

$MyINFO $ALL thedash mp3, games<++V:0.668,M:A,H:1/0/0,S:4>$ $DSL$email-addr$sharesize$|

The $Version is nearly unused afaik, it is generally:
$Version 1,0091|

But most hubs won't let you in if you dont compute a $Key from the $Lock command, which is sent to you when you connect to the hub.
My current HUB project: AdmiHUB 3
My previous project: Commander (a DC++ BOT)

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2005-10-15 09:11

thedash wrote:Can you please give me a full example $MyINFO string, because although that site has the syntax, it's hard to follow and i'm not sure how to split arguements etc, so an exact $MyINFO string i can use would be of great help.
It's not that hard, really. Look at the MyINFO page, and if it's unclear, post in the Talk page associated with it.

If you want an exact MyINFO, capture one of your own with ethereal or tcpdump and use it. Both are an invaluable tool when you're programming and debugging...
Admiral wrote:$MyINFO $ALL thedash mp3, games<++V:0.668,M:A,H:1/0/0,S:4>$ $DSL$email-addr$sharesize$|
This isn't right, since you're missing the status byte, at the very least.

Admiral
Posts: 2
Joined: 2004-01-14 12:32
Location: Budapest, Hungary

Post by Admiral » 2005-10-16 08:51

I know it is missing, but it isn't a problem for DC++ afaik.
My current HUB project: AdmiHUB 3
My previous project: Commander (a DC++ BOT)

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2005-10-16 09:21

Admiral wrote:I know it is missing, but it isn't a problem for DC++ afaik.
There are clients other than DC++ (and hubsoft compability is something else to consider). DC++ even emits the 0x01 in its MyINFOs currently.

Try to stick to the protocol wherever possible...

Locked