Files
Holocore/scripts/commands/generic/addFriend.py
T
Waverunner 1ea6818c5c Fixed friends displaying in friends list from old characters
Fixed removeFriend command not properly lowercasing
Fixed variety of issues with the community window not refreshing friends list properly
Fixed empty "does not exist" messages for friends list
Fixed bug allowing you to add yourself to your friends list
2015-06-19 12:37:12 -04:00

16 lines
403 B
Python

from intents.chat import ChatAvatarRequestIntent
from intents.chat.ChatAvatarRequestIntent.RequestType import FRIEND_ADD_TARGET
def execute(galacticManager, player, target, args):
ghost = player.getPlayerObject()
if ghost is None or args is None:
return
name = str(args.split(" ")[0]).lower()
if not name:
return
ChatAvatarRequestIntent(player, name, FRIEND_ADD_TARGET).broadcast()
return