2016-05-18 17:12:46 +00:00
|
|
|
from objects import glob
|
2016-06-04 10:44:54 +00:00
|
|
|
from helpers import logHelper as log
|
2016-07-14 10:37:07 +00:00
|
|
|
from helpers import chatHelper as chat
|
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
|
2016-07-14 10:37:07 +00:00
|
|
|
chat.partChannel(channel="#lobby", token=userToken, kick=True)
|
2016-04-19 17:40:59 +00:00
|
|
|
|
|
|
|
# Console output
|
2016-06-04 10:44:54 +00:00
|
|
|
log.info("{} has left multiplayer lobby".format(username))
|