mirror of
https://github.com/tribufu/node-gamedig
synced 2026-05-06 07:07:33 +00:00
chore: Convert all files to LF endings (#400)
* Convert to LF? * Modify gitattributes * Force LF * Git --renormalize * Update .gitattributes to enforce eol=lf * Redo CRLF -> LF on remaining files
This commit is contained in:
parent
a8bc7521f6
commit
cee42e7a88
65 changed files with 5697 additions and 5697 deletions
|
|
@ -1,36 +1,36 @@
|
|||
import Minimist from 'minimist'
|
||||
import GameDig from './../lib/index.js'
|
||||
|
||||
const argv = Minimist(process.argv.slice(2), {})
|
||||
|
||||
const options = {}
|
||||
if (argv._.length >= 1) {
|
||||
const target = argv._[0]
|
||||
const split = target.split(':')
|
||||
options.host = split[0]
|
||||
if (split.length >= 2) {
|
||||
options.port = split[1]
|
||||
}
|
||||
}
|
||||
|
||||
const gamedig = new GameDig(options)
|
||||
|
||||
const protocols = ['valve', 'gamespy1', 'gamespy2', 'gamespy3', 'goldsrc', 'minecraft', 'quake1', 'quake2', 'quake3', 'unreal2', 'valve']
|
||||
|
||||
const run = async () => {
|
||||
for (const protocol of protocols) {
|
||||
try {
|
||||
const response = await gamedig.query({
|
||||
...options,
|
||||
debug: true,
|
||||
type: `protocol-${protocol}`
|
||||
})
|
||||
console.log(response)
|
||||
process.exit()
|
||||
} catch (e) {
|
||||
console.log(`Error on '${protocol}': ${e}`)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
run().then(() => {})
|
||||
import Minimist from 'minimist'
|
||||
import GameDig from './../lib/index.js'
|
||||
|
||||
const argv = Minimist(process.argv.slice(2), {})
|
||||
|
||||
const options = {}
|
||||
if (argv._.length >= 1) {
|
||||
const target = argv._[0]
|
||||
const split = target.split(':')
|
||||
options.host = split[0]
|
||||
if (split.length >= 2) {
|
||||
options.port = split[1]
|
||||
}
|
||||
}
|
||||
|
||||
const gamedig = new GameDig(options)
|
||||
|
||||
const protocols = ['valve', 'gamespy1', 'gamespy2', 'gamespy3', 'goldsrc', 'minecraft', 'quake1', 'quake2', 'quake3', 'unreal2', 'valve']
|
||||
|
||||
const run = async () => {
|
||||
for (const protocol of protocols) {
|
||||
try {
|
||||
const response = await gamedig.query({
|
||||
...options,
|
||||
debug: true,
|
||||
type: `protocol-${protocol}`
|
||||
})
|
||||
console.log(response)
|
||||
process.exit()
|
||||
} catch (e) {
|
||||
console.log(`Error on '${protocol}': ${e}`)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
run().then(() => {})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue