HI
im using one Cleanmain chat script but it only clean at my end not the all users end, i want when i use command it should clear main chat for all users also not only at my end, how i can do that ? and which script i need to clean main chat ?
please help
Ptokax script? post it, see what we can do.
--[[
For new API
HillyBilly 26 sept 07
Took some bits and parts from
CrazyGuy and American Idiot Lua 5.1.x and credits to them.
28 sept 07
added Cleaners table who may or may not clean. - speedX
--]]
cmdClean = "cleanmain"
soapwater = 100 -- For more or less soap and water
tCleaners = {
[-1] = 0, -- Unreg Users
- = 1, -- Masters
[1] = 1, -- Operators
[2] = 0, -- VIPs
[3] = 0, -- Regs
}
ChatArrival = function(User,Data)
if tCleaners[User.iProfile] == 1 then
local _,_,cmd = string.find(Data, "%b<>%s%p(%S+)|")
if cmd and (cmd == cmdClean) then
local str = "\n\n"..string.rep("\t",3).." "..
User.sNick.." is clearing Main Chat... ???"..
string.rep("\n",soapwater)..string.rep("\t",3).."Main Chat Has "..
"Been Cleared By: "..User.sNick.." ???\n\n"
Core.SendToAll(str)
return true
else
return "Clear Main Chat","",""
end
end
end
script is running fine, try less soapwater, perhaps your flooding clients :(
Only issue I found was a missing Bot.. some clients send those messages to kickbar, try this:
--[[
For new API
HillyBilly 26 sept 07
Added Botname By The-Master 13 jan 2015
Took some bits and parts from
CrazyGuy and American Idiot Lua 5.1.x and credits to them.
28 sept 07
added Cleaners table who may or may not clean. - speedX
--]]
Bot = "Whiper"
cmdClean = "cleanmain"
soapwater = 100 -- For more or less soap and water
tCleaners = {
[-1] = 0, -- Unreg Users
[0] = 1, -- Masters
[1] = 1, -- Operators
[2] = 0, -- VIPs
[3] = 0, -- Regs
}
ChatArrival = function(User,Data)
if tCleaners[User.iProfile] == 1 then
local _,_,cmd = string.find(Data, "%b<>%s%p(%S+)|")
if cmd and (cmd == cmdClean) then
local str = "<"..Bot..">\n\n"..string.rep("\t",3).." "..
User.sNick.." is clearing Main Chat... ???"..
string.rep("\n",soapwater)..string.rep("\t",3).."Main Chat Has "..
"Been Cleared By: "..User.sNick.." ???\n\n"
Core.SendToAll(str)
return true
else
return "Clear Main Chat","",""
end
end
end
thanks working fine :D
Couldnt resist to touch it little :P here is my version :yes:
--[[
For new API
HillyBilly 26 sept 07
Added Botname By The-Master 13 jan 2015
Took some bits and parts from
CrazyGuy and American Idiot Lua 5.1.x and credits to them.
28 sept 07
added Cleaners table who may or may not clean. - speedX
07.05.2015
Removed Cleaners table and made it work only for users with key.
Cleaned code little - Cêñoßy†ê
--]]
Bot = "Whiper"
cmdClean = "cleanmain"
soapwater = 1000 -- For more or less soap and water
function ChatArrival(user,data)
if Core.GetUserData(user,11) then
local _,_,cmd = data:find("%b<>%s%p(%S+)|")
if cmd and cmd == cmdClean then
local str = "<"..Bot..">\n\n"..string.rep("\t",3).." "..
user.sNick.." is clearing Main Chat..."..
string.rep("\n",soapwater)..string.rep("\t",3).."Main Chat Has "..
"Been Cleaned By: "..user.sNick.."\n\n"
return Core.SendToAll(str),true
end
end
end