PtokaX forum

Lua 5.3/5.2/5.1 Scripts (for PtokaX 0.4.0.0 and newer) => Request for scripts => Topic started by: Black-Dragon on 04 December, 2011, 23:55:06

Title: Command Report
Post by: Black-Dragon on 04 December, 2011, 23:55:06
Hi All

--[[
       Cmd spy
]]--

Prefix = "[!%+%*%/]"

function ChatArrival(user, data)
local _,_,arg = string.find(data, "%b<>%s+(.*)%|")
   if string.find(arg, "^"..Prefix) then
      Core.SendPmToProfile(0, SetMan.GetString(24), "************Attenzione Comando Usato Da*********** ( "..user.sNick.." ) Con IP ( "..user.sIP.." ): "..arg)
      return false
   end
end


I would like to know and possibbile change this script so that the message appears opchat so?
*******************************************************
Warning Command Used To :Command

Nick :

Profile :

Ip :

Time :

Date :
*******************************************************

thx
Title: Re: Command Report
Post by: Black-Dragon on 05 December, 2011, 12:26:32
mutor thank you so much, You are a great
Title: Re: Command Report
Post by: Black-Dragon on 05 December, 2011, 14:24:13
how to add the prefix !
Title: Re: Command Report
Post by: Cariga on 01 April, 2012, 10:40:45
What i must change to send the report to one nick instead of op chat ?
Title: Re: Command Report
Post by: the-master on 04 April, 2012, 07:02:47
change line       Core.SendToOpChat("<"..Bot..">
into       Core.SendToNick("usersnick", "<"..Bot..">
or       Core.SendPmToNick("usersnick", "<"..Bot..">
and change usersnick into the nick you want to send to or add a line before script: usersnick = "yournick"