Hi all,
I have a problem with sending 'right click' UserCommands.
function NewUserConnected(user)
if not (user.bOperator) then
user:SendData("$UserCommand 1 3 Help\\English$<%[mynick]> !help||")
user:SendData("$UserCommand 1 3 Help\\French$<%[mynick]> !frhelp||")
user:SendData("$UserCommand 1 3 Help\\Hungarian$<%[mynick]> !frhelp||")
user:SendData("$UserCommand 1 3 Help\\Italian$<%[mynick]> !frhelp||")
user:SendData("$UserCommand 1 3 Help\\Spanish$<%[mynick]> !frhelp||")
end
end
All is well and works well, untill a user re-enters the hub without restarting the client .
At that moment all the UserCommands will appear twice in the right click menu. The more often he/she re-enters, the longer the list gets.
Is there a way to find out at login if the UserCommands were already loaded?
Do like this.. I based my script on Robocops zRightClicker
function NewUserConnected(user)
user:SendData(" Enhanced Right Click Support For Your Own Good Is Available!")
--//Users
if (user.iProfile == -1) then
UserCustomCMDs(user)
end
end
function UserCustomCMDs(user)
user:SendData("$UserCommand 1 3 Users\\Rules$<%[mynick]> !rules||")
user:SendData("$UserCommand 1 3 Users\\Network$<%[mynick]> !network||")
end
check out the dc++ wiki (http://dcplusplus.sourceforge.net/wiki/index.php/UserCommand%20command) on the right click commands....
if you send the command to clear first, it will eliminate that
problem.
-BH
Thanks for the pointer BH, works perfect! :]
Sending
$UserCommand 255 7
as the first UserCommand will solve it... but this was a bug in DC++ which has been fixed in .4033
-- 0.4033 2004-09-27 --
* Fixed dupe usercommands on reconnect (thanks sed)