2016-05-18 17:12:46 +00:00
|
|
|
from objects import glob
|
|
|
|
from events import channelPartEvent
|
2016-05-17 21:40:34 +00:00
|
|
|
from helpers import consoleHelper
|
|
|
|
from constants import bcolors
|
2016-04-19 17:40:59 +00:00
|
|
|
|
|
|
|
def handle(userToken, _):
|
|
|
|
# Get usertoken data
|
|
|
|
userID = userToken.userID
|
|
|
|
username = userToken.username
|
|
|
|
|
|
|
|
# Remove user from users in lobby
|
|
|
|
glob.matches.lobbyUserPart(userID)
|
|
|
|
|
|
|
|
# Part lobby channel
|
|
|
|
channelPartEvent.partChannel(userToken, "#lobby", True)
|
|
|
|
|
|
|
|
# Console output
|
|
|
|
consoleHelper.printColored("> {} has left multiplayer lobby".format(username), bcolors.BLUE)
|