mirror of
https://github.com/ProjectSWGCore/Holocore.git
synced 2026-07-31 01:15:50 -04:00
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
23 lines
654 B
Python
23 lines
654 B
Python
from intents.chat import ChatBroadcastIntent
|
|
from resources.encodables import ProsePackage
|
|
from intents.chat import ChatAvatarRequestIntent
|
|
from intents.chat.ChatAvatarRequestIntent.RequestType import FRIEND_REMOVE_TARGET
|
|
|
|
def execute(galacticManager, player, target, args):
|
|
ghost = player.getPlayerObject()
|
|
|
|
if ghost is None or not args:
|
|
return
|
|
|
|
name = str(args.split(" ")[0]).lower()
|
|
|
|
if not name:
|
|
return
|
|
|
|
if ghost.getFriendsList().contains(name) is False:
|
|
ChatBroadcastIntent(player, ProsePackage("@cmnty:friend_not_found", "TT", name)).broadcast()
|
|
return
|
|
|
|
ChatAvatarRequestIntent(player, name, FRIEND_REMOVE_TARGET).broadcast()
|
|
return
|