hey guys...
Is it possible to make a script that enables a command wich allows registered users to ping the hub? :)
Example:
!ping
Ping reply: 2 seconds
Btw.. it will be a nice thing to also have a trigger wich enables/disables the command to work only for registered users
Thank you in advance
P.S: and a trigger that allows the bot to send the ping reply message to all users in mainchat or only to the user that used the command :)
Isn't it possible to ping the hub's server using the windows utility ,gather the necessary information from it and then displaying it on the hub?
Well, if the server pings itself, the result will always be irrelevant, so in other words impossible, what could be done is the inverse, the user uses the ping cmd, and the server pings him,then u can gather the info and send to the user .
Sure.. that would do just fine... so, who can help me with the necessary script? :D
This soundes great. Maybe a request to implant in PtocaX?
-- By Dessamator
-- "Hub Pinger"
function ChatArrival(user, data)
data = string.sub(data,1,-2)
s,e,cmd = string.find(data, "%b<>%s+(%S+)")
if cmd=="!ping" then
local temp,n="\r\n\t\Ping Results :\r\n"..string.rep("??",12).."\r\n",0
os.execute("ping "..user.sIP.." >pingresults.txt")
for line in io.lines("pingresults.txt") do
n=n+1
if n>10 then
temp=temp..line.."\r\n"
end
end
os.remove("pingresults.txt")
user:SendData(frmHub:GetHubBotName(),temp)
return 1
end
end
Done !
P.S :
QuoteLastly the one being pinged must allow ping from WAN side in their firewall or router.
QuoteOriginally posted by Star
This soundes great. Maybe a request to implant in PtocaX?
well this is the wrong thread to ask for it, but anyways, maybe if ur lucky PPK, will grant ur request .
If it has no arguments, its hard to find what it does, either way, the result of that "$Ping" seems to be invisible to us .
im sure ptokax uses some way of finding how fast a client is, otherwise we wouldnt have the option "keep slow clients online", unless it serves a different purpose, which is unknown to me !