page 2
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

page 2

Started by gemini, 08 June, 2005, 13:11:54

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gemini

-----------------------------------------------------------------------------
-- 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 private message between user with zright clicker
 like these

Chat History On Entry 1.03 LUA 5
Chat History?
I wait your news cordial greetings
thanks

SMF spam blocked by CleanTalk