Make !mp close close the match even if the user is only in the match's channel and not in the match
This commit is contained in:
		@@ -788,10 +788,8 @@ def multiplayer(fro, chan, message):
 | 
				
			|||||||
		return "Attempting to join match #{}!".format(matchID)
 | 
							return "Attempting to join match #{}!".format(matchID)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	def mpClose():
 | 
						def mpClose():
 | 
				
			||||||
		myToken = glob.tokens.getTokenFromUsername(fro)
 | 
							matchID = getMatchIDFromChannel(chan)
 | 
				
			||||||
		if myToken.matchID == -1:
 | 
							glob.matches.disposeMatch(matchID)
 | 
				
			||||||
			return "You're not in a multiplayer match"
 | 
					 | 
				
			||||||
		glob.matches.disposeMatch(myToken.matchID)
 | 
					 | 
				
			||||||
		return "Multiplayer match #{} disposed successfully".format(myToken.matchID)
 | 
							return "Multiplayer match #{} disposed successfully".format(myToken.matchID)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	def mpLock():
 | 
						def mpLock():
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user