Fixed master address, admin cheats (money, needs, goto/bring), docs page
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -286,6 +286,16 @@ public sealed class GameServer
|
||||
string result;
|
||||
if (!c.IsAdmin) result = "You are not an admin on this server";
|
||||
else if (!clients.TryGetValue(targetId, out var target) || target.State != ClientState.Joined) result = "Player not found";
|
||||
else if (action == 3)
|
||||
{
|
||||
// Spieler zum Admin holen: Position kommt vom Admin
|
||||
if (r.BaseStream.Length - r.BaseStream.Position < 12) return;
|
||||
float x = r.ReadSingle(), y = r.ReadSingle(), z = r.ReadSingle();
|
||||
if (!float.IsFinite(x) || !float.IsFinite(y) || !float.IsFinite(z)) return;
|
||||
target.Conn.Send(MsgType.Teleport, Wire.Build(w => { w.Write(x); w.Write(y); w.Write(z); }));
|
||||
result = $"Brought {target.Name} to you";
|
||||
Log($"{c.Name} teleported {target.Name} to themselves");
|
||||
}
|
||||
else if (target.IsAdmin && target != c) result = "You cannot kick or ban another admin";
|
||||
else result = KickOrBan(target, action == 2, reason, c.Name);
|
||||
c.Conn.Send(MsgType.AdminResult, Wire.Build(w => w.Write(result)));
|
||||
|
||||
Reference in New Issue
Block a user