fix: adding a non-existing game to the .last command output
This commit is contained in:
parent
19ffa45c38
commit
d2611ca615
6
bot.py
6
bot.py
|
@ -41,14 +41,14 @@ class Server(BaseServer):
|
|||
else:
|
||||
game = " ".join(line.params[1].split(" ")[1:]).lower()
|
||||
ping = ""
|
||||
user = line.source.split('!')[0]
|
||||
global lastPlayed
|
||||
lastPlayed = game
|
||||
user = line.source.split('!')[0]
|
||||
if game not in match_players[self.name + '-' + chan]:
|
||||
await self.send(build("PRIVMSG", [chan, "ERROR: no players in "+ game]))
|
||||
else:
|
||||
matches = match_players[self.name + '-' + chan][game]
|
||||
others = list(set(matches) - set([user])) # don't ping the user who .matched
|
||||
global lastPlayed
|
||||
lastPlayed = game
|
||||
|
||||
if len(others) > 0:
|
||||
for player in others:
|
||||
|
|
Loading…
Reference in New Issue