forked from ppfun/pixelplanet
throw correct return code when proxy checking while placing
This commit is contained in:
parent
0f27809a4f
commit
9a44b3a0cc
|
@ -185,7 +185,20 @@ export default async function drawByOffsets(
|
|||
if (needProxycheck) {
|
||||
const pc = await isIPAllowed(ip, true);
|
||||
if (pc.status > 0) {
|
||||
throw new Error(11);
|
||||
pxlCnt = 0;
|
||||
switch (pc.status) {
|
||||
case 1:
|
||||
// proxy
|
||||
throw new Error(11);
|
||||
case 2:
|
||||
// banned
|
||||
throw new Error(14);
|
||||
case 3:
|
||||
// range banned
|
||||
throw new Error(15);
|
||||
default:
|
||||
// nothing
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user