PtokaX forum

Archive => Archived 4.0 boards => Help with Lua 4 scripts => Topic started by: damo on 17 August, 2004, 22:05:42

Title: right kick
Post by: damo on 17 August, 2004, 22:05:42
i have right kick script and would like to add right kick options to the hub tab bar. any help would be appeciated
Title:
Post by: Herodes on 18 August, 2004, 00:10:16
provide the scirpt because without it it will be difficult to undersatnd what it does and what u want it to do ....

a quick answer would be :

$UserCommand 1 1 [blah blah the rest goes here] -- this refers to hub tab right click
$UserCommand 1 2 [blah blah the rest goes here] -- this refers to userlist right click
$UserCommand 1 3 [blah blah the rest goes here] -- this refers to both above right clicks

but for extra more info head to the DC++ wiki and search for the usercommands page ;)
Title:
Post by: damo on 18 August, 2004, 00:52:19
This is the script and would like to add a extra comand to the hub tab apart from the add favourites,reconnect and close



Bot = frmHub:GetHubBotName()
Hub_Name = frmHub:GetHubName()

help = "+help"      -- Command for Help
disc = "!disc"      -- Command for Disconnect User

ban = "!ban"      -- Command for Ban
userinfo = "!userinfo"   -- Command for UserInfo





function OpConnected(user)
   SendOpCommands(user)
end


function SendOpCommands(user)

   local text = "|$UserCommand 255 7|$UserCommand 0 7|$UserCommand 1 2 *** "..Hub_Name.." ***$<%[mynick]> "..help.."||$UserCommand 1 2 Disconnect User(s)$<%[mynick]> "..disc.." %[nick] %[line:Reason]||$UserCommand 1 2 Ban User(s)$<%[mynick]> "..ban.." %[nick] %[line:Reason]||$UserCommand 0 2|$UserCommand 1 2 Userinfo User(s)$<%[mynick]> "..userinfo.." %[nick]|"

   user:SendData(Bot, "Sending you this hubs OP UserCommands as requested. (FrEeStyLeR)")
   user:SendData(text.."|")
end
Title:
Post by: Herodes on 18 August, 2004, 07:57:51
this way to script a right click is very bad to edit ...
I modified the script you provided ...
try editing this with the tips from my last post ...
Bot = frmHub:GetHubBotName()
Hub_Name = frmHub:GetHubName()

help = "+help" -- Command for Help
disc = "!disc" -- Command for Disconnect User

ban = "!ban" -- Command for Ban
userinfo = "!userinfo" -- Command for UserInfo


function OpConnected(user)
SendOpCommands(user)
end


function SendOpCommands(user)
user:SendData("$UserCommand 255 7|")
user:SendData("$UserCommand 0 7|")
user:SendData("$UserCommand 1 2 *** "..Hub_Name.." ***|$<%[mynick]> "..help.."||")
user:SendData("$UserCommand 1 2 Disconnect User(s)$<%[mynick]> "..disc.." %[nick] %[line:Reason]|")
user:SendData("$UserCommand 1 2 Ban User(s)$<%[mynick]> "..ban.." %[nick] %[line:Reason]|")
user:SendData("$UserCommand 0 2|")
user:SendData("$UserCommand 1 2 Userinfo User(s)$<%[mynick]> "..userinfo.." %[nick]||")
user:SendData(Bot, "Sending you this hubs OP UserCommands as requested. (FrEeStyLeR)")
end
BTW the DC++ wiki UserCommands page (http://dcplusplus.sourceforge.net/wiki/index.php/UserCommand%20command)
Title:
Post by: damo on 18 August, 2004, 21:37:27
:))  thanx for the help works fine now 8)
Title:
Post by: Herodes on 18 August, 2004, 22:50:03
you're welcome  :)