2016-10-02 20:48:14 +00:00
|
|
|
from common.log import logUtils as log
|
2016-07-14 10:37:07 +00:00
|
|
|
from helpers import chatHelper as chat
|
2016-10-02 20:48:14 +00:00
|
|
|
from objects import glob
|
|
|
|
|
2016-04-19 17:40:59 +00:00
|
|
|
|
|
|
|
def handle(userToken, _):
|
|
|
|
# Get usertoken data
|
|
|
|
username = userToken.username
|
|
|
|
|
|
|
|
# Remove user from users in lobby
|
2016-10-04 20:10:07 +00:00
|
|
|
userToken.leaveStream("lobby")
|
2016-04-19 17:40:59 +00:00
|
|
|
|
|
|
|
# Part lobby channel
|
2016-12-11 10:07:35 +00:00
|
|
|
# Done automatically by the client
|
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))
|