Need scripts for block URL links in maichat
Sorry my bad English :(
------------------------------------
Owner for Latvian hub Alfa
Try this:
-- Block URL links 0.1
-- Made by 6Marilyn6Manson6 by 01/11/2005
--
-- Set action for advertising ( 0=Warn / 1=Disconnect / 2=Kick / 3=Ban / 4=TimeBan)
BotName = "NoLinks"
Action = 1
TimeBan = 20 -- Time Ban period
SITES = { "www.","http://","ftp://","irc.","cs." }
function Main()
frmHub:RegBot(BotName)
end
function SiteCheck(user,msg)
for value,index in SITES do
if string.find(msg,index) then
if Action==0 then
user:SendPM(BotName,"You are Warned for advertising: "..msg) return "Warned"
elseif Action==1 then
user:SendPM(BotName,"You are Disconnected for advertising: "..msg) user:Disconnect() return "Disconnected"
elseif Action==2 then
user:SendPM(BotName,"You are Kicked for advertising: "..msg) user:TempBan() return "Kicked"
elseif Action==3 then
user:SendPM(BotName,"You are Banned for advertising: "..msg) user:Ban() return "Banned"
elseif Action==4 then
user:SendPM(BotName,"You are TimeBanned for advertising: "..msg) user:TimeBan(TimeBan) return "TimeBanned"
end
end
end
end
C ya
Small fix :]
-- Block URL links 0.1
-- Made by 6Marilyn6Manson6 by 01/11/2005
--
-- Set action for advertising ( 0=Warn / 1=Disconnect / 2=Kick / 3=Ban / 4=TimeBan)
BotName = "NoLinks"
Action = 1
TimeBan = 20 -- Time Ban period
SITES = { "www.","http://","ftp://","irc.","cs." }
function Main()
frmHub:RegBot(BotName)
end
function SiteCheck(user,msg)
for value,index in SITES do
if string.find(msg,index) then
if Action==0 then
user:SendPM(BotName,"You are Warned for advertising: "..msg) return "Warned"
elseif Action==1 then
user:SendPM(BotName,"You are Disconnected for advertising: "..msg) user:Disconnect() return "Disconnected"
elseif Action==2 then
user:SendPM(BotName,"You are Kicked for advertising: "..msg) user:TempBan() return "Kicked"
elseif Action==3 then
user:SendPM(BotName,"You are Banned for advertising: "..msg) user:Ban() return "Banned"
elseif Action==4 then
user:SendPM(BotName,"You are TimeBanned for advertising: "..msg) user:TimeBan(TimeBan) return "TimeBanned"
[COLOR=red]end[/COLOR]
end
end
end
Oh yeah sorry for my error.. i ave made it in 2 minutes :p.. Post update. Thanks Cb :D
thanks :)))
QuoteOriginally posted by Zigurds
thanks :)))
Welcome dude :D
Sorry, one moment
Need only not visible URL links in maichat,
unwanted warns, bans or kicks
for admin rule extraneous
Sorry my bad English :(
------------------------------------
Owner for Latvian hub Alfa
note. Only mainchat, no private
Try this one
-- Block URL links 0.1
-- Made by 6Marilyn6Manson6 by 01/11/2005
-- Mixed with parts of Simple AntiAdvertising Bot by NightLitch 2005-07-10 by C??o?y??
-- requested by Zigurds
-- Checks only mainchat
-- Set action for advertising ( 0=Warn / 1=Disconnect / 2=Kick / 3=Ban / 4=TimeBan)
-- Set who can type URL's ( 0=Yes 1=No)
BotName = "NoLinks"
Action = 0
TimeBan = 20 -- Time Ban period
CheckWho = {
[0] = 0, --Master
[1] = 0, --Operator
[2] = 1, --Vip
[3] = 1, --Reg
[-1] = 1, --Unregistered
}
function Main()
frmHub:RegBot(BotName)
end
adverTable = { "www.","http://","ftp://","irc.","cs."}
function ChatArrival(user,data)
if CheckWho == 1 then
local s,e,msg = string.find(data, "%b<>%s*(.*)%|$")
if checkForAdvertising(msg) then
if Action == 0 then
user:SendPM(BotName,"You are Warned for advertising: "..msg)
SendToOps(BotName, "*** User "..user.sName.." has been warned for advertising: "..msg)
return "Warned"
end
if Action == 1 then
user:SendData(BotName, "*** You have been Disconnected for advertising !!")
SendToOps(BotName, "*** User "..user.sName.." has been Disconnected for advertising: "..msg)
user:TempBan() return "Disconnected"
end
if Action == 2 then
user:SendData(BotName, "*** You have been kicked for advertising !!")
SendToOps(BotName, "*** User "..user.sName.." has been kicked for advertising: "..msg)
user:TempBan() return "Kicked"
end
if Action == 3 then
user:SendData(BotName, "*** You have been banned for advertising !!")
SendToOps(BotName, "*** User "..user.sName.." has been banned for advertising: "..msg)
user:Ban() return "Banned"
end
if Action == 4 then
user:SendData(BotName, "*** You have been timebanned for advertising !!")
SendToOps(BotName, "*** User "..user.sName.." has been timebanned for advertising: "..msg)
user:TimeBan(TimeBan) return "TimeBanned"
end
end
end
end
function checkForAdvertising(msg)
for i = 1,table.getn(adverTable) do
if string.find( msg , adverTable[i] , 1 , true ) then
return 1
end
end
return
end
GooD Cy?e??o?.. NightLitch is superstar :D
Small update in CheckWho:
-- Block URL links 0.1
-- requested by Zigurds
-- Made by 6Marilyn6Manson6 by 01/11/2005
--
-- Set action for advertising ( 0=Warn / 1=Disconnect / 2=Kick / 3=Ban / 4=TimeBan)
-- Set who can type URL's ( 0=Yes 1=No)
-- Checks only mainchat
BotName = "NoLinks"
Action = 0
TimeBan = 20 -- Time Ban period
CheckWho = {
[0] = 0, --Master
[1] = 0, --Operator
[2] = 1, --Vip
[3] = 1, --Reg
[4] = 0, --Moderator
[5] = 0, --NetFounder
[-1] = 1, --Unregistered
}
function Main()
frmHub:RegBot(BotName)
end
adverTable = { "www.","http://","ftp://","irc.","cs."}
function ChatArrival(user,data)
if CheckWho == 1 then
local s,e,msg = string.find(data, "%b<>%s*(.*)%|$")
if checkForAdvertising(msg) then
if Action == 0 then
user:SendPM(BotName,"You are Warned for advertising: "..msg)
SendToOps(BotName, "*** User "..user.sName.." has been warned for advertising: "..msg)
return "Warned"
end
if Action == 1 then
user:SendData(BotName, "*** You have been Disconnected for advertising !!")
SendToOps(BotName, "*** User "..user.sName.." has been Disconnected for advertising: "..msg)
user:TempBan() return "Disconnected"
end
if Action == 2 then
user:SendData(BotName, "*** You have been kicked for advertising !!")
SendToOps(BotName, "*** User "..user.sName.." has been kicked for advertising: "..msg)
user:TempBan() return "Kicked"
end
if Action == 3 then
user:SendData(BotName, "*** You have been banned for advertising !!")
SendToOps(BotName, "*** User "..user.sName.." has been banned for advertising: "..msg)
user:Ban() return "Banned"
end
if Action == 4 then
user:SendData(BotName, "*** You have been timebanned for advertising !!")
SendToOps(BotName, "*** User "..user.sName.." has been timebanned for advertising: "..msg)
user:TimeBan(TimeBan) return "TimeBanned"
end
end
end
end
function checkForAdvertising(msg)
for i = 1,table.getn(adverTable) do
if string.find( msg , adverTable[i] , 1 , true ) then
return 1
end
end
return
end
C ya
He he, mutual grace :)
QuoteOriginally posted by Zigurds
He he, mutual grace :)
No prob you're welcome here :D