Hi
I'm after a script, or piece of code that will create a PMtoOp user, so users can send it a PM and the message appears in opchat. If possible, I would like it to reply to the user saying the message has been sent.
TIA
Twix
here u go.
botname = "{?2?M}?Pm-To-Ops"
chatbotname = "{?2?M}?OpChat"
function Main()
frmHub:RegBot(botname)
frmHub:RegBot(chatbotname)
end
function DataArrival(user,data)
if (strsub(data, 1, strlen(botname) + 5) == "$To: "..botname) then
-- remove end pipe
data=strsub(data,1,strlen(data)-1)
_,_,message = strfind(data,"$%b<>%s+(.+)")
SendPmToOps(chatbotname, "<"..user.sName.."> "..message)
end
end
:D
Thnx, works like a charm :]