Skip to content
This repository was archived by the owner on Apr 27, 2019. It is now read-only.

Commit a8cbe78

Browse files
committed
Added player counts in /who and /planet
1 parent 1c97d8b commit a8cbe78

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

plugins/admin_commands_plugin/admin_command_plugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ def activate(self):
2222
def who(self, data):
2323
"""Returns all current users on the server. Syntax: /who"""
2424
who = [w.colored_name(self.config.colors) for w in self.player_manager.who()]
25-
self.protocol.send_chat_message("Players online: %s" % ", ".join(who))
25+
self.protocol.send_chat_message("%d players online: %s" % (len(who), ", ".join(who)))
2626
return False
2727

2828
def planet(self, data):
2929
"""Displays who is on your current planet."""
3030
who = [w.colored_name(self.config.colors) for w in self.player_manager.who() if
3131
w.planet == self.protocol.player.planet and not w.on_ship]
32-
self.protocol.send_chat_message("Players on your current planet: %s" % ", ".join(who))
32+
self.protocol.send_chat_message("%d players on your current planet: %s" % (len(who), ", ".join(who)))
3333

3434
@permissions(UserLevels.ADMIN)
3535
def whois(self, data):

0 commit comments

Comments
 (0)