mirror of
https://github.com/tribufu/node-gamedig
synced 2026-06-01 09:42:41 +00:00
Super epic commit 3
Move everything around Add another 50 or so games *** 'port' option should now be CONNECT port, not query port *** add reference for many missing games
This commit is contained in:
parent
8488cdcca9
commit
bc6b5c9225
64 changed files with 2071 additions and 430 deletions
10
lib/index.js
10
lib/index.js
|
|
@ -17,7 +17,7 @@ udpSocket.on('message', function(buffer, rinfo) {
|
|||
query.options.address != rinfo.address
|
||||
&& query.options.altaddress != rinfo.address
|
||||
) continue;
|
||||
if(query.options.port != rinfo.port) continue;
|
||||
if(query.options.port_query != rinfo.port) continue;
|
||||
query._udpResponse(buffer);
|
||||
break;
|
||||
}
|
||||
|
|
@ -31,10 +31,12 @@ Gamedig = {
|
|||
query: function(options,callback) {
|
||||
if(callback) options.callback = callback;
|
||||
|
||||
var query = TypeResolver(options.type);
|
||||
if(!query) {
|
||||
var query;
|
||||
try {
|
||||
query = TypeResolver.lookup(options.type);
|
||||
} catch(e) {
|
||||
process.nextTick(function() {
|
||||
callback({error:'Invalid server type: '+options.type});
|
||||
callback({error:e.message});
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue