a script with simple kicks
 

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

a script with simple kicks

Started by #jdslkfjals#, 03 January, 2005, 20:58:24

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

#jdslkfjals#

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 ?

imby

-- 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.

#jdslkfjals#

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

imby

Doesn't the above script do that? Or is it the actual kick messages that concern you?

#jdslkfjals#

no i just want to make it more easy for operators

so they dont have to make up a reason themselves :)

bastya_elvtars

lol

then they must use usercommands  :P
Everything could have been anything else and it would have just as much meaning.

imby

#6
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.

bastya_elvtars

Everything could have been anything else and it would have just as much meaning.

#jdslkfjals#

ok thank you very much :)

n1ck

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?
dcuk.direct-connect.co.uk

**compiled bots are like what microsoft is to open source!**

((UKSN))shad_dow

#10
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

yours

shad
creator of Therapy-X? bot

SMF spam blocked by CleanTalk