aboutsummaryrefslogtreecommitdiff
path: root/server/aoprotocol.py
diff options
context:
space:
mode:
authorCerapter <cerap@protonmail.com>2018-08-10 00:30:05 +0200
committerCerapter <cerap@protonmail.com>2018-08-10 00:30:05 +0200
commitbf971f69d8a4317d511334727455f368906b9a21 (patch)
treed58d06976816ac3364bd584c086c52df6d71a55c /server/aoprotocol.py
parent84da730bcef71aeb0d0944261a44dc289949a74d (diff)
Fixed a bug where showname change rules got ignored when changing songs.
Diffstat (limited to 'server/aoprotocol.py')
-rw-r--r--server/aoprotocol.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/aoprotocol.py b/server/aoprotocol.py
index d26afc9a..877b6172 100644
--- a/server/aoprotocol.py
+++ b/server/aoprotocol.py
@@ -489,6 +489,9 @@ class AOProtocol(asyncio.Protocol):
name, length = self.server.get_song_data(args[0])
if len(args) > 2:
showname = args[2]
+ if len(showname) > 0 and not self.client.area.showname_changes_allowed:
+ self.client.send_host_message("Showname changes are forbidden in this area!")
+ return
self.client.area.play_music_shownamed(name, self.client.char_id, showname, length)
self.client.area.add_music_playing_shownamed(self.client, showname, name)
else: