pep.py/events/friendAddEvent.py

13 lines
410 B
Python
Raw Normal View History

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