Passive Search and Special chars in Nick = disconnect

Problems compiling? Don't understand the source code? Don't know how to code your feature? Post here.

Moderator: Moderators

Locked
BlueSky©
Posts: 3
Joined: 2003-07-28 15:09
Contact:

Passive Search and Special chars in Nick = disconnect

Post by BlueSky© » 2004-11-04 17:48

Hi together,

i found a little Problem @ all newer DC++ than 0.403.

If a Nick take a char like ä ü ö ß ... AND the User is PASSIV, the char is send to Hub as 2 chars. the user directly disconnect from hub.

i hope this error will be correct. :)

Sky

Todi
Forum Moderator
Posts: 699
Joined: 2003-03-04 12:16
Contact:

Post by Todi » 2004-11-05 07:10

Have you tried this with DC++ 0.666? There were some additional unicode fixes there i believe. Also, does this happen in all hubsofts, or just some? Additionally, you say it happens in Passive mode, does that mean it doesn't happen in Active mode?

BlueSky©
Posts: 3
Joined: 2003-07-28 15:09
Contact:

Post by BlueSky© » 2004-11-05 12:44

Hi Todi,

- 0.666 has the same problem with the chars, that before :)

You can test it with diffenrent Hubsoft.
The problem is under DH-Hub / NMDC-Hubsoft 1 tested.

In the "stable" release 0.4034 the errors with the special chars in the Nick and also in Queue.xml.
In the 0.666 the errors dosen't exist any more in the queuefile, only in Nick the problem does exist.
Additionally, you say it happens in Passive mode, does that mean it doesn't happen in Active mode?
that's right, because in active mode the client sends the IP to hubsoft.......
example active search => $Search 64.78.55.32:412 T?T?500000?1?*removed*

in passiv you send the nick to and the hub searchs for you.
example passive => $Search Hub:NickName T?T?500000?1?*removed*
constain now the nick an special char an you'll in a closed Hub you'll disconnecting because Name doesen't match.

ä => ä
ü => ü
ö => ö
ß => ß

thats what i found in Filelist (0.403 1..) and in Nick. after 0.403.

Sky

Herodes
Posts: 26
Joined: 2004-04-08 19:45
Location: Rethymno, Crete, Greece

Post by Herodes » 2004-11-05 14:45

that is probably the encoding that the hubs do their data in ..
I dont think it is dc++'s problem ..
maybe the hub developers should consider altering some stuff too ...
[url=dchub://greekcyprus.no-ip.org].::+LiVe-¦-OnCE-¦-WaiT-¦-foR-¦-eVeR+::..[/url]

Sedulus
Forum Moderator
Posts: 687
Joined: 2003-01-04 09:32
Contact:

Post by Sedulus » 2004-11-05 19:16

er.. I guess

Code: Select all

                chars = sprintf(buf, "$Search Hub:%s %c?%c?%s?%d?%s|", getNick().c_str(), c1, c2, Util::toString(aSize).c_str(), aFileType+1, tmp.c_str());
should be

Code: Select all

                chars = sprintf(buf, "$Search Hub:%s %c?%c?%s?%d?%s|", toNmdc(getNick()).c_str(), c1, c2, Util::toString(aSize).c_str(), aFileType+1, tmp.c_str());
http://dc.selwerd.nl/hublist.xml.bz2
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)

BlueSky©
Posts: 3
Joined: 2003-07-28 15:09
Contact:

Post by BlueSky© » 2004-11-06 04:43

Sedulus wrote:er.. I guess

Code: Select all

                chars = sprintf(buf, "$Search Hub:%s %c?%c?%s?%d?%s|", getNick().c_str(), c1, c2, Util::toString(aSize).c_str(), aFileType+1, tmp.c_str());
should be

Code: Select all

                chars = sprintf(buf, "$Search Hub:%s %c?%c?%s?%d?%s|", toNmdc(getNick()).c_str(), c1, c2, Util::toString(aSize).c_str(), aFileType+1, tmp.c_str());
Hi Sedulus,

thanks really for this idea :D
i'll found a way to fix the Error from 0.403x to 0.666

here my way to fix the problem in the nmdc.cpp

Code: Select all

//DC new by BlueSky©
		string NickName = toNmdc(checkNick(getNick());
//DC new by BlueSky©
		buf = new char[getNick().length() + aString.length() + 64];
		chars = sprintf(buf, "$Search Hub:%s %c?%c?%s?%d?%s|", NickName.c_str(), c1, c2, Util::toString(aSize).c_str(), aFileType+1, tmp.c_str());
	}
	send(buf, chars);
}
on this way always the correct nick will shown and send bye the search.

@arne, this could be the way to fix this problem ;)

Sky

Locked