--ScreenCleaner.lua 1.1 by yepyepyep4711 and Hawk
--!cls will wipe the main chat clean (does that remind you of something? ;) )
--the command will be added to the rightclick menu of the OPs (optional)
botname = "ScreenCleaner"
rightclick = 0 -- if anything else than 1 rightclick menu won't appear
function DataArrival (curUser, sData)
command=strsub(sData,1,strlen(sData)-1)
s,e,cmd = strfind(command,"%b<>%s+(%S+)")
if curUser.bOperator then
if cmd=="!cls" then
temp = "\r\n"
for i=1,200,1 do
temp = temp.."\r\n"
end
SendToAll(botname, temp)
end
end
end
function OpConnected(curUser)
if rightclick == 1 then
curUser:SendData("$UserCommand 255 7")
curUser:SendData("$UserCommand 0 3")
curUser:SendData("$UserCommand 1 2 Clear Screen$<%[mynick]> !cls|")
end
end
Could someone translate it in Lua5? ?(
Try this one:
-- made by yepyepyep4711 and Hawk
-- converted to Lua 5 by jiten
botname = "ScreenCleaner"
rightclick = 0 -- if anything else than 1 rightclick menu won't appear
function ChatArrival (curUser, sData)
command=string.sub(sData,1,string.len(sData)-1)
s,e,cmd = string.find(command,"%b<>%s+(%S+)")
if curUser.bOperator then
if cmd=="!cls" then
temp = "\r\n"
for i=1,200,1 do
temp = temp.."\r\n"
end
SendToAll(botname, temp)
return 1
end
end
end
function OpConnected(curUser)
if rightclick == 1 then
curUser:SendData("$UserCommand 255 7")
curUser:SendData("$UserCommand 0 3")
curUser:SendData("$UserCommand 1 2 Clear Screen$<%[mynick]> !cls|")
end
end
Cheers
Try this one... Couldn't resist...-- made by ??
-- converted to Lua 5 by jiten
--- touched by Herodes
rightclick = 0 -- if anything else than 1 rightclick menu won't appear
function ChatArrival (curUser, sData)
if curUser.bOperator then
local s,e,cmd = string.find(string.sub( sData, 1, -2 ),"%b<>%s+(%S+)")
if (cmd=="!cls") then
SendToAll( string.rep( "\r\n", 200) )
return 1
end
end
end
function OpConnected(curUser)
if ( (rightclick == 1) and user.bUserCommand) then
curUser:SendData("$UserCommand 255 7")
curUser:SendData("$UserCommand 0 3")
curUser:SendData("$UserCommand 1 2 Clear Screen$<%[mynick]> !cls|")
end
end
Thanks :D
How can add a string with some words?
What's wrong with clients /clear command?
QuoteOriginally posted by kepp
What's wrong with clients /clear command?
it's only clear your screen....the scripts cleans everybodys...
Bad configured bot sending out junk messages to often to all users??
QuoteOriginally posted by kepp
What's wrong with clients /clear command?
Yups, for example, in case the main chat is flooded with unnecessary messages/pub, cleans everyone's window.
QuoteOriginally posted by jiten -- made by ??
yepyepyep4711 and Hawk
QuoteOriginally posted by bastya_elvtars
QuoteOriginally posted by jiten -- made by ??
yepyepyep4711 and Hawk
Roger that :]
My post updated.