Change .list to list only the games

This commit is contained in:
Rampoina 2021-07-12 22:44:01 +02:00
parent df9496e43c
commit de1a144e5f
1 changed files with 2 additions and 2 deletions

4
bot.py
View File

@ -74,7 +74,7 @@ class Server(BaseServer):
elif line.params[1].startswith(".list"):
user = line.source.split('!')[0]
if len(line.params[1].split(" ")) < 2:
await self.send(build("PRIVMSG", [user, "list: " + str(match_players[self.name + '-' + chan])]))
await self.send(build("PRIVMSG", [chan, "list: " + str(list(match_players[self.name + '-' + chan].keys()))]))
else:
game = " ".join(line.params[1].split(" ")[1:]).lower()
if game not in match_players[self.name + '-' + chan]:
@ -100,7 +100,7 @@ class Server(BaseServer):
await self.send(build("PRIVMSG", [chan, "Removed " + user + " from the " + game + " match list."]))
elif line.params[1].startswith(".help"):
await self.send(build("PRIVMSG", [chan, " .add game: Add to list; .del game: Remove from list; .match game: Ping everyone on list"]))
await self.send(build("PRIVMSG", [chan, " .add game: Add to list; .del game: Remove from list; .match game: Ping everyone on list; .list game: list people added to the game; .list: list games"]))
async def line_send(self, line: Line):
print(f"{self.name} > {line.format()}")