direct-connect / go-dcpp

Hybrid Direct Connect hub written in Go.
BSD 3-Clause "New" or "Revised" License
36 stars 9 forks source link

Ping, nmdc: invalid path user command #91

Closed Kcchouette closed 5 years ago

Kcchouette commented 5 years ago

Related to #66 and https://github.com/DCNF/Hublist/wiki/Session-of-May-2nd-2019#invalid-path-user-command

./dcping ping 'dchub://caos.europeshare.net:411' --encoding cp1252
2019/05/03 17:51:32 invalid path user command
{"name":"ChaosNet -Trivia - Joc nou","desc":"to autoreg type /fav then +regme password","addr":["dchub://caos.europeshare.net:411"],"soft":{"name":"Verlihub","vers":"1.0.0-RC7","ext":["NoHello","NoGetINFO","UserIP2","TTHSearch","ZPipe0","HubINFO","BotList","MCTo","FailOver","HubTopic","OpPlus","NickRule","ExtJSON2","UserCommand"]},"users":0,"status":"error"}

Maybe cp1252 is the wrong encoding?

I found CP1252 on some XML from hublist:

<Hub Name="ChaosNet -Trivia - Joc nou" Address="caos.europeshare.net" Description="bine ai venit - Joaca cu la trivia :D" Country="Italy" Encoding="CP1252" Users="424" Operators="1" Bots="7" Clones="17" Infected="5" Shared="125356715277857" Minshare="0" Minslots="0" Maxhubs="300" Maxusers="10240" Status="Online" Reliability="99.6" Rating="1" Software="Verlihub" Website="" Email="" ASN="OVH SAS" Network="Europe Share" Failover="" Logo="" Icon="" />
RoLex commented 5 years ago

the problem is that hub sends invalid UserCommand to pinger:

$UserCommand 1 3  $&#124;

but i dont understand why pinger would fail to ping a hub if it gets invalid UserCommand. this command is the most common command where hub admins make mistakes, because many admins dont know what they are doing.

this is also why ledokol allows user to build their own right click menus step by step to minimize the risk of making a mistake.

this kind of behaviour from pinger would equal another client like DC++ disconnecting from hub due to invalid UserCommand, which is completely unreasonable. what pinger actually needs to do, is simply ignoring that invalid UserCommand.