From 9746730a302348347481b2389d0a0a5da84376c6 Mon Sep 17 00:00:00 2001 From: DryByte <93609026+DryByte@users.noreply.github.com> Date: Sat, 3 Dec 2022 18:38:01 -0300 Subject: [PATCH 1/2] Fix admins not able to use move on players --- piqueserver/core_commands/movement.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/piqueserver/core_commands/movement.py b/piqueserver/core_commands/movement.py index 737ce91b2..db7d67ef7 100644 --- a/piqueserver/core_commands/movement.py +++ b/piqueserver/core_commands/movement.py @@ -77,7 +77,7 @@ def do_move(connection, args, silent=False): player = connection.name # player specified elif arg_count == 2 or arg_count == 4: - if not (connection.rights.admin or connection.rights.move_others): + if not (connection.admin or connection.rights.move_others): raise PermissionDenied( "moving other players requires the move_others right") player = args[0] From eae90c2fb3d32d0272c10df5956217a3a9994b85 Mon Sep 17 00:00:00 2001 From: DryByte <93609026+DryByte@users.noreply.github.com> Date: Sat, 3 Dec 2022 18:39:00 -0300 Subject: [PATCH 2/2] Change from send_chat to broadcast_chat --- piqueserver/core_commands/movement.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/piqueserver/core_commands/movement.py b/piqueserver/core_commands/movement.py index db7d67ef7..b47b7f69a 100644 --- a/piqueserver/core_commands/movement.py +++ b/piqueserver/core_commands/movement.py @@ -10,7 +10,7 @@ def unstick(connection, player): Unstick yourself or another player and inform everyone on the server of it /unstick [player] """ - connection.protocol.send_chat("%s unstuck %s" % + connection.protocol.broadcast_chat("%s unstuck %s" % (connection.name, player.name), irc=True) player.set_location_safe(player.get_location()) @@ -98,7 +98,7 @@ def do_move(connection, args, silent=False): if silent: connection.protocol.irc_say('* ' + message) else: - connection.protocol.send_chat(message, irc=True) + connection.protocol.broadcast_chat(message, irc=True) @command(admin_only=True) @@ -144,7 +144,7 @@ def teleport(connection, player1, player2=None, silent=False): if silent: connection.protocol.irc_say('* ' + message) else: - connection.protocol.send_chat(message, irc=True) + connection.protocol.broadcast_chat(message, irc=True) @command('tpsilent', 'tps', admin_only=True)