From 17498a97a289119debdb651ab898ddea99e86ff9 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Thu, 29 Jan 2015 11:09:56 +0100 Subject: cNetwork: Exported lookup functions to Lua API. Also added an example in the NetworkTest plugin. --- MCServer/Plugins/NetworkTest/Info.lua | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'MCServer/Plugins/NetworkTest/Info.lua') diff --git a/MCServer/Plugins/NetworkTest/Info.lua b/MCServer/Plugins/NetworkTest/Info.lua index 6bb639860..8c2604e31 100644 --- a/MCServer/Plugins/NetworkTest/Info.lua +++ b/MCServer/Plugins/NetworkTest/Info.lua @@ -36,6 +36,27 @@ g_PluginInfo = }, }, -- ParameterCombinations }, -- client + + lookup = + { + HelpString = "Looks up the IP addresses corresponding to the given hostname (google.com by default)", + Handler = HandleConsoleNetLookup, + ParameterCombinations = + { + { + Params = "", + Help = "Looks up the IP addresses of google.com.", + }, + { + Params = "Hostname", + Help = "Looks up the IP addresses of the specified hostname.", + }, + { + Params = "IP", + Help = "Looks up the canonical name of the specified IP.", + }, + }, + }, -- lookup }, -- Subcommands }, -- net }, -- cgit v1.2.3