Please convert to New API
 

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

Please convert to New API

Started by KauH, 01 July, 2008, 09:11:40

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

KauH

PtokaX LUA API converter not help  :-[ :-[ :-[
Please convert this scripts correctly   :-[
P.S. scripts have same russian words , dont scare them  ;)

F_O_X

#1
Quote from: KauH on 01 July, 2008, 09:11:40
PtokaX LUA API converter not help  :-[ :-[ :-[
Please convert this scripts correctly   :-[
P.S. scripts have same russian words , dont scare them  ;)

For, take.
-- данный скрипт позволяет добавлять приставку к тэгам ЗАРЕГИСТРИРОВАННЫХ пользователей. 
-- by X-Ray 02/11/05

Minutes =  1
tProfileTag = {
[1] = "[OPeRaToR]",
[2] = "[ViP]",
[3] = "[ReG]",
[4] = "[ModeRaToR]",
[5] = "[Хозяин_хаба]",
[0] = "[MaSTeR]",
[-1] = "[UnReG]",
}

-- список подсетей и описания, вставляемое в тэг.
RangeDesc = {
"127.0.0.1  -  127.0.0.255 -[Твой_Комп]",

"10.0.1.1  		-  	10.0.1.254 		-[InterLan]",
"10.0.3.1  		-  	10.0.7.254 		-[Netorn]",
"10.0.8.1  		-  	10.0.8.254 		-[InterLan]",
"10.0.40.1  	-  	10.0.47.254 	-[OpenLan]",
"10.1.0.1  		-  	10.9.255.254 	-[NetByNet]",
"10.10.0.1  	-  	10.10.10.254 	-[NetByNet]",
"10.10.11.1  	-  	10.10.21.254 	-[Koptevo]",
"10.10.22.1  	-  	10.10.22.254 	-[NetByNet]",
"10.10.25.1  	-  	10.10.255.254 	-[Koptevo]",
"10.11.0.1  	-  	10.11.63.254 	-[Ostankino]",
"10.11.64.1  	-  	10.11.127.254 	-[Natural_Way]",
"10.13.0.1  	-  	10.13.255.254 	-[NetByNet]",
"10.14.0.1  	-  	10.14.255.254 	-[UnionLine]",
"10.15.0.1  	-  	10.16.255.254 	-[NetByNet]",
"10.17.0.1  	-  	10.17.0.254 	-[Informedia]",
"10.18.0.1  	-  	10.19.255.254 	-[G-Net]",
"10.20.0.1  	-  	10.20.255.254 	-[NetByNet]",
"10.24.0.1  	-  	10.27.255.254 	-[NetByNet]",
"10.28.0.1  	-  	10.28.255.254 	-[G-Net]",
"10.32.0.1  	-  	10.35.255.254 	-[PROV]",
"10.36.0.1  	-  	10.37.255.254 	-[ImSYS]",
"10.38.0.1  	-  	10.38.255.254 	-[G-Net]",
"10.39.0.1  	-  	10.39.255.254 	-[ImSYS]",
"10.40.0.1  	-  	10.41.255.254 	-[SVAO]",
"10.42.0.1  	-  	10.44.255.254 	-[CordSYS]",
"10.46.0.1  	-  	10.46.255.254 	-[ImSYS]",
"10.48.0.1  	-  	10.55.255.254 	-[G-Net]",
"10.56.0.1  	-  	10.63.255.254 	-[U-Tech]",
"10.69.0.1  	-  	10.69.255.254 	-[InterLan]",
"10.100.0.1  	- 	10.101.255.254 	-[Sviblovo]",
"10.104.0.1  	-  	10.108.255.255 	-[Kvidex]",
"10.111.0.1  	-  	10.111.255.254 	-[G-Net]",
"10.120.0.1  	-  	10.120.255.254 	-[Koptevo]",
"10.145.0.1  	-  	10.146.255.254 	-[Degunino]",
"10.147.0.1  	-  	10.147.255.254 	-[UnionLine]",
"10.148.0.1  	-  	10.154.255.254 	-[Degunino]",
"10.155.0.1  	-  	10.155.255.254 	-[UnionLine]",
"10.156.0.1  	-  	10.162.255.254 	-[Degunino]",
"10.167.0.1  	-  	10.167.255.254 	-[Savelovo]",
"10.168.0.1  	-  	10.168.255.254 	-[Netorn]",
"10.170.0.1  	-  	10.170.255.254 	-[korolev.net]",
"10.192.0.1  	-  	10.192.255.254 	-[VilVit]",
"10.193.0.1  	-  	10.193.255.254 	-[Netorn]",
"10.193.0.1  	-  	10.193.255.254 	-[Beirel г.Пушкино]",
"10.194.0.1  	-  	10.194.255.254 	-[Netorn]",

"172.16.0.1 	- 	172.16.255.254 	-[HutorNet]",
"172.17.0.1 	- 	172.17.54.254 	-[CLN]",
"172.17.55.1 	- 	172.17.55.254 	-[Informedia]",
"172.17.56.1 	- 	172.17.95.254 	-[CLN]",
"172.17.96.1 	- 	172.17.111.254 	-[Informedia]",
"172.17.112.1 	- 	172.17.255.254 	-[CLN]",
"172.18.0.1 	- 	172.18.255.254 	-[Netorn]",
"172.19.0.1 	- 	172.20.255.254 	-[Yauza]",
"172.21.26.1 	- 	172.21.31.254 	-[Gelikon]", 
"172.22.0.1 	- 	172.22.255.254 	-[Netorn]",
"172.23.0.1 	- 	172.23.103.254 	-[InterLan]",
"172.23.104.1 	- 	172.23.111.254 	-[Kornet]",
"172.23.112.1 	- 	172.23.135.254 	-[InterLan]",
"172.23.136.1 	- 	172.23.143.254 	-[Kornet]",
"172.23.144.1 	- 	172.23.147.254 	-[FastComm]",
"172.23.148.1 	- 	172.23.255.254 	-[InterLan]",
"172.24.0.1 	- 	172.24.255.254 	-[Vawe Net]",
"172.25.0.1 	- 	172.25.255.254 	-[Netorn]",
"172.26.0.1 	- 	172.26.255.254 	-[Netorn]",
"172.27.0.1 	- 	172.27.255.254 	-[Intek-M г.Мытищи]",
"172.28.0.1 	- 	172.28.255.254 	-[MasterLink]",
"172.29.0.1 	- 	172.29.15.254 	-[MasterLine]",

"193.125.32.1 	- 	193.125.39.254 	-[Kvidex]",
"193.125.88.1 	- 	193.125.95.254 	-[Kvidex]",
"193.125.128.1 	- 	193.125.135.254 -[Kvidex]",
"193.125.232.1 	- 	193.125.235.254 -[Kvidex]",
"193.125.236.1 	- 	193.125.237.254 -[Kvidex]",

"194.6.220.1 	- 	194.6.223.254 	-[PROV]",

"195.90.145.1 	- 	195.90.145.254 	-[Gelikon]",
"195.90.177.1 	- 	195.90.177.254 	-[Gelikon]",
"195.225.128.1 	- 	195.225.128.254 -[PROV]",
"195.225.130.1 	- 	195.225.131.254 -[PROV]",

"79.120.0.1 	- 	79.120.31.254 	-[NetByNet]",

"80.86.240.1 	- 	80.86.255.254 	-[U-Tech]",
"80.87.144.1 	- 	80.87.147.254 	-[Ostankino]",

"81.211.38.1 	- 	81.211.39.254 	-[Koptevo]",
"81.211.40.1 	- 	81.211.40.254 	-[Koptevo]",

"82.138.57.1 	- 	82.138.57.1 	-[korolev.net]",
"82.148.11.1 	- 	82.148.11.254 	-[CommSol]",
"82.148.12.1 	- 	82.148.12.254 	-[Gelikon]",
"82.148.15.1 	- 	82.148.15.62 	-[InterLan]",
"82.148.16.129 	- 	82.148.16.254 	-[Kornet]",
"82.148.17.1 	- 	82.148.17.254 	-[InterLan]",
"82.148.18.1 	- 	82.148.18.254 	-[InterLan]",
"82.148.19.1 	- 	82.148.19.14 	-[InterLan]",
"82.148.23.1 	- 	82.148.23.254 	-[CommSol]",

"84.23.32.1 	- 	84.23.63.254 	-[ImSYS]",

"85.192.16.1 	- 	85.192.23.254 	-[Yauza]",
"85.192.24.1 	- 	85.192.31.254 	-[SVAO]",

"86.111.2.1 	- 	86.111.2.254 	-[Gelikon]",

"87.118.246.1 	- 	87.118.246.254 	-[MasterLine]",
"87.118.247.1 	- 	87.118.247.254 	-[Млан-телеком]",
"87.118.248.1 	- 	87.118.248.254 	-[Млан-телеком]",
"87.118.249.1 	- 	87.118.249.254 	-[MasterLine]",

"88.210.51.1 	- 	88.210.51.254 	-[VilVit]",

"89.20.128.1 	- 	89.20.139.254 	-[NetByNet]",
"89.191.224.1 	- 	89.191.231.254 	-[CommSol]",
"89.191.240.1 	- 	89.191.240.254 	-[MasterLink]",
"89.208.126.1 	- 	89.208.127.254 	-[ImSYS]",
"89.222.128.1 	- 	89.222.163.254 	-[Netorn]",
"89.222.164.1 	- 	89.222.167.254 	-[Beirel г.Пушкино]",
"89.222.176.1 	- 	89.222.179.254 	-[Sviblovo]",
"89.222.180.1 	- 	89.222.255.254 	-[Netorn]",

"212.1.224.1 	- 	212.1.235.254 	-[NetByNet]",
"212.5.65.1 	- 	212.5.65.254 	-[Млан-телеком]",
"212.5.164.1 	- 	212.5.164.254 	-[Gelikon]",
"212.118.37.1 	- 	212.118.37.254 	-[ImSYS]",
"212.118.54.1 	- 	212.118.55.254 	-[ImSYS]",

"213.141.128.1 	- 	213.141.159.254 -[NetByNet]",
"213.145.52.1 	- 	213.145.52.254 	-[Sviblovo]",
"213.148.16.1 	- 	213.148.16.30 	-[InterLan]",
"213.148.17.1 	- 	213.148.17.254 	-[InterLan]",
"213.148.18.209 - 	213.148.18.214 	-[Gelikon]",
"213.148.21.1 	- 	213.148.21.254 	-[Netorn]",
"213.148.22.1 	- 	213.148.23.254 	-[Netorn]",
"213.148.24.1 	- 	213.148.24.254 	-[Vawe Net]",
"213.148.25.1 	- 	213.148.25.254 	-[Sviblovo]",
"213.148.27.161 - 	213.148.27.190 	-[InterLan]",
"213.148.27.193 - 	213.148.27.206 	-[InterLan]",
"213.148.29.1 	- 	213.148.29.62 	-[Gelikon]",
"213.208.173.1 	- 	213.208.173.254 -[Natural_Way]",
"213.208.174.1 	- 	213.208.174.254 -[Ostankino]",
"213.219.208.1 	- 	213.219.209.254 -[Netorn]",
"213.219.211.1 	- 	213.219.211.254 -[Netorn]",
"213.219.212.1 	- 	213.219.215.254 -[Netorn]",
"213.219.212.65	- 	213.219.215.126 -[VilVit]",
"213.219.219.1 	- 	213.219.219.254 -[Netorn]",
"213.219.220.1 	- 	213.219.223.254 -[Netorn]",
"213.247.130.1 	- 	213.247.130.254 -[MasterLine]",
"213.247.133.1 	- 	213.247.133.254 -[MasterLine]",
"213.247.134.1 	- 	213.247.135.254 -[MasterLine]",
"213.247.136.1 	- 	213.247.137.254 -[MasterLine]",
"213.247.137.1 	- 	213.247.137.254 -[Млан-телеком]",
"213.247.146.1 	- 	213.247.147.254 -[MasterLine]",
"213.247.147.1 	- 	213.247.147.254 -[Млан-телеком]",
"213.247.149.1 	- 	213.247.149.254 -[MasterLine]",
"213.247.169.1 	- 	213.247.169.254 -[MasterLine]",
"213.247.201.1 	- 	213.247.201.254 -[MasterLine]",

"217.70.16.1 	- 	217.70.31.254 	-[ImSYS]",
"217.78.176.1 	- 	217.78.191.254 	-[Koptevo]",
}

OnStartup = function() 

tmr = TmrMan.AddTimer(60000 * Minutes) 
end 

OnTimer = function(tmr)
for id,user in pairs(Core.GetOnlineUsers(true)) do
	Userover = user
	if user.sMyInfoString ~= nil then
	local descript,userip = nil,calcip(Userover.sIP)
	if userip ~= 0 then
	for index,descIP in pairs(RangeDesc) do
	local _,_,startRange,endRange,RangeDescript = string.find(descIP, "(.*)-(.*)-(.*)")
	startRange = calcip(startRange)
	endRange = calcip(endRange)
	if userip>=startRange and userip<=endRange then
	descript = RangeDescript
	end
	end
	if descript == nil then descript = "[Сеть Неизвестна]" 
	end
	end
local s,e,name,desc,speed,email,share = string.find(user.sMyInfoString, "$MyINFO $ALL (%S+)%s+([^$]*)$ $([^$]*)$([^$]*)$([^$]+)")
Core.SendToAll("$MyINFO $ALL "..name.." "..descript.." "..tProfileTag[user.iProfile].." ["..user.sIP.."] "..desc.."$ $"..speed.."$"..email.."$"..share.."$")
end
end
end

-- функция РАСЧЁТА адреса IP
function calcip(ipcalc)
local _,_,a,b,c,d = string.find(ipcalc, "(%d+).(%d+).(%d+).(%d+)")
local calc = 0
if (tonumber(a) and tonumber(b) and tonumber(c) and tonumber(d)) then
calc = a*16777216 + b*65536 + c*256 + d 
return calc
else return 0
end
end


A second script take here:
http://forum.ptokax.org/index.php?topic=7540.0

SMF spam blocked by CleanTalk