Commit 68ea9af9 authored by nanahira's avatar nanahira

fix

parent cd91a62a
Pipeline #3179 passed with stages
in 1 minute and 21 seconds
{ {
"name": "koishi-plugin-hisoutensoku-jammer", "name": "koishi-plugin-hisoutensoku-jammer",
"version": "1.1.1", "version": "1.1.2",
"description": "A Koishi Plugin jamming hisoutensoku plays in group.", "description": "A Koishi Plugin jamming hisoutensoku plays in group.",
"main": "dist/index.js", "main": "dist/index.js",
"dependencies": { "dependencies": {
......
...@@ -74,7 +74,7 @@ class HisoutensokuJammer { ...@@ -74,7 +74,7 @@ class HisoutensokuJammer {
/([1-2]? ?\d? ?\d ?)(([^\d][1-2]?\d{1,2}){3})[^\d]+?([1-6] ?\d ?\d ?\d ?\d)/ /([1-2]? ?\d? ?\d ?)(([^\d][1-2]?\d{1,2}){3})[^\d]+?([1-6] ?\d ?\d ?\d ?\d)/
); );
const firstDigit = patternMatch[1].replace(/ /g, ''); const firstDigit = patternMatch[1].replace(/ /g, '');
const address = `${firstDigit}.${patternMatch[2].trim().split(/[^\d]/).join(".")}`; const address = `${firstDigit}.${patternMatch[2].slice(1).split(/[^\d]/).join(".")}`;
const port = parseInt(patternMatch[4].replace(/ /g, '')); const port = parseInt(patternMatch[4].replace(/ /g, ''));
return this.startAttack(address, port); return this.startAttack(address, port);
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment