pep.py/events/friendAddEvent.py
2016-10-02 22:48:14 +02:00

13 lines
410 B
Python

from common.log import logUtils as log
from common.ripple import userUtils
from constants import clientPackets
def handle(userToken, packetData):
# Friend add packet
packetData = clientPackets.addRemoveFriend(packetData)
userUtils.addFriend(userToken.userID, packetData["friendID"])
# Console output
log.info("{} have added {} to their friends".format(userToken.username, str(packetData["friendID"])))