Network Check
 

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

Network Check

Started by Daywalker?, 12 November, 2006, 23:23:11

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Daywalker?

maybe usefull.........or not, judge for urself :)
--[[

	Network Control LUA 5.1 version by Daywalker?


	CHANGELOG:
	*********** Daywalker? ********************************************************************
	- Added Toggle All or only offline hubs on/of also in RC
	- Added commands for help, show, add and delete
	- Added table for adding hubs
	- Added RC Commands 
	- Added pxwsa_l51.dll from blue_bear for pinging online hubs in table
	
	NOTE: make a textfile called network.dat in the script folder for table :)
	NOTE2: put the pxwsa_l51.dll, cc3270.dll and the pxwsa_l51.tds in the Ptokax root folder

		  known Commands are !addhub !delhub !showhub !checkon !allon !alloff and !hubhelp

	********************************************************************************************************

]]--


;D

Download ??????HubControl??????

achiever

hi,

i needed a bit of addition to this script.

can some 1 plzz make it such that this should check each hub after some time interval and store the information of it being online or not and when some 1 types the commands to check online hubs it should show the recent updated information.
by this i mean it should not check the hubs ON at that moment but keep on checking hubs at an interval of say 10 mins and keep on refreshing the stored information and on the command it should return this data.

thks

achiever
hi  :(

no reply YET.
dunno if my request was not understood or something else. but can some 1 plzz make the changes i needed.

thks,

achiever
thks,
achiever.

bastya_elvtars

Hub pinger redirect manager does exactly this.
Everything could have been anything else and it would have just as much meaning.

Yahoo

can this script be edited so that it can check not only check internet hub but also LAN hubs
"BoRN FIGhTEr"

achiever

hi,

Quote from: bastya_elvtars on 31 January, 2007, 19:54:13
Hub pinger redirect manager does exactly this.
can the redirecting part of the redierct manager be removed and made functional just as a hub manager, where all can add new hubs, their addresses and name of Operator to contact for registration and it will check it will keep on checking for online hubs every 4-5 mins (resetable time) and store the data in a text file and and display this on a command.

thks.
thks,
achiever.

Psycho_Chihuahua

-Rick-'s Online Check script does exactly that. Search the Forum
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

achiever

yes i have it but can i needed some thing which can be used by all my users so i needed this.
as users can type a command like +hubs and get to kno which all hubs are on

can ne 1 plzz help me out.

thks.
thks,
achiever.

Psycho_Chihuahua

and again...

-Ricks- OnlineCheck does that, it also makes a html you can use as website.

from inside the hub you can check the status of the listed hubs

[16:35:56] <-SanitariuM-> 
=-=<>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=<>=-=
			Online list with [1] Hub(s)

=-=<>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=<>=-=

	[1]	online.hub.org:9999

[16:36:02] <-SanitariuM-> 
=-=<>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=<>=-=
			Offline list with [1] Hub(s)

=-=<>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=<>=-=

	[1]	offline.hub.org:411

[16:36:10] <-SanitariuM-> 
=-=<>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=<>=-=
			Array list with [15] Hub(s)

=-=<>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=<>=-=

	[1]	online.hub.org:9999
	[2]	offline.hub.org:411


all you need to do is alter the settings so the users can add/read the list.

To get the hubscript part of it however you will have to make some alterations for newer ptokax, but if i could do it so can you. I'm not serving everything on a silver platter
you can read more about the script/application i am talking about here

also i have updated the script to newer PtokaX version 0.3.6.0 and set the RC Menu to appear for all users so be carefull if you dont trust your users, they could empty the list ^^ (this is very easy to change however)
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

achiever

hi,

can u plzz make the provision such that hub names can also be seen along with their address and also if no port added then 411 as the default port.

i wouldnt have asked if i could do it,

thanks for help,
achiever.
no reply :(
thks,
achiever.

Psycho_Chihuahua

2 possibilities


1. ask Rick to do this (i have already and he hasnt been able to so far)

2. try it yourself (and you will see what i spent a loooooooooong time on trying to do)

the problem is that the pinger would have to be rewritten and i have never been able to get it to work after making changes to it
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

achiever

ohk i think then we cant do nething but w8

thanks,
achiever.
hi,

i made the script with the the specs mentioned above plzz give it a try.
and can some 1 plzz add the delete function such that ppl can delete only their entries and masters can delete any.
also while adding hub name it should be of just 1 word and the second word should be of address :(
as i m still having difficulties with capture pattern,s so can some 1 plzz change it to some thing which will allow multi-word hub name and identify Ips' specificly.

--commands onlinecheck "hubs"; list all hubs "allhubs"; add new hub "addhub hub-name address"
--code taken and modified to suit requierments from mutor's message board script :-) , by achiever

Hub = frmHub:GetHubName()
sBot = frmHub:GetHubBotName()
Bot = ("Online checker")
filename = ("onlinecheck/Allhubs.dat")
filename1 = ("onlinecheck/Array.tbl")
filename2 = ("onlinecheck/Online.tbl")
--End User Settings----------------------------------------------------------------------------------

Hub_Board = {}
tArray = {}
tOnline ={}

function Main()
	if loadfile(filename) then
		dofile(filename)
	else
		Hub_Board = {}
		SaveToFile(filename , Hub_Board , "Hub_Board")
	end
	if loadfile(filename1) then
		dofile(filename1)
	else
		Hub_Board = {}
		SaveToFile(filename1 , tArray , "tArray")
	end
	if loadfile(filename2) then
		dofile(filename2)
	else
		Hub_Board = {}
		SaveToFile(filename2 , tOnline , "tOnline")
	end
end

NewUserConnected = function(user)
	user:SendData("$UserCommand 1 3 "..Hub.."\\"..Bot.."\\ All Hubs $<%[mynick]> !allhubs||")
	user:SendData("$UserCommand 1 3 "..Hub.."\\"..Bot.."\\ Online Hubs $<%[mynick]> !hubs %[nick]||")
	user:SendData("$UserCommand 1 3 "..Hub.."\\"..Bot.."\\ Add Hub$<%[mynick]> !addhub %[line:Hub Name] %[line:Address]||")
	--user:SendData("$UserCommand 1 3 "..Hub.."\\"..Bot.."\\ Rem arrey hub$<%[mynick]> !rem %[line:Remove hub from array]||")
end

OpConnected = NewUserConnected

function ChatArrival( user, data)
	local s,e,prefix,cmd = data:find("%b<>%s+(%p)(%S+)")
	if prefix then
		if cmd == "addhub" then
			--local _,_,Hubname,add = string.find(data,"%b<>%s+%S+%s+(%S+)%s+(.*)")				
			local _,_,Hubname,add = string.find(data,"%b<>%s+%S+%s+(%S+)%s+(%S+)|")
					if Hubname and add then
						if not string.find(add, ":") then
							Ip = ""..add..":411"
							--SendToAll(sBot, ""..Hubname.." "..Ip.."")
						else
							Ip = add
						end
						return WriteHubBoard(user,Hubname, Ip),1
					else
						user:SendData(sBot,"Syntax Error +addhub hubname address")
					end
		elseif cmd == "hubs|" then
			return ReadHubs(user),1
		elseif cmd == "allhubs|" then
			return ReadAllHub(user),1
		end
	end
end
ToArrival = ChatArrival

function ReadHubs(user)
	local dsp = ""
	local str = "\r\n\t\t "..table.getn(tOnline).." Hub(s) are Online\r\n\t\t"
	str = str..""..string.rep("--",40).."\r\n\t\t"
	local temp = ""
	for i = 1,table.getn(tOnline) do
		temp = tOnline[i]
		for i,v in ipairs(Hub_Board) do
			if v[2] == temp then
				str = str..""..v[1].."\t\t"..temp.."\r\n\t\t"
			end
		end
	end
			dsp = dsp..str
	user:SendData(sBot, dsp)
end

function ReadAllHub(user)
	local dsp = ""
	local str = "\r\n\t\t "..table.getn(tArray).." Hub(s) are listed:-\r\n\t\t"
	str = str..""..string.rep("--",40).."\r\n\t\t"
	for i,v in ipairs(Hub_Board) do
		str = str..i..") "..v[1].."\t\t"..v[2].."\r\n\t\t"
	end
	dsp = dsp..str
	user:SendData(sBot, dsp)
end

function WriteHubBoard(user, Hubname, Ip)
	if Hubname and Ip then
		table.insert(Hub_Board,{Hubname, Ip})
		table.insert(tArray, Ip)
		SaveToFile(filename , Hub_Board , "Hub_Board")
		SaveToFile(filename1 , tArray , "tArray")
	end
	local dsp ="Ur Hub Data is entered"
		user:SendData(sBot, dsp)
	collectgarbage(gc)
end

function Serialize(tTable, sTableName, sTab)
	assert(tTable, "tTable equals nil")
	assert(sTableName, "sTableName equals nil")
	assert(type(tTable) == "table", "tTable must be a table!")
	assert(type(sTableName) == "string", "sTableName must be a string!")
	sTab = sTab or ""
	sTmp = ""
	sTmp = sTmp..sTab..sTableName.." = {\n"
	for key, value in ipairs(tTable) do
		local sKey = (type(key) == "string") and string.format("[%q]",key) or string.format("[%d]",key)
		if(type(value) == "table") then
			sTmp = sTmp..Serialize(value, sKey, sTab.."\t")
		else
			local sValue = (type(value) == "string") and string.format("%q",value) or tostring(value)
			sTmp = sTmp..sTab.."\t"..sKey.." = "..sValue
		end
		sTmp = sTmp..",\n"
	end
	sTmp = sTmp..sTab.."}"
	return sTmp
end

function SaveToFile(file , table , tablename)
	local handle = io.open(file,"w+")
	handle:write(Serialize(table, tablename))
	handle:flush()
	handle:close()
	collectgarbage(gc)
end


any suggestions, plzz post :)

achiever.
thks,
achiever.

Psycho_Chihuahua

read the last line in my last post!
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

achiever

yeah what about it?

dude the script i posted works allright. just some precautions :P
thks,
achiever.

bastya_elvtars

Why don't you ask for help if you are having problems with pattern matching? I, for one, like to teach.
Everything could have been anything else and it would have just as much meaning.

achiever

thks,
achiever.

jack_port1000

cany any one chage achiever script for 0.3.6.0 its goog script but not work in 3.6.0.
i got this error please some one help

Syntax ...AGAT.JAGIRDAR\Desktop\New Folder (2)\scripts\hub.lua:136: attempt to index local 'handle' (a nil value)
there is no error in script but when i add hub and check online hub or all hub its not showing any thing but only right click show tat all option but not work i can able to add hub name and hub addy but in rply nothing please some one help :'( :'( :'(

jack_port1000

tanx Mutor for your help , but i already created onlinecheck folder in script folder but i want to know tat i must have to use this thing?  array_beta_PCedited.rar (257.34 KB - downloaded 17 times.) posted by Psycho_Chihuahua, if yes then i have to change any thing in tat i mean edit any thing for my hub? and i want to show only lan hub in my hub

jack_port1000

i want to use achiever script for tat i did script and one folder as onlinecheck  place in script folder right? any  thing eals i have to keep with tat? bec i did this both thing and there is no error right now but network check not work in hub so wat the problem now i want to know
sorry for my bad english
i add this three hubs its all online but not showing any hub online and right clicke not work to addhubs,hubs,onlinehubs this all thing work by command in main chat like +addhub,+hubs,+allhubs
there is no error in script so plase help Mutor or any one who know this

<---=[N.W.O]=---> Ur Hub Data is entered
<---=[N.W.O]=---> Ur Hub Data is entered
<---=[N.W.O]=---> Ur Hub Data is entered
<---=[N.W.O]=---> 
		 3 Hub(s) are listed:-
		--------------------------------------------------------------------------------
		1) Alley		  172.16.XX.X:411
		2) NET		  172.16.X.XX:411
		3) sh's		  172.16.XX.XXX:411
		
<---=[N.W.O]=---> 
		 0 Hub(s) are Online
		--------------------------------------------------------------------------------
		
<---=[N.W.O]=---> 
		 0 Hub(s) are Online
		--------------------------------------------------------------------------------



Psycho_Chihuahua

well with the one i have you can add and delete hubs from the list, it shows online/offline hubs BUT that only works if the onlinecheck mpps exe is running
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

jack_port1000

will run, but can u please post script and mpps exe here i mean whole thing?
Thax for ur help
swagat_j

Psycho_Chihuahua

Quote from: jack_port1000 on 24 July, 2007, 01:06:45
will run, but can u please post script and mpps exe here i mean whole thing?
Thax for ur help
swagat_j

If you would take the time to read some of the above posts you would of noticed that it is there already!

http://forum.ptokax.org/index.php?action=dlattach;topic=6552.0;attach=643
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

jack_port1000

its great working tanx a lot
is it possible in ur script is option to add hub add only can u pls edit tat we can add also hub name like this

1. BackAlley          172.16.xx.xx
2. Hunter              172.16.x.xx


Psycho_Chihuahua

Quote from: Psycho_Chihuahua on 21 June, 2007, 12:01:04
the problem is that the pinger would have to be rewritten and i have never been able to get it to work after making changes to it
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

achiever

jack_port1000,
use the script i have posted in addition to the great mpps.exe and u will be fine.

achiever.
thks,
achiever.

SMF spam blocked by CleanTalk