nead a script
 

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

nead a script

Started by badtrip, 19 September, 2005, 22:19:22

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

badtrip

hello,


i nead a script to save users and ip?s from the hub


it?s like this -> run !savedbase   and  the script
save all the users nicks and ip?s from the hub

tks

Psycho_Chihuahua

I think the IPLog has been made already --> try the Button
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

badtrip

-- IPLogBot by Cane 
-- Small edit by Loop 

botName="iplog" 
onoff = 1 

txt = ("iplog.txt") 

function Main() 
--frmHub:RegBot(botName) 
end 

function NewUserConnected(curUser) 
if onoff then 
appendto(txt) 
if curUser.iProfile == -1 then 
profile = "User" 
else 
profile = GetProfileName(curUser.iProfile) 
end 
write("At "..date("%d").."/"..date("%m").."-"..date("%Y").." "..date("%T").." "..profile.." "..curUser.sName.." enters the Hub with IP: "..curUser.sIP..".\r\n") 
writeto() 
end 
end 

function OpConnected(curUser) 
if onoff then 
appendto(txt) 
write("At "..date("%d").."/"..date("%m").."-"..date("%Y").." "..date("%T").." "..GetProfileName(curUser.iProfile).." "..curUser.sName.." enters the Hub with IP: "..curUser.sIP..".\r\n") 
writeto() 
end 
end 

function DataArrival(user,data) 

if strsub(data, 1, 1) ~= "$" and strfind(data, "%> %#") then 
cmd = strsub(data, strfind(data, "%> %#")+2, -2) 

if user.bOperator then 

if (cmd=="#showiplog") then 
doiplog(user,data) 
return 1 

elseif (cmd=="#deliplog") then 
dodeliplog(user) 
return 1 

elseif (cmd=="#logon") then 
onoff = 1 
user:SendData(botName,"Iplog is set to on") 
return 1 

elseif (cmd=="#logoff") then 
onoff = nil 
user:SendData(botName,"Iplog is set to off") 
return 1 



--helpfile in pm 
elseif (cmd=="#iphelp") then 
SendPmToNick(user.sName,botName," Ip log help!") 
SendPmToNick(user.sName,botName,"") 
SendPmToNick(user.sName,botName,"#showiplog - shows the ip log in pm") 
SendPmToNick(user.sName,botName,"#deliplog - deletes the ip log") 
SendPmToNick(user.sName,botName,"#logon - command to set the log on") 
SendPmToNick(user.sName,botName,"#logoff - command to set the log off") 
SendPmToNick(user.sName,botName,"#iphelp - this help-file in pm") 
SendPmToNick(user.sName,botName,"") 
SendPmToNick(user.sName,botName," end!") 
return 1 

end 
end 
end 
end 


function doiplog(user,data) 
readfrom(txt) 
local message = "" 
while 1 do 
local line = read() 
if line == nil then break 
else 
message = message..line.."\r\n" 
end 
end 
user:SendPM(botName,message) 
end 




function dodeliplog(user) 
writeto(txt) 
write("") 
writeto() 
user:SendData(botName,"Log is del!.") 
end


this iplog is in lua4 but a need a iplog to save ip?s and nick in a txt file ....

help me plz

MDFP

Have you Tryed Robocop?
dont needs separate logs




badtrip

Taks My Master  Mutor   :))  :))

SMF spam blocked by CleanTalk