From 60fe2bc56ea64c2e5956f5be74faa382bae333de Mon Sep 17 00:00:00 2001 From: goeo_ Date: Sun, 20 Aug 2017 17:22:47 +0300 Subject: [PATCH] Make !mp close close the match even if the user is only in the match's channel and not in the match --- constants/fokabotCommands.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/constants/fokabotCommands.py b/constants/fokabotCommands.py index 073dac5..5e5ac93 100644 --- a/constants/fokabotCommands.py +++ b/constants/fokabotCommands.py @@ -788,10 +788,8 @@ def multiplayer(fro, chan, message): return "Attempting to join match #{}!".format(matchID) def mpClose(): - myToken = glob.tokens.getTokenFromUsername(fro) - if myToken.matchID == -1: - return "You're not in a multiplayer match" - glob.matches.disposeMatch(myToken.matchID) + matchID = getMatchIDFromChannel(chan) + glob.matches.disposeMatch(matchID) return "Multiplayer match #{} disposed successfully".format(myToken.matchID) def mpLock():