Double UserCommands after leaving hub
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

Double UserCommands after leaving hub

Started by Shurlock, 03 October, 2004, 04:57:55

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Shurlock

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?

If it's raining and your roof leaks, fix the roof. DON'T try to stop the rain!!

Madman

#1
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
We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

BottledHate

check out the dc++ wiki on the right click commands....
if you send the command to clear first, it will eliminate that
problem.


-BH
Homepage: www.bottledhate.webhop.org

Compiling  Lua scripts is LAME!!!!!

Shurlock

Thanks for the pointer BH, works perfect!  :]
If it's raining and your roof leaks, fix the roof. DON'T try to stop the rain!!

HaArD

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)

SMF spam blocked by CleanTalk