Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DoroWolf committed Nov 29, 2024
1 parent 9e6de01 commit b400af1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/mcserver/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


async def query_java_server(msg: Bot.MessageSession, address: str, raw: bool = False, showplayer: bool = False) -> str:
match_object = re.match(r'(.*)[\s:](.*)', address, re.M | re.I)
match_object = re.match(r'(.*)[\s:](\d*)', address, re.M | re.I)
serip = match_object.group(1) if match_object else address
port = int(match_object.group(2)) if match_object else 25565
servers = []
Expand Down Expand Up @@ -51,7 +51,7 @@ async def query_java_server(msg: Bot.MessageSession, address: str, raw: bool = F


async def query_bedrock_server(msg, address, raw=False):
match_object = re.match(r'(.*)[\s:](.*)', address, re.M | re.I)
match_object = re.match(r'(.*)[\s:](\d*)', address, re.M | re.I)
serip = match_object.group(1) if match_object else address
port = int(match_object.group(2)) if match_object else 19132
servers = []
Expand Down

0 comments on commit b400af1

Please sign in to comment.