DC++ 0.22 - "User command" bugfix

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

Moderator: Moderators

Locked
MyKee
Posts: 2
Joined: 2003-01-20 06:13
Contact:

DC++ 0.22 - "User command" bugfix

Post by MyKee » 2003-01-20 06:55

There is a bug "User Menu items". It works great as long as you send the commands to the main chat, but If you specify that you want the command to be sent as a PM to a user you keep getting disconnected when choosing the user command.

After looking in the source I've found that changing the code

Code: Select all

HubFrame.cpp - Line: 871,
client->privateMessage(u->user, Util::formatParams(uc.getCommand(), sm));
to

Code: Select all

string s = "<" + client->getNick() + "> ";
client->privateMessage(u->user, s + Util::formatParams(uc.getCommand(), sm));
Works great. :)

It seems like when sending the PM it does not include the username so the client disconnects.
I would be great if some developer with write access could fix this, but otherwise DC++ is a great program. Keep the good work up.

Thanks, MyKee

Djurmamman
Posts: 6
Joined: 2003-01-02 19:19
Location: Sweden

Post by Djurmamman » 2003-01-20 08:38

Arne is aware if that and has said he will fix it in the next version.
[url=dchub://ancient.myftp.org]ancient.myftp.org - [BBB][Sunet][Tele2] ONLY! @ 20GB (ISP/IP/Share Scripted)[/url]

TMM
Posts: 47
Joined: 2003-01-03 19:50
Location: leeds UK
Contact:

Post by TMM » 2003-01-24 07:08

that bug fix dont work for me
ashes to ashes, dust to dust, if the dope dont get you. The acid must

MyKee
Posts: 2
Joined: 2003-01-20 06:13
Contact:

Post by MyKee » 2003-01-27 14:22

TMM wrote:that bug fix dont work for me
hmm, so I noticed :roll:
It sends the messages to the person you select in the userlist even if you has choosen that the message should go to someone else ... sorry, buggy patch :lol:

Superbeast
Posts: 2
Joined: 2003-01-27 16:23
Location: Sweden : Växjö
Contact:

Post by Superbeast » 2003-01-31 19:06

In 0.23 it works halfway but my scripts can't handle it :-(
When I use the commands the client sends:
$To: [reciver] From: [sender] $[command]
But my scripts wants it in the same way as usual private message:
$To: [reciver] From: [sender] $<[sender]>[command]
So I shanged

Code: Select all

client->privateMessage(uc.getNick(), Util::formatParams(uc.getCommand(), sm));
To:

Code: Select all

client->privateMessage(uc.getNick(), "<" + client->getNick() + ">" + Util::formatParams(uc.getCommand(), sm));
Almost like the trick in the top :wink:
And this works :-)
\\Superbeast

NattensQje
Posts: 26
Joined: 2003-01-17 13:33
Location: Denmark

Post by NattensQje » 2003-02-02 15:52

Superbeast wrote:In 0.23 it works halfway but my scripts can't handle it :-(
When I use the commands the client sends:
$To: [reciver] From: [sender] $[command]
But my scripts wants it in the same way as usual private message:
$To: [reciver] From: [sender] $<[sender]>[command]
So I shanged

Code: Select all

client->privateMessage(uc.getNick(), Util::formatParams(uc.getCommand(), sm));
To:

Code: Select all

client->privateMessage(uc.getNick(), "<" + client->getNick() + ">" + Util::formatParams(uc.getCommand(), sm));
Almost like the trick in the top :wink:
And this works :-)
That bug fix don't work for me eather..

Superbeast
Posts: 2
Joined: 2003-01-27 16:23
Location: Sweden : Växjö
Contact:

Post by Superbeast » 2003-02-02 16:56

Hmm, seems like I missed a space in ">", it should be like this "> ".
If you have done it like this when the client sends it exacly as if it was a private message.
\\Superbeast

FRANKE
Posts: 26
Joined: 2003-01-03 11:29
Location: Denmark
Contact:

Post by FRANKE » 2003-02-02 17:15

Superbeast wrote:In 0.23 it works halfway but my scripts can't handle it :-(
When I use the commands the client sends:
$To: [reciver] From: [sender] $[command]
But my scripts wants it in the same way as usual private message:
$To: [reciver] From: [sender] $<[sender]>[command]
So I shanged

Code: Select all

client->privateMessage(uc.getNick(), Util::formatParams(uc.getCommand(), sm));
To:

Code: Select all

client->privateMessage(uc.getNick(), "<" + client->getNick() + ">" + Util::formatParams(uc.getCommand(), sm));
Almost like the trick in the top :wink:
And this works :-)
Lets say you want to use the command "userinfo", then create a menu with this info:

Name: Userinfo
Command: <%[mynick]>userinfo %[nick]
Hub ip/Dns: op
PM To: BotName
For the newest release of MulTiBoT visit www.cwain.dk

Locked