diff options
| author | Cerapter <cerap@protonmail.com> | 2018-08-16 00:40:42 +0200 |
|---|---|---|
| committer | Cerapter <cerap@protonmail.com> | 2018-08-16 00:40:42 +0200 |
| commit | 956c3b50d6c813abc149b80c5abb03d6712d1e95 (patch) | |
| tree | b0f5da9935672e33187336aa28f5f1958195ff9f /server/aoprotocol.py | |
| parent | 86bcb3d2952614c7bdf16fc2004607cee89dc741 (diff) | |
Added support for the jukebox to use the shownames of its users.
Diffstat (limited to 'server/aoprotocol.py')
| -rw-r--r-- | server/aoprotocol.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/server/aoprotocol.py b/server/aoprotocol.py index b36aa613..9c7c9ca7 100644 --- a/server/aoprotocol.py +++ b/server/aoprotocol.py @@ -492,7 +492,13 @@ class AOProtocol(asyncio.Protocol): name, length = self.server.get_song_data(args[0]) if self.client.area.jukebox: - self.client.area.add_jukebox_vote(self.client, name, length) + showname = '' + if len(args) > 2: + if len(args[2]) > 0 and not self.client.area.showname_changes_allowed: + self.client.send_host_message("Showname changes are forbidden in this area!") + return + showname = args[2] + self.client.area.add_jukebox_vote(self.client, name, length, showname) logger.log_server('[{}][{}]Added a jukebox vote for {}.'.format(self.client.area.id, self.client.get_char_name(), name), self.client) else: if len(args) > 2: |
