pep.py/events/partLobbyEvent.py

19 lines
445 B
Python
Raw 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-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
userID = userToken.userID
username = userToken.username
# Remove user from users in lobby
userToken.leaveStream("lobby")
2016-04-19 17:40:59 +00:00
# Part lobby channel
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))