someone got this script ?
if you got, plz post it here... ;)
/shipis
Hmm... i dont... but i think its in MM script... ;)
Try there...
In where ?
/shipis
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
did you tested this script...
looks like its not working...
when im kicking it shows i have been kicked, but dont kick...
/shipis
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
Not banning after 3 kicks...
/shipis
it kicks 3 times then 4 kick is a ban
Nop, not working for me...
5x kick, no BAN
/shipis
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
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
ehehehe thx :o)
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...
Nop, not working...
Maby test it...
And when it works post the script...
/shipis
yep btw no scripted kicks will work
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
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
Hmmm well works fine for me, anyways, was just a quick written one :o)
Maby you can post working script here?
/shipis
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
:]
Thnx...
/shipis
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
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
Enjoy it ,,, MMmmm Its taken one more brick off my shoulder,
Thanks loads , Great work .... :]