PtokaX forum

Archive => Archived 5.0 boards => Request for scripts => Topic started by: kEwL on 14 July, 2005, 12:39:20

Title: pm to ops
Post by: kEwL on 14 July, 2005, 12:39:20
can anyone make a script like the pm to ops in robocop
Title:
Post by: Madman on 14 July, 2005, 15:29:08
Ahh... starting the day with some lua =)

-- PmToOps
-- Request by kEwL
-- Made by Madman

Bot = "PmToOps"

function Main()
frmHub:RegBot(Bot)
end

function ToArrival(curUser, data)
local _,_,To,From,Msg = string.find(data, "$To:%s+(%S+)%s+From:%s+(%S+)%s+%S+%s+(.+)|")
if To == Bot then
if curUser.bOperator then
curUser:SendPM(Bot, "You are op and not able to use the Opchat") return 1
else
SendPmToOps(Bot, From.." want us to know: " ..Msg)
curUser:SendPM(Bot, "Your pm has been sent to all Ops")
end
end
end
Title:
Post by: kEwL on 14 July, 2005, 17:48:18
ty m8 :)