PtokaX forum

Archive => Archived 4.0 boards => Help with Lua 4 scripts => Topic started by: GaMeFaNaTiC on 29 October, 2003, 10:43:14

Title: op using banner .......?
Post by: GaMeFaNaTiC on 29 October, 2003, 10:43:14
botname = "{C2TM}?"

function DataArrival(curUser, data)
if (strsub(data, 1, 1) == "<") then
data = strsub(data, 1, strlen(data)-1)
s,e,cmd,msg = strfind( data, "%b<>%s+(%S+)%s+(.*)")

if(cmd == "+banner") then
if msg then
local line = "\t\t"..strrep("--", strlen(msg)).."\r\n" -- about that
SendToAll(botname, "\r\n\r\n"..line..line.."\t\t- "..msg.." -\r\n"..line..line.."\r\n");
end
end
end
end


can smebody chnge this a bit so only an operator can use this function.??
Title:
Post by: GaMeFaNaTiC on 29 October, 2003, 18:00:15
can sme1 reply plz...   :(
Title:
Post by: NightLitch on 01 November, 2003, 17:51:17
Here try this one...

botname = "{C2TM}?"

function DataArrival(curUser, data)
if (strsub(data, 1, 1) == "<") then
data = strsub(data, 1, strlen(data)-1)
s,e,cmd,msg = strfind( data, "%b<>%s+(%S+)%s+(.*)")

if(cmd == "+banner") and curUser.bOperator then
if msg then
local line = "\t\t"..strrep("--", strlen(msg)).."\r\n" -- about that
SendToAll(botname, "\r\n\r\n"..line..line.."\t\t- "..msg.." -\r\n"..line..line.."\r\n");
end
end
end
end

/NightLitch
Title:
Post by: GaMeFaNaTiC on 01 November, 2003, 18:40:31
thanks!!
Title:
Post by: NightLitch on 01 November, 2003, 19:21:52
NP m8...