hi
i was wondering if you would could host a small app. ive been working on- its a small java program that gets players names, pings, scores and ip's into a server as cvars, ready to use in any mods. Its very small, runs on all platforms (with the jvm installed) and uses under 1% of a cpu's proccessing power. this script can be hosted either locally on a dedicated server or remotley.
its all done with a full readme, but i have no where to host the thing...
Sounds good - Check your private messages m8
trooper22 :
hi
i was wondering if you would could host a small app. ive been working on- its a small java program that gets players names, pings, scores and ip's into a server as cvars, ready to use in any mods. Its very small, runs on all platforms (with the jvm installed) and uses under 1% of a cpu's proccessing power. this script can be hosted either locally on a dedicated server or remotley.
its all done with a full readme, but i have no where to host the thing...
thats jim from tmt :p
GiffE1118 :
Quotetrooper22 :
hi
i was wondering if you would could host a small app. ive been working on- its a small java program that gets players names, pings, scores and ip's into a server as cvars, ready to use in any mods. Its very small, runs on all platforms (with the jvm installed) and uses under 1% of a cpu's proccessing power. this script can be hosted either locally on a dedicated server or remotley.
its all done with a full readme, but i have no where to host the thing...
thats jim from tmt :p
I thought it was JIM from.....................TAXI....:D:D:D
It's a joke only older members might get..LOL
cardevsan :
QuoteGiffE1118 :
Quotetrooper22 :
hi
i was wondering if you would could host a small app. ive been working on- its a small java program that gets players names, pings, scores and ip's into a server as cvars, ready to use in any mods. Its very small, runs on all platforms (with the jvm installed) and uses under 1% of a cpu's proccessing power. this script can be hosted either locally on a dedicated server or remotley.
its all done with a full readme, but i have no where to host the thing...
thats jim from tmt :p
I thought it was JIM from.....................TAXI....:D:D:D
It's a joke only older members might get..LOL
Dang! i guess i am getting old then :dozingoff
Hi:), this sounds really nice, but I get some error in my cmd-prompt.
and I use a bat-file that looks like this
cd C:Documents and SettingsRSASkrivbord2-xsi
java Controller 127.0.0.1 12203 notmyrealrconpasswordlol 10
pause
, any ideas?
/Richard
It works fine now, very nice tool:),
however, I still got the same error as in my post above when I try to use it for Mohaa-version 1.00.
I know that most scanners/rconPrograms doesnt work for Mohaa 1.00 with the exception for HLSW and Autokick, so why do these 2 programs work while other softs dont, anyone who knows?
I would love to get this thing to work for 1.00.
Thanks
/Richard
i have not got any experience of mohaa- never played it, never had a server for it, etc.
i can have a look into it but ill have to find a moh v.100 server.... that might be impossible, but i will have a look into it.
Edit- thinking about it its probably due to the UDP packet headers that mohaa 1.00 uses, but i have no idea on how to find out what they are...
maybe u cud contact HLSW and ask them for the info.
Hi again,
I found this site
http://www.greycube.com and I looked at his
LiveGameServerList-Tool built in PHP
and it supports 2 query-methods (Quake3-method & Gamespy-method) for Mohaa, maybe that might be of interest?
ty
/ Richard:)
here is some of its code
//////////////////////////////////////////////////////
//////////////////Mohaa Quake3 Method/////////////////
//////////////////////////////////////////////////////
function lgsl_query_two($ip, $port, $game, $request)
{
if ($game == "mohq3")
{
$challenge = "xFFxFFxFFxFFx02getstatusx00";
}
else if ($game == "quake2")
{
$challenge = "xFFxFFxFFxFFstatusx00";
}
else
{
$challenge = "xFFxFFxFFxFFgetstatusx00";
}
//---------------------------------------------------------+
$fp = @fsockopen("udp://$ip", $port, $errno, $errstr, 1);
if (!$fp) { return FALSE; } // RETURN AS CONNECTION WAS REFUSED
stream_set_timeout($fp, 1, 0); stream_set_blocking($fp, true); // SET TIMEOUT FOR OFFLINE SERVERS
fwrite($fp, $challenge);
$tmp = fread($fp, 4096);
fclose($fp); // CLOSE CONNECTION;
$tmp = trim($tmp); // TRIM WHITE SPACE FROM PACKET
if (!$tmp) { return FALSE; } // IF BUFFER EMPTY RETURN BLANK
//---------------------------------------------------------+
$rawdata = explode("n", $tmp); // EXPLODE BY NEWLINE
$rawsetting = explode("", $rawdata[1]); // EXPLODE BY BACKSLASH
for($i=1; $i<count($rawsetting); $i=$i+2)
{
$rawsetting[$i] = strtolower($rawsetting[$i]); // MAKE ARRAY KEY LOWERCASE
$rawsetting[$i] = preg_replace("/^./", "", $rawsetting[$i]); // REMOVE COLORCODES FROM KEY
$rawsetting[$i+1] = preg_replace("/^./", "", $rawsetting[$i+1]); // REMOVE COLORCODES FROM VALUE
$setting[$rawsetting[$i]] = $rawsetting[$i+1]; // LOAD DATA IN AN ARRAY
}
if ($request == "settings") { return $setting; } // RETURN SETTINGS
//---------------------------------------------------------+
unset($data);
$data[gamemod] = $setting[gamename];
$data[hostname] = $setting[sv_hostname];
$data[mapname] = $setting[mapname];
$data[players] = count($rawdata) - 2;
$data[maxplayers] = $setting[sv_maxclients];
$data[password] = $setting[g_needpass];
if (!$data[hostname]) { $data[hostname] = $setting[hostname]; } // HOSTNAME ALTERNATIVE
if (isset($setting[pswrd])) { $data[password] = $setting[pswrd]; } // CALL OF DUTY
if (isset($setting[needpass])) { $data[password] = $setting[needpass]; } // QUAKE2
if (isset($setting[maxclients])) { $data[maxplayers] = $setting[maxclients]; } // QUAKE2
if ($request == "info") { return $data; } // RETURN INFO
//---------------------------------------------------------+
for($i=2; $i<count($rawdata); $i++)
{
if ($game == "sof2") // SOF RETURNS AN EXTRA DEATHS FIELD
{
$tmp = explode(" ", $rawdata[$i], 4); // LIMIT TO FOUR OR NAME WITH SPACING WOULD BE EXPLODED
$player[$i-1][score] = $tmp[0];
$player[$i-1][ping] = $tmp[1];
$player[$i-1][deaths] = $tmp[2];
$player[$i-1][name] = substr(preg_replace("/^./", "", $tmp[3]) , 1, -1); // REMOVE QUOTES AND COLORCODES
}
else if ($game == "mohq3") // MOH RETURNS JUST PING
{
$tmp = explode(" ", $rawdata[$i], 2); // LIMIT TO TWO OR NAME WITH SPACING WOULD BE EXPLODED
$player[$i-1][ping] = $tmp[0];
$player[$i-1][name] = substr(preg_replace("/^./", "", $tmp[1]) , 1, -1); // REMOVE QUOTES AND COLORCODES
}
else
{
$tmp = explode(" ", $rawdata[$i], 3); // LIMIT TO THREE OR NAME WITH SPACING WOULD BE EXPLODED
$player[$i-1][score] = $tmp[0];
$player[$i-1][ping] = $tmp[1];
$player[$i-1][name] = substr(preg_replace("/^./", "", $tmp[2]) , 1, -1); // REMOVE QUOTES AND COLORCODES
}
}
if ($request == "players") { return $player; } // RETURN PLAYERS
//---------------------------------------------------------+
}
//------------------------------------------------------------------------------------------------------------+
//------------------------------------------------------------------------------------------------------------+
//////////////////////////////////////////////////////
//////////////////Mohaa Gamespy Method////////////////
//////////////////////////////////////////////////////
function lgsl_query_three($ip, $port, $queryport, $game, $request)
{
//---------------------------------------------------------+
if ($request == "info" || $request == "settings") { $challenge = "basic\info\rules"; }
if ($request == "players") { $challenge = "players"; }
//---------------------------------------------------------+
$fp = @fsockopen("udp://$ip", $queryport, $errno, $errstr, 1);
if (!$fp) { return FALSE; } // RETURN AS CONNECTION WAS REFUSED
stream_set_timeout($fp, 1, 0); stream_set_blocking($fp, true); // SET TIMEOUT FOR OFFLINE SERVERS
fwrite($fp, $challenge);
$buffer = fread($fp, 4096);
if (!$buffer) { fclose($fp); return FALSE; } // IF BUFFER EMPTY RETURN BLANK
if (!strstr($buffer, "final"))
{
$buffer .= fread($fp, 4096); // MULTI-PACKET SENT IN ORDER
}
if ($request == "settings" && !strstr($buffer, "mapname") && strstr($buffer, "final") )
{
$buffer = fread($fp, 4096) . $buffer; // SETTINGS MULTI-PACKET IN REVERSE
}
if ($request == "players" && !strstr($buffer, "player_0") && strstr($buffer, "final") )
{
$buffer = fread($fp, 4096) . $buffer; // PLAYER MULTI-PACKET IN REVERSE
}
fclose($fp); // CLOSE CONNECTION;
$buffer = trim($buffer); // TRIM WHITE SPACE FROM PACKET
//---------------------------------------------------------+
if ($request == "info" || $request == "settings")
{
$buffer = explode("player_0", $buffer); // REMOVE PLAYER INFORMATION
$buffer = $buffer[0]; // AS SOME GAMES JUST SEND EVERYTHING IGNORING CHALLENGE
$buffer = explode("leader_0", $buffer); // REMOVE PLAYER INFORMATION ( AMERICA'S ARMY )
$buffer = $buffer[0]; // AS SOME GAMES JUST SEND EVERYTHING IGNORING CHALLENGE
$rawsetting = explode("", $buffer); // EXPLODE BY BACKSLASH
for($i=1; $i<count($rawsetting); $i=$i+2)
{
$rawsetting[$i] = strtolower("$rawsetting[$i]"); // MAKE ARRAY KEY LOWERCASE
if ($rawsetting[$i] != "final" && $rawsetting[$i] != "queryid") // MAKE SURE KEY IS NOT PACKET CHECKING STUFF
{
$setting[$rawsetting[$i]] = $rawsetting[$i+1]; // LOAD DATA IN AN ARRAY
}
}
if ($request == "settings") { return $setting; } // RETURN SETTINGS
//---------------------------------------------------------+
unset($data);
$data[gamemod] = $setting[gamename];
if (!$data[gamemod] || $game == "bf1942")
{
$data[gamemod] = $setting[gameid]; // GAMEMOD ALTERNATIVE
}
$data[hostname] = $setting[sv_hostname];
if (!$data[hostname]) { $data[hostname] = $setting[hostname]; } // HOSTNAME ALTERNATIVE
if ($game == "swat4") { $data[hostname] = preg_replace("/[c=......]/iU", "", $data[hostname]); } // REMOVE COLORCODES FROM HOSTNAME
$data[mapname] = $setting[mapname];
$data[players] = $setting[numplayers];
$data[maxplayers] = $setting[maxplayers];
$data[password] = $setting[password];
return $data; // RETURN INFO
}
//---------------------------------------------------------+
if ($request == "players")
{
if ($game == "cnc") { $player[1][name] = "This Game Does Not Provide Player Information"; return $player; }
$rawsetting = explode("", $buffer); // EXPLODE BY BACKSLASH
for($i=1; $i<count($rawsetting); $i=$i+2)
{
if (!strstr($rawsetting[$i], "_")) { $i++; continue; } // SKIP NON PLAYER DATA
$rawsetting[$i] = strtolower("$rawsetting[$i]"); // MAKE ARRAY KEY LOWERCASE
$buffer = explode("_", $rawsetting[$i], 2); // SEPERATE KEY AND PLAYERID
if ($buffer[0] == "player") { $buffer[0] = "name"; } // CONVERT TO LGSL STANDARD
if ($buffer[0] == "playername") { $buffer[0] = "name"; } // CONVERT TO LGSL STANDARD
if ($buffer[0] == "frags") { $buffer[0] = "score"; } // CONVERT TO LGSL STANDARD
if ($buffer[0] == "ngsecret") { $buffer[0] = "stats"; } // CONVERT TO LGSL STANDARD
if ($buffer[0] == "ping" && !$rawsetting[$i+1]) { $buffer[0] = "null"; } // WHEN GAME RETURNS BLANK KEY
if (is_numeric($buffer[1])) // CHECK FOR A PLAYERID
{
$player[$buffer[1]+1][$buffer[0]] = $rawsetting[$i+1]; // LOAD DATA INTO ARRAY
}
}
return $player; // RETURN PLAYERS
}
//---------------------------------------------------------+
}
//------------------------------------------------------------------------------------------------------------+
//------------------------------------------------------------------------------------------------------------+
It sounds pretty cool. have no idea what / how to use it though. So i cant really comment on it as it just looks like lines to me:
the protocol seems to be the same, must be some other issue...