diff --git a/package-lock.json b/package-lock.json index 366d9cc..558d44b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,13 +15,12 @@ "dotenv": "^16.3.2", "gamedig": "^5.1.3", "grammy": "^1.20.3", - "ip": "^2.0.1", "lowdb": "^6.1.1", - "mustache": "^4.2.0" + "mustache": "^4.2.0", + "neoip": "^3.0.1" }, "devDependencies": { "@types/gamedig": "^5.0.0", - "@types/ip": "^1.1.3", "@types/node": "^16.18.73", "eslint": "^8.56.0", "nodemon": "^3.0.3", @@ -588,16 +587,6 @@ "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==" }, - "node_modules/@types/ip": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@types/ip/-/ip-1.1.3.tgz", - "integrity": "sha512-64waoJgkXFTYnCYDUWgSATJ/dXEBanVkaP5d4Sbk7P6U7cTTMhxVyROTckc6JKdwCrgnAjZMn0k3177aQxtDEA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@types/is-stream/-/is-stream-1.1.0.tgz", @@ -2655,12 +2644,6 @@ "node": ">= 0.4" } }, - "node_modules/ip": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.1.tgz", - "integrity": "sha512-lJUL9imLTNi1ZfXT+DU6rBBdbiKGBuay9B6xGSPVjUeQwaH1RIGqef8RZkUtHioLmSNpPR5M4HVKJGm1j8FWVQ==", - "license": "MIT" - }, "node_modules/ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", @@ -3300,6 +3283,12 @@ "node": ">= 0.6" } }, + "node_modules/neoip": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/neoip/-/neoip-3.0.1.tgz", + "integrity": "sha512-yvMLOFvS7Tzthf9Ukl2/HrVzZqSjxm9PVOdAPLCt7pelDQ5WvJMIur1vNn3VXOL2tqrbzv6Vnal4PyoCrtRZPA==", + "license": "MIT" + }, "node_modules/node-fetch": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", diff --git a/package.json b/package.json index e5e368c..d963034 100644 --- a/package.json +++ b/package.json @@ -30,13 +30,12 @@ "dotenv": "^16.3.2", "gamedig": "^5.1.3", "grammy": "^1.20.3", - "ip": "^2.0.1", "lowdb": "^6.1.1", - "mustache": "^4.2.0" + "mustache": "^4.2.0", + "neoip": "^3.0.1" }, "devDependencies": { "@types/gamedig": "^5.0.0", - "@types/ip": "^1.1.3", "@types/node": "^16.18.73", "eslint": "^8.56.0", "nodemon": "^3.0.3", diff --git a/src/discord-bot.ts b/src/discord-bot.ts index 5fc20f7..4fc055b 100644 --- a/src/discord-bot.ts +++ b/src/discord-bot.ts @@ -3,7 +3,7 @@ import { JSONPreset } from 'lowdb/node'; import { GameServer } from './game-server.js'; import hhmmss from './lib/hhmmss.js'; import { DiscordConfig } from './watcher.js'; -import ip from 'ip'; +import * as ip from 'neoip'; const DATA_PATH = process.env.DATA_PATH || './data/'; const DBG = Boolean(Number(process.env.DBG)); diff --git a/src/game-server.ts b/src/game-server.ts index 7bb52e1..abd89ed 100644 --- a/src/game-server.ts +++ b/src/game-server.ts @@ -1,7 +1,7 @@ import axios from 'axios'; import { GameDig, Player, QueryOptions } from 'gamedig'; import { JSONPreset } from 'lowdb/node'; -import ip from 'ip'; +import * as ip from 'neoip'; import getIP from './lib/getip.js'; import { GameServerConfig } from './watcher.js'; diff --git a/src/slack-bot.ts b/src/slack-bot.ts index b6e347a..9f6e9c3 100644 --- a/src/slack-bot.ts +++ b/src/slack-bot.ts @@ -4,7 +4,7 @@ import { JSONPreset } from 'lowdb/node'; import { GameServer } from './game-server.js'; import hhmmss from './lib/hhmmss.js'; import { SlackConfig } from './watcher.js'; -import ip from 'ip'; +import * as ip from 'neoip'; const DATA_PATH = process.env.DATA_PATH || './data/'; const DBG = Boolean(Number(process.env.DBG)); diff --git a/src/telegram-bot.ts b/src/telegram-bot.ts index 081a307..26dcc3c 100644 --- a/src/telegram-bot.ts +++ b/src/telegram-bot.ts @@ -3,7 +3,7 @@ import { JSONPreset } from 'lowdb/node'; import { GameServer } from './game-server.js'; import hhmmss from './lib/hhmmss.js'; import { TelegramConfig } from './watcher.js'; -import ip from 'ip'; +import * as ip from 'neoip'; const DATA_PATH = process.env.DATA_PATH || './data/'; const DBG = Boolean(Number(process.env.DBG));