Formatting
This commit is contained in:
parent
6fe10ef349
commit
833038c477
1 changed files with 3 additions and 2 deletions
|
@ -72,7 +72,7 @@ python3 {filename} --address=127.0.0.1 -l -p=7288"""
|
||||||
G.outboundLinks.append((arg[7:].split(":")[0], int(arg.split(":")[1])))
|
G.outboundLinks.append((arg[7:].split(":")[0], int(arg.split(":")[1])))
|
||||||
elif arg.startswith("--hostname"):
|
elif arg.startswith("--hostname"):
|
||||||
G.remoteID = arg[11:]
|
G.remoteID = arg[11:]
|
||||||
if not G.remoteID or len(G.remoteID)>16:
|
if not G.remoteID or len(G.remoteID) > 16:
|
||||||
raise ValueError
|
raise ValueError
|
||||||
elif arg.startswith("--address"):
|
elif arg.startswith("--address"):
|
||||||
address = arg[9:]
|
address = arg[9:]
|
||||||
|
@ -86,9 +86,10 @@ if not saveLogs:
|
||||||
G.msgs.append(
|
G.msgs.append(
|
||||||
b"[00-00-0000 00:00:00] Notice: Logging is disabled on this server instance!\n"
|
b"[00-00-0000 00:00:00] Notice: Logging is disabled on this server instance!\n"
|
||||||
)
|
)
|
||||||
if len(G.remoteID)>16:
|
if len(G.remoteID) > 16:
|
||||||
G.remoteID = G.remoteID[:15]
|
G.remoteID = G.remoteID[:15]
|
||||||
|
|
||||||
|
|
||||||
def raw(string: str) -> str:
|
def raw(string: str) -> str:
|
||||||
s = string.strip()
|
s = string.strip()
|
||||||
s = f"{s!r}"[1:-1].replace("\\\\", "\\")
|
s = f"{s!r}"[1:-1].replace("\\\\", "\\")
|
||||||
|
|
Loading…
Reference in a new issue