PtokaX forum

Archive => Archived 5.0 boards => Request for scripts => Topic started by: gemini on 08 June, 2005, 00:48:33

Title: request script spy chat history for op
Post by: gemini on 08 June, 2005, 00:48:33
request spy
it exists a script to see all user what say itself in private citizen and also is possible it in manner to do the alone vision to who want I with chat history for op

 this example:

SendTo = { --> 1=on/0=off
Title:
Post by: bastya_elvtars on 08 June, 2005, 01:47:15
QuoteOriginally posted by gemini
 request spy
it exists a script to see all user what say itself in private citizen and also is possible it in manner to do the alone vision to who want I with chat history for op

 this example:

SendTo = { --> 1=on/0=off
  • = 1,   -- Masters
  • [1] = 1,   -- Operators
    [2] = 1,   -- Vips
    [3] = 0,   -- Regs
    [4] = 1,   -- Moderator
    [5] = 1,   -- NetFounder
    [-1] = 0,  -- Users

    I wait your news cordial greetings
    thanks
Requesting a PM spy? Moderators (and Scooby Doo), where are you now?  :D
Title: request script spy user private message page 1
Post by: gemini on 08 June, 2005, 12:52:07
request script spy user private message chat history for op

request spy
it exists a script to see spy all user private message  what say itself in private citizen and also is possible it in manner to do the alone vision to who want I with chat history for op

this example:

SendTo = { --> 1=on/0=off
[X] Popup private messages
                     --   [ ] Ingnore message from users that are not online
                     --   [ ] Popup private messages from users that are not online
end

function OnExit()
savehistory()
end

function NewUserConnected(user)
   local n = table.getn(chathistory)
   local str = "<----------------------------------------------------------------------[ Last ( "..n.." ) chat messages ]----------->\r\n"
   for i = 1, n do str = str.."\r\n"..chathistory end
   user:SendPM(botname,str.."\r\n")
   user:SendPM(botname,"<--------------------------------------------------------------------------[ End of chat history ]--------------->")
end

OpConnected = NewUserConnected

function ChatArrival(user, data)
   if string.sub(data, 1, 1) ~= "<" then end
   local s,e,pre = string.find(data, "^%b<> (.)")
   local s,e,cmd,lines = string.find(data, "^%b<>%s+(%S+)%s+(%d+)|$")
   local when = os.date("[%H:%M] ")
   local chat = string.sub(data, 1, -2)
   if cmd and cmd == GetChat then
        if lines ~= e then
            GetChatLines(user, lines)
            return 1
        else
            user:SendData("Please specify how may chat lines to see, you can display up to "..maxhistory.." lines.")
            return 1
        end
    else
   for k,v in BadChars do
      if pre == v then     -- disallow command input to cached chat
            return
        end
    end
   table.insert(chathistory,when..chat)
   if table.getn(chathistory) > maxhistory then table.remove(chathistory, 1) end
   savehistory()
   end
end

function GetChatLines(user, linecount)
    local n1 = table.getn(chathistory)
   local n2 = linecount
   --if n2 == 1 then n2 = 2 end
   local n3 = n1 - (n2-1)
   local str = "<----------------------------------------------------------------------[ Last ( "..n2.." ) chat messages ]----------->\r\n"
   for i =n3,n1 do str = str.."\r\n"..chathistory end
   user:SendPM(botname,str.."\r\n")
   user:SendPM(botname,"<--------------------------------------------------------------------------[ End of chat history ]--------------->")
end

function savehistory()
   local f,e = io.open( chatfile, "w+" )
   if f then
      f:write("return {\n")
        for i = 1, table.getn(chathistory) do
            f:write( "\t"..string.format("%q", chathistory)..",\r\n" )
        end
      f:write("}" )
      f:close()
      return 1
   else
      return nil
   end
end
Title: page 2
Post by: gemini on 08 June, 2005, 12:56:22
-----------------------------------------------------------------------------
-- Chat History?
-----------------------------------------------------------------------------
-- ?2005 Double MM Connection?
-- for ### AMICI ITALIANO ###
----------------------------------------------------------------------------
--rev 2.1   -   06 / 04 / 2005
-- Load & save messages
------------------------------------------------------
--rev 2.0   -   12 / 03 / 2005
-- Changed to Lua 5.0
--Changed top/bottom message
-----------------------------------------------------------------------------

--Bot Name
sBot=frmHub:GetHubBotName()  
History="Chat History.dat"

MultiChatName="AMICI ITALIANO"
lMcn=7
MultiChatNickSeparator="?"

sMsg={}
iMin=0
iMax=0

nMsg=10

Top={}
Top[1] ="----------------------------------------------------------------------------------------------------------------"
Top[2] ="                   ---                AMICI ITALIANO                --- "
Top[3] ="                    Libera associazione di Hub Direct Connect"
Top[4] ="----------------------------------------------------------------------------------------------------------------"
Top[5] ="? AMICI ITALIANO  (dchub://amici.no-ip.org )"
Top[6] ="? xxxxxxxxxxxx    (dchub://xxxxxxxxxxxxxxxxxx )"
Top[7] ="? xxxxxxxxxxxx    (dchub://xxxxxxxxxxxxxxxxxx )"
Top[8] ="                  ULTIMI MESSAGGI DIGITATI IN MAIN CHAT"
Top[9]="----------------------------------------------------------------------------------------------------------------"
nTop=9

Bottom={}
Bottom[1]="----------------------------------------------------------------------------------------------------------------"
nBottom=1

---------------------------------------------------------------
-- Carica in avvio e salva in uscita
---------------------------------------------------------------
function Main()
   sMsg={}
   loadMessages()
end
function OnExit()
   saveMessages()
end

---------------------------------------------------------------
-- Registra Chat
---------------------------------------------------------------
function ChatArrival(User, Data)
   Data = string.sub(Data,1,string.len(Data)-1) --toglie l'a-capo finale
   local _,_,str = string.find(Data, "%b<>%s+(.+)")
   if string.sub(Data,1,1) == "<" then --main message
      if string.sub(Data,1,7) == "<"..MultiChatName..">" then -- ripulisce il nick dal tag della multi
         local _,_,n = string.find(str, "{.+?<(.+)}.+")
         local _,_,s = string.find(str, ".+>}(.+)")
         str="<"..n..s
      else
         local _,_,command = string.find(Data, ".+(> !).+")
         if command then
            str=nil --do not store any message
         else
            str=Data
         end
      end
      if str then
         sMsg[iMax]="["..os.date("%T").."] "..str
         iMax=iMax+1
         if iMax-nMsg>iMin then
            iMin=iMax-nMsg
        end
      end
   end
end

---------------------------------------------------------------
-- Ultima chat
---------------------------------------------------------------

function NewUserConnected(curUser)
   if curUser.sName~=MultiChatName then --curUser.iProfile>=0 and
      local i=1
      -- Top Header
      while i<=nTop-1 do
         curUser:SendData(sBot, Top)
         i=i+1  
      end
      ----
      local s=Top[nTop]  --- for graphical meanings  
      --Chat messages
      local i=iMin
      while i<=iMax do
         if sMsg then
            s=s.."\n\t"..sMsg
         end
         i=i+1
      end
      curUser:SendData(sBot, s)
      -- Bottom
      i=1
      while i<=nBottom do
         curUser:SendData(sBot, Bottom)
         i=i+1  
      end
   end
end
----------------------------------------------------------
--The same for any user
OpConnected = NewUserConnected

----------------------------------------------------------
-- Load from & Save to file
----------------------------------------------------------
function loadMessages()
   iMin=0
   iMax=0
   local f=io.open(History,"a")
   f:close()
   for line in
      io.lines(History) do
      iMax=iMax+1
      sMsg[iMax]=line
   end
end
function saveMessages()
   local f=io.open(History,"w")
   local i=iMin
   while i<=iMax do
      if sMsg then
         f:write(sMsg.."\n")
      end
      i=i+1
   end
   f:close()
end


it's possibile  spy pm user like these

Chat History On Entry 1.03 LUA 5
 Chat History?
I wait your news cordial greetings
thanks
Title:
Post by: plop on 09 June, 2005, 19:10:03
QuoteOriginally posted by gemini
it's possibile  spy pm user like these

your users like it when you spy on them???
i doubt that.

plop
Title:
Post by: bastya_elvtars on 10 June, 2005, 02:36:17
Just let the users have some private chat. If you run a hub, this is to be considered first. If some user wants to report something, he will. If not, then you will never know it, and do you think if you knew it it would be better for ya?

QuoteOriginally posted by bastya_elvtars
Requesting a PM spy? Moderators (and Scooby Doo), where are you now? :D
Title: request script cmdspy for all user with history
Post by: gemini on 10 June, 2005, 11:01:23
cmdspy for all user with history

it's possible thanks bye
Title:
Post by: TTB on 10 June, 2005, 15:28:22
If... if I could make that, I wouldn't make it...  X(  This is lame dude!
Title:
Post by: Dessamator on 10 June, 2005, 16:10:23
it already exists, ptokax does that, maybe its something that should be fixed by ppk, :)
Title: thanks
Post by: gemini on 10 June, 2005, 17:13:47
thank very much

Dessamator
TTB
bastya_elvtars
Mutor
plop

cordial greeting
Title:
Post by: Ubikk on 11 June, 2005, 12:00:32
If you want to read private messages all you have to do is check the hub's command log...
ex:

Quote[12:59] Ubikk (192.168.240.31) > $To: robotzel From: Ubikk $ this is a test|
[/size]

But, unfortunately there are thousands of commands in that log.. so it's tricky to understand a full private conversation.
My advice - get over it ...  :D