Skip to content

Commit 1f30c1f

Browse files
committed
fix: console log
1 parent d5474b3 commit 1f30c1f

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

src/OTAPI.UnifiedServerProcess.GlobalNetwork/CommandHandler.cs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ void ProcessUSPCommand(Excutor excutor, string command, string[] args) {
116116
var servers = router.servers;
117117
var clientId = excutor.UserId;
118118

119-
bool success = true;
119+
bool match = true;
120120

121121
switch (command) {
122122
case "connect":
@@ -205,16 +205,9 @@ void ProcessUSPCommand(Excutor excutor, string command, string[] args) {
205205
}
206206
break;
207207
default:
208-
success = false;
208+
match = false;
209209
break;
210210
}
211-
212-
if (excutor.IsClient) {
213-
var server = excutor.TriggerServer;
214-
if (success) {
215-
server.Console.WriteLine($"Player '{server.Main.player[excutor.UserId].name}' executed command: '/{command}'", Color.Purple);
216-
}
217-
}
218211
}
219212
}
220213
}

src/OTAPI.UnifiedServerProcess.GlobalNetwork/Network/Router.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ public void ServerWarp(byte plr, ServerContext to) {
257257
lock (client) {
258258
SyncHelper.SyncPlayerLeaveToOthers(from, plr);
259259
SyncHelper.SyncServerOfflineToPlayer(from, plr);
260-
from.Console.WriteLine($"[USP] Player {plr} warped to {to.Name}, current players: {to.NPC.GetActivePlayerCount()}");
260+
from.Console.WriteLine($"[USP] Player '{from.Main.player[plr].name}' warped to {to.Name}, current players: {to.NPC.GetActivePlayerCount()}");
261261

262262
var inactivePlayer = to.Main.player[plr];
263263
var activePlayer = from.Main.player[plr];
@@ -273,7 +273,7 @@ public void ServerWarp(byte plr, ServerContext to) {
273273

274274
SyncHelper.SyncServerOnlineToPlayer(to, plr);
275275
SyncHelper.SyncPlayerJoinToOthers(to, plr);
276-
to.Console.WriteLine($"[USP] Player {plr} warped from {from.Name}, current players: {to.NPC.GetActivePlayerCount()}");
276+
to.Console.WriteLine($"[USP] Player '{to.Main.player[plr].name}' joined from {from.Name}, current players: {to.NPC.GetActivePlayerCount()}");
277277
}
278278
}
279279
}

0 commit comments

Comments
 (0)