i need a script so you can do like
!ban nick porn
and then the user will be banned for sharing porn
or like !kick nick program files
and then the user will be kicked for sharing program files
please can someone get me a script like that ?
-- Modded version VIPK by Plop
-- Fasted & easyest way haha (to make that is)
Bot = "=SimpleKick="
function Main()
frmHub:RegBot(Bot)
end
function DataArrival(user,data)
if( strsub(data, 1, 1) == "<" ) then
data=strsub(data,1,strlen(data)-1)
local s,e,cmd = strfind(data,"%b<>%s+(%S+)")
if user.bOperator then
if cmd == "!kick" then
user:SendData(Bot, DoKick(user, data).."|")
return 1
end
end
elseif(strsub(data, 1, 4) == "$To:") then
local s,e,whoTo = strfind(data,"$To:%s+(%S+)")
if whoTo == Bot then
data=strsub(data,1,strlen(data)-1)
local s,e,cmd = strfind(data, "%$%b<>%s+(%S+)")
if user.bOperator then
if cmd == "!kick" then
user:SendData(Bot, DoKick(user, data).."|")
return 1
end
end
end
end
end
function DoKick(user, data)
local s,e,name, reason = strfind(data, "%b<>%s+%S+%s*(%S*)%s*(.*)")
if name == "" then
return "*** I need a name to know who to kick!!"
elseif reason == "" then
return "*** I need a reason to kick the user!"
else
local victem = GetItemByName(name)
if victem ~= nil then
if victem.bOperator == nil then
victem:SendData(Bot, "You have been kicked by: "..user.sName.." because of: "..reason.."|")
victem:Disconnect()
return name.." has been kicked!"
else
return "*** We don't kick Operators!!"
end
else
return "*** "..name.." Isn't in the hub!!"
end
end
end
For !kick. Ban is inbuilt into ptokax if I'm not mistaken.
hmm i think you didnt understand what i meant
im talking about like
!kick porn
and then it would come somethin like
you are being kicked for sharing porn
and like hauxir is kicking somebody because: sharing porn
Doesn't the above script do that? Or is it the actual kick messages that concern you?
no i just want to make it more easy for operators
so they dont have to make up a reason themselves :)
lol
then they must use usercommands :P
Ah ok, I don't know how to script for the hub to send user commands, someone else might be able to help you with that. A decent solution for this would be, in your DC++ client, go to File > Settings > Advanced > User Commands > Add >
For command type Select > Chat
For context check all 3 of them.
in Parameters, Name it !kick porn for example
In command add, <%[mynick]> !kick %[nick] your_reason_here|
i.e.:
<%[mynick]> !kick %[nick] illegal porn|
Click OK. You can add as many as you'd like, and tell your Ops to do the same. This all may prove inadaquate, or I may of lost you, but it's one solution.
Now if you right click a nick you should be able to kick them straight away with that reason.
(http://rnrdoctor.sytes.net/usercmd.jpg)
ok thank you very much :)
could a short cut type script be used for this?
Example (really rough one)
if !kick = 1 then 'dont share illegal porn'
= 2 then 'you dont have enough slots open'
You get the idea?
hi
here is my Kick by rules bot , just dont have time to but it does exclay wot u wont , i cheack back tonight and see if i can update it alittle
Rules kicker (saves typeing a reason) >>> http://board.univ-angers.fr/thread.php?threadid=2240&boardid=12&sid=70cad8af1a9f963fab99ec72472aa344 (http://board.univ-angers.fr/thread.php?threadid=2240&boardid=12&sid=70cad8af1a9f963fab99ec72472aa344)
yours
shad