pep.py/events/friendAddEvent.py

11 lines
365 B
Python
Raw Normal View History

2016-05-18 17:12:46 +00:00
from helpers import userHelper
from constants import clientPackets
2016-04-19 17:40:59 +00:00
def handle(userToken, packetData):
# Friend add packet
packetData = clientPackets.addRemoveFriend(packetData)
userHelper.addFriend(userToken.userID, packetData["friendID"])
# Console output
print("> {} have added {} to their friends".format(userToken.username, str(packetData["friendID"])))