pep.py/events/partLobbyEvent.py

17 lines
428 B
Python
Raw Permalink Normal View History

2016-10-02 20:48:14 +00:00
from common.log import logUtils as log
from helpers import chatHelper as chat
2016-04-19 17:40:59 +00:00
def handle(userToken, _):
# Get usertoken data
username = userToken.username
# Remove user from users in lobby
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
chat.partChannel(channel="#lobby", token=userToken, kick=True)
2016-04-19 17:40:59 +00:00
# Console output
log.info("{} has left multiplayer lobby".format(username))