Problem IP log (not running 16.05)
 

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

Problem IP log (not running 16.05)

Started by Settlers, 11 March, 2005, 16:12:24

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Settlers

-- 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

plop

and what might the problem be????

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

Settlers

please convert to LUA 5

Zigurds

Prieksh kam tev tas, ROBOCOP 10.01a tak viss ir ?

Settlers

#4
thank

SMF spam blocked by CleanTalk