pep.py/events/friendAddEvent.py

13 lines
410 B
Python
Raw Normal View History

2016-10-02 22:48:14 +02:00
from common.log import logUtils as log
from common.ripple import userUtils
2016-05-18 19:12:46 +02:00
from constants import clientPackets
2016-10-02 22:48:14 +02:00
2016-04-19 19:40:59 +02:00
def handle(userToken, packetData):
# Friend add packet
packetData = clientPackets.addRemoveFriend(packetData)
2016-10-02 22:48:14 +02:00
userUtils.addFriend(userToken.userID, packetData["friendID"])
2016-04-19 19:40:59 +02:00
# Console output
log.info("{} have added {} to their friends".format(userToken.username, str(packetData["friendID"])))