3 x kick = ban
 

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

3 x kick = ban

Started by servaks, 20 October, 2003, 20:01:12

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

servaks

someone got this script ?
if you got, plz post it here...   ;)

/shipis
My hub is back! (yeeeeeey)

hub.servaks.com


Alexei

Hmm... i dont... but i think its in MM script... ;)
Try there...

servaks

My hub is back! (yeeeeeey)

hub.servaks.com


pHaTTy

hmm 1 sec i write...................................ok

--Quick 3kick ban by Phatty

conquered={}

function DataArrival(user,data)
if (strfind(data, "$Kick")) then
		s,e, Name = strfind(data,"$Kick+%s+(%S+)|")
		nick = GetItemByName(Name)
		if conquered[nick]==nil then conquered[nick]=1
			return 1
		elseif conquered[nick]==1 then conquered[nick]=2
			return 1
		elseif conquered[nick]==2 then conquered[nick]=3
			return 1
		elseif conqeured[nick]==3 then conquered[nick]=nil
			nick:Ban()
		end
	end
end

there you go l8rr,,

-phatty
Resistance is futile!

servaks

did you tested this script...
looks like its not working...
when im kicking it shows i have been kicked, but dont kick...

/shipis
My hub is back! (yeeeeeey)

hub.servaks.com


pHaTTy

hmmm

--Quick 3kick ban by Phatty

conquered={}

function DataArrival(user,data)
if (strfind(data, "$Kick")) then
		s,e, Name = strfind(data,"$Kick+%s+(%S+)|")
		nick = GetItemByName(Name)
		if conquered[nick]==nil then conquered[nick]=1
			return 0
		elseif conquered[nick]==1 then conquered[nick]=2
			return 0
		elseif conquered[nick]==2 then conquered[nick]=3
			return 0
		elseif conqeured[nick]==3 then conquered[nick]=nil
			nick:Ban()
		end
	end
end

-phatty
Resistance is futile!

servaks

Not banning after 3 kicks...


/shipis
My hub is back! (yeeeeeey)

hub.servaks.com


pHaTTy

it kicks 3 times then 4 kick is a ban
Resistance is futile!

servaks

#8
Nop, not working for me...

5x kick, no BAN

/shipis
My hub is back! (yeeeeeey)

hub.servaks.com


pHaTTy

brrrrrrrr

--Quick 3kick ban by Phatty

conquered={}

function DataArrival(user,data)
if (strfind(data, "$Kick")) then
		s,e, Name = strfind(data,"$Kick+%s+(%S+)|")
		nick = GetItemByName(Name)
		if conquered[nick]==nil then conquered[nick]=1
			return 0
		elseif conquered[nick]==1 then conquered[nick]=2
			return 0
		elseif conquered[nick]==2 then conquered[nick]=3
			return 0
		elseif conqeured[nick]==3 then conquered[nick]=nil
			nick:Ban()
			return 1
		end
	end
end
Resistance is futile!

Alexei

Not sure if the last code will work... hmm... but who knows... its phatty that wrote the boty :S ... then it will work... i hope

pHaTTy

Resistance is futile!

klownietklowniet

I would suggest maybe:

strsub(data, 1, 5) == "$Kick"

and about the kicks... are you using any other command? Like !kick or something, because only right click kicks are caught by this script...
[ > DC - UniteD < ]

servaks

Nop, not working...
Maby test it...
And when it works post the script...

/shipis
My hub is back! (yeeeeeey)

hub.servaks.com


pHaTTy

yep btw no scripted kicks will work
Resistance is futile!

Alexei

Hmm... well lets see...
If u use if data == "$Kick" or cmd == "!kick"
just use both variants in a script...
Im not saying that the things i wrote above will work...but try...

PS...dont forget to define the user there...lol
1 dude wrote a script that kicks SOME OTHER DUDE!
NOT the 1 you wanna kick :S

klownietklowniet

I think the regex is buggy in your version: Try this one:

s,e,Name = strfind(data,"%S+%s(.+)")

because:

s,e, Name = strfind(data,"$Kick+%s+(%S+)|")

there is a + after $Kick that shouldn't be there I think
[ > DC - UniteD < ]

pHaTTy

Hmmm well works fine for me, anyways, was just a quick written one :o)
Resistance is futile!

servaks

#18
Maby you can post working script here?

/shipis
My hub is back! (yeeeeeey)

hub.servaks.com


Snoris

#19
botname = "Ban-Guy"
maxKicks = 3
usrKicks = { }

ignoreKicks = nil
silentKicks = nil
silentKickPMs = nil

function DataArrival(user, data)
	if strsub(data, 1, 1) == "<" then
		local s, e, who, why = strfind(data, "^%b<> %S+ is kicking (%S+) because: (.*)|$")
		if s and silentKicks then return 1 end
	elseif strsub(data, 1, 3) == "$To" then
		local s, e, who, why = strfind(data, "^%$To: (%S+) From: %S+ %$%b<> You are being kicked because: (.*)|$")
		if s and silentKickPMs then return 1 end
	elseif strsub(data, 1, 5) == "$Kick" then
		local s, e, who = strfind(data, "^%$Kick (%S+)|$")
		if s then
			local tmp = GetItemByName(who)
			usrKicks[who] = usrKicks[who] or 0
			usrKicks[who] = usrKicks[who] + 1
			if tmp and usrKicks[who] >= maxKicks then
				SendToAll(botname, "User "..who.." has been auotobanned cus he dosen?t follow the rules")
				tmp:SendData("*** Ur Banned Becouse U Didn?t Follow The Rules...Have A Nice Day.")
				tmp:NickBan() -- tmp:Ban()
			end if ignoreKicks then return 1 end
		end
	end
end -- tezlo

This one works...I?m using it =p
 :]

servaks

My hub is back! (yeeeeeey)

hub.servaks.com


[G-T-E]Gate?

Great Script If I may say.
Works like a charm- But it omnly does a NickBan, Any chance on a Total ban including IP aswell ??
Looking forward to it.
Thanks

Snoris

botname = "Ban-Guy"
maxKicks = 3
usrKicks = { }

ignoreKicks = nil
silentKicks = nil
silentKickPMs = nil

function DataArrival(user, data)
	if strsub(data, 1, 1) == "<" then
		local s, e, who, why = strfind(data, "^%b<> %S+ is kicking (%S+) because: (.*)|$")
		if s and silentKicks then return 1 end
	elseif strsub(data, 1, 3) == "$To" then
		local s, e, who, why = strfind(data, "^%$To: (%S+) From: %S+ %$%b<> You are being kicked because: (.*)|$")
		if s and silentKickPMs then return 1 end
	elseif strsub(data, 1, 5) == "$Kick" then
		local s, e, who = strfind(data, "^%$Kick (%S+)|$")
		if s then
			local tmp = GetItemByName(who)
			usrKicks[who] = usrKicks[who] or 0
			usrKicks[who] = usrKicks[who] + 1
			if tmp and usrKicks[who] >= maxKicks then
				SendToAll(botname, "User "..who.." has been auotobanned cus he dosen?t follow the rules")
				tmp:SendData("*** Ur Banned Becouse U Didn?t Follow The Rules...Have A Nice Day.")
				tmp:NickBan() -- tmp:Ban()
			end if ignoreKicks then return 1 end
		end
	end
end -- tezlo

Just replace the tmp:nickban() with the tmp:ban()
Or just write tmp:banip()

=))

Enjoy it

[G-T-E]Gate?

Enjoy it ,,, MMmmm  Its taken one more brick off my shoulder,
Thanks loads , Great work .... :]

SMF spam blocked by CleanTalk