Hi, does anyone have a script for Ptokax 17.03 to remove permanently banned ip after xx time automatically?
This should do what you want..
-- Auto Clear Perm Banlist by Typhoon?
-- Request by LoTek
-- hope it does what you need
--// Time Units
sTime = {}
sTime["Sec"] = 1000
sTime["Min"] = 60*sTime.Sec
sTime["Hour"] = 60*sTime.Min
sTime["Day"] = 24*sTime.Hour
sTime["Week"] = 7*sTime.Day
sTime["Month"] = 30*sTime.Day
sTime["Year"] = 365*sTime.Day
sTime["Interval"] = 2 -- changed interval here
function Main()
SetTimer(sTime.Interval*sTime.Day) -- change Day with different choice, default is cleared everu 2 days
StartTimer()
end
function OnTimer()
SendToOps("BanList was cleared")
ClearPermBan()
end
Typhoon?
QuoteOriginally posted by Typhoon?
This should do what you want..
-- Auto Clear Perm Banlist by Typhoon?
-- Request by LoTek
-- hope it does what you need
--// Time Units
sTime = {}
sTime["Sec"] = 1000
sTime["Min"] = 60*sTime.Sec
sTime["Hour"] = 60*sTime.Min
sTime["Day"] = 24*sTime.Hour
sTime["Week"] = 7*sTime.Day
sTime["Month"] = 30*sTime.Day
sTime["Year"] = 365*sTime.Day
sTime["Interval"] = 2 -- changed interval here
function Main()
SetTimer(sTime.Interval*sTime.Day) -- change Day with different choice, default is cleared everu 2 days
StartTimer()
end
function OnTimer()
SendToOps("BanList was cleared")
ClearPermBan()
end
Typhoon?
Watching the code, it looks like this clears out all permbanlist, I would like to leave nicks banned, but not ips, is possibile to do so?
QuoteOriginally posted by LoTeK_
QuoteOriginally posted by Typhoon?
This should do what you want..
-- Auto Clear Perm Banlist by Typhoon?
-- Request by LoTek
-- hope it does what you need
--// Time Units
sTime = {}
sTime["Sec"] = 1000
sTime["Min"] = 60*sTime.Sec
sTime["Hour"] = 60*sTime.Min
sTime["Day"] = 24*sTime.Hour
sTime["Week"] = 7*sTime.Day
sTime["Month"] = 30*sTime.Day
sTime["Year"] = 365*sTime.Day
sTime["Interval"] = 2 -- changed interval here
function Main()
SetTimer(sTime.Interval*sTime.Day) -- change Day with different choice, default is cleared everu 2 days
StartTimer()
end
function OnTimer()
SendToOps("BanList was cleared")
ClearPermBan()
end
Typhoon?
Watching the code, it looks like this clears out all permbanlist, I would like to leave nicks banned, but not ips, is possibile to do so?
Not is possible LoteK_ ... not exist option for Clear only nick sorry :P
no, not nick, ips, i would like to leave nicks banned, but to clears ips every xx time automatically.
Ok this should work then:
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
--// Clear PermBanList on IPs by NightLitch
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
interval_time = 1
interval_value = "month"
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
sTime = {}
sTime["sec"] = 1000
sTime["min"] = 60*sTime.sec
sTime["hour"] = 60*sTime.min
sTime["day"] = 24*sTime.hour
sTime["week"] = 7*sTime.day
sTime["month"] = 30*sTime.day
sTime["year"] = 365*sTime.day
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
function Main()
SetTimer(tonumber(interval_time) * sTime[string.lower(interval_value)])
StartTimer()
end
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
function OnTimer()
local c = 0
local list = frmHub:GetPermBanList()
for i = 1,table.getn(list) do
if string.find(list[i].sIP, "%d+%.%d+%.%d+%.%d+") then
c = c + 1
Unban(list[i].sIP)
end
end
SendToOps(frmHub:GetHubBotName(), "*** "..c.." IPs has been unbanned from Banlist")
end
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
--// NightLitch
Cheers
Updated:
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
--// Clear PermBanList by NightLitch
--// Version:
--// 0.1 - Created Bot
--// 0.2 - Added Unban mode. Unban Nick(s) or IP(s)
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
interval_time = 1 -- enter a number
interval_value = "month" -- enter sec, min, hour, day, week, month, year
unban_mode = 1 -- 1 = unban IPs / 0 = unban Nicks
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
sTime = {}
sTime["sec"] = 1000
sTime["min"] = 60*sTime.sec
sTime["hour"] = 60*sTime.min
sTime["day"] = 24*sTime.hour
sTime["week"] = 7*sTime.day
sTime["month"] = 30*sTime.day
sTime["year"] = 365*sTime.day
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
function Main()
SetTimer(tonumber(interval_time) * sTime[string.lower(interval_value)])
StartTimer()
end
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
function OnTimer()
local c = 0
local list = frmHub:GetPermBanList()
for i = 1,table.getn(list) do
if tonumber(unban_mode) == 1 and string.find(list[i].sIP, "%d+%.%d+%.%d+%.%d+") then
c = c + 1
Unban(list[i].sIP)
elseif tonumber(unban_mode) == 0 and not string.find(list[i].sIP, "%d+%.%d+%.%d+%.%d+") then
c = c + 1
Unban(list[i].sIP)
end
end
if tonumber(unban_mode) == 1 then
SendToOps(frmHub:GetHubBotName(), "*** "..c.." IP(s) have been unbanned from Banlist")
elseif tonumber(unban_mode) == 0 then
SendToOps(frmHub:GetHubBotName(), "*** "..c.." Nick(s) have been unbanned from Banlist")
end
end
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
--// NightLitch
QuoteOriginally posted by NightLitch
Updated:
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
--// Clear PermBanList by NightLitch
--// Version:
--// 0.1 - Created Bot
--// 0.2 - Added Unban mode. Unban Nick(s) or IP(s)
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
interval_time = 1 -- enter a number
interval_value = "month" -- enter sec, min, hour, day, week, month, year
unban_mode = 1 -- 1 = unban IPs / 0 = unban Nicks
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
sTime = {}
sTime["sec"] = 1000
sTime["min"] = 60*sTime.sec
sTime["hour"] = 60*sTime.min
sTime["day"] = 24*sTime.hour
sTime["week"] = 7*sTime.day
sTime["month"] = 30*sTime.day
sTime["year"] = 365*sTime.day
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
function Main()
SetTimer(tonumber(interval_time) * sTime[string.lower(interval_value)])
StartTimer()
end
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
function OnTimer()
local c = 0
local list = frmHub:GetPermBanList()
for i = 1,table.getn(list) do
if tonumber(unban_mode) == 1 and string.find(list[i].sIP, "%d+%.%d+%.%d+%.%d+") then
c = c + 1
Unban(list[i].sIP)
elseif tonumber(unban_mode) == 0 and not string.find(list[i].sIP, "%d+%.%d+%.%d+%.%d+") then
c = c + 1
Unban(list[i].sIP)
end
end
if tonumber(unban_mode) == 1 then
SendToOps(frmHub:GetHubBotName(), "*** "..c.." IP(s) have been unbanned from Banlist")
elseif tonumber(unban_mode) == 0 then
SendToOps(frmHub:GetHubBotName(), "*** "..c.." Nick(s) have been unbanned from Banlist")
end
end
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
--// NightLitch
NightLitch is king of LUA :D.. i'm you're best fan LOL
QuoteOriginally posted by 6Marilyn6Manson6
NightLitch is king of LUA :D.. i'm you're best fan LOL
Well thank you... :D
Been a while since I posted something here now...
Though I would try and start helping out again...
When I have some time over :P
Cheers // NL
Eheeheheh NightLitch no prob.. you're the king and we wait new release of Thor in LUA 5... Go Go NightLitch ;)
QuoteOriginally posted by NightLitch
Updated:
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
--// Clear PermBanList by NightLitch
--// Version:
--// 0.1 - Created Bot
--// 0.2 - Added Unban mode. Unban Nick(s) or IP(s)
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
interval_time = 1 -- enter a number
interval_value = "month" -- enter sec, min, hour, day, week, month, year
unban_mode = 1 -- 1 = unban IPs / 0 = unban Nicks
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
sTime = {}
sTime["sec"] = 1000
sTime["min"] = 60*sTime.sec
sTime["hour"] = 60*sTime.min
sTime["day"] = 24*sTime.hour
sTime["week"] = 7*sTime.day
sTime["month"] = 30*sTime.day
sTime["year"] = 365*sTime.day
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
function Main()
SetTimer(tonumber(interval_time) * sTime[string.lower(interval_value)])
StartTimer()
end
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
function OnTimer()
local c = 0
local list = frmHub:GetPermBanList()
for i = 1,table.getn(list) do
if tonumber(unban_mode) == 1 and string.find(list[i].sIP, "%d+%.%d+%.%d+%.%d+") then
c = c + 1
Unban(list[i].sIP)
elseif tonumber(unban_mode) == 0 and not string.find(list[i].sIP, "%d+%.%d+%.%d+%.%d+") then
c = c + 1
Unban(list[i].sIP)
end
end
if tonumber(unban_mode) == 1 then
SendToOps(frmHub:GetHubBotName(), "*** "..c.." IP(s) have been unbanned from Banlist")
elseif tonumber(unban_mode) == 0 then
SendToOps(frmHub:GetHubBotName(), "*** "..c.." Nick(s) have been unbanned from Banlist")
end
end
--//+++++++++++++++++++++++++++++++++++++++++++++++++++++++
--// NightLitch
thanks, you made me a very happy man :P
1 question, what is interval_time = 1 -- enter a number
thanks again.
If the values were: interval time = 2 and interval value = "day", the PermBanList check and cleaning would be done every 2 days.
Best regards
How do I get this script to clean both banned ip's and nick's?
Also just to make sure I got it right:
This script will delete the bans that are older then x time?
It wont clear the whole banlist when it starts up, right?
Is there really noone who can answer my q's?
-- Auto Clear Perm Banlist by Typhoon?
-- Request by LoTek
-- hope it does what you need
--// Small Touched by 6Marilyn6Manson6 23/03/2006
BotName = frmHub:GetHubBotName()
Message = "Perm/Temp BanList Was Cleared"
--// Time Units
sTime = {}
sTime["Sec"] = 1000
sTime["Min"] = 60*sTime.Sec
sTime["Hour"] = 60*sTime.Min
sTime["Day"] = 24*sTime.Hour
sTime["Week"] = 7*sTime.Day
sTime["Month"] = 30*sTime.Day
sTime["Year"] = 365*sTime.Day
sTime["Interval"] = 2 -- changed interval here
--//
function Main()
SetTimer(sTime.Interval*sTime.Day) -- change Day with different choice, default is cleared everu 2 days
StartTimer()
end
function OnTimer()
ClearTempBan()
ClearPermBan()
SendToOps(BotName,Message)
end
--// 6Marilyn6Manson6
You like this?
I can look into it later, but it can be done, though it has to know the exact time of the ban.
6Marilyn6Manson6 it should NOT clearthe banlist, as previously stated.
QuoteHow do I get this script to clean both banned ip's and nick's?
I have read this :D
and I have tested it...
[2006-03-23 | 20:27:18] <[666]-LawMaker-> Perm/Temp BanList Was Cleared
[2006-03-23 | 20:27:34] <[666]-LawMaker-> *** 82.59.84.79 is banned by 6Marilyn6Manson6
[2006-03-23 | 20:27:39] <[666]-LawMaker-> *** 82.59.84.80 is banned by 6Marilyn6Manson6
[2006-03-23 | 20:27:41] <[666]-LawMaker-> *** 82.59.84.81 is banned by 6Marilyn6Manson6
[2006-03-23 | 20:27:48] <[666]-LawMaker-> Perm/Temp BanList Was Cleared
here work ( i have set interval at 30seconds ) ^^