--MsgTimer 1.0c --by Mutor -- --Sends a text file in pm to all on timer or by command. --sends message at once, not by line. -- -- --User Settings------------------------------------------------------------------------------------- bot = "Messenger" -- Name for bot mins = "60" -- Interval [in minutes] between Msgs file = "Message.txt" -- File to send as pm, should reside in scripts folder Prefix = "+" -- Command prefix MsgComm = "msg" -- Command to send Ad immediately --End User Settings---------------------------------------------------------------------------------- function Main() frmHub:RegBot(bot) SetTimer(mins*60000) StartTimer() end function DataArrival(user, data) s,e,cmd = strfind(data, "%b<>%s+(%S+)(%S+)") if (cmd==Prefix..MsgComm) and user.bOperator then OnTimer() end end function OnTimer() local handle = "" if readfrom(file) then readfrom(file) handle = read("*a") handle = gsub(handle,"|",strchar(166)) handle = gsub(handle,"\n","\r\n") end SendPmToAll(bot,"\r\n\r\n"..handle) end