{
"version": 3,
"sources": ["../../../server/chat-plugins/permalocks.ts"],
"sourcesContent": ["/**\n * Wrapper to facilitate posting / interacting with Smogon.\n * By Mia.\n * @author mia-pi-git\n */\nimport { Net, FS, Utils } from '../../lib';\n\nexport interface Nomination {\n\tby: ID;\n\tips: string[];\n\tinfo: string;\n\tdate: number;\n\tstanding: string;\n\talts: string[];\n\tprimaryID: ID;\n\tclaimed?: ID;\n\tpost?: string;\n}\n\ninterface IPData {\n\tcountry: string;\n\tisp: string;\n\tcity: string;\n\tregionName: string;\n\tlat: number;\n\tlon: number;\n}\n\nexport function getIPData(ip: string) {\n\ttry {\n\t\treturn Net(\"https://miapi.dev/api/ip/\" + ip).get().then(JSON.parse) as Promise
`;\n\t\tbuf += `Submitted ${Chat.toTimestamp(new Date(nom.date), { human: true })}
`;\n\t\tbuf += `${Chat.count(nom.alts, 'alts')}, ${Chat.count(nom.ips, 'IPs')}`;\n\t\tbuf += `
[${dateString}]
`;\n\t\t\t} else {\n\t\t\t\tdateString = ``;\n\t\t\t}\n\t\t\tconst thisRoomID = entryRoom?.split(' ')[0];\n\t\t\tif (thisRoomID.startsWith('battle-')) {\n\t\t\t\ttimestamp = `${timestamp}`;\n\t\t\t} else {\n\t\t\t\tconst [day, time] = Chat.toTimestamp(date).split(' ');\n\t\t\t\ttimestamp = `${timestamp}`;\n\t\t\t}\n\t\t\treturn `${dateString}${line}`;\n\t\t}).join(`
`);\n\t}\n\tasync displayActionPage(nom: Nomination) {\n\t\tlet buf = `
Staff notes:
`;\n\t\tbuf += `