public void ChangeVisibilityRule(string leaderID, string groupName, GroupVisibilityRule newRule) { Group group = GetGroup(groupName); if (group != null) { if (string.Equals(leaderID, group.LeaderID, StringComparison.InvariantCultureIgnoreCase)) { group.ChangeVisibilityRule(newRule); } else { MySockets.Server.GetAUser(leaderID).MessageHandler("Only the group leader can change group visibility rules."); } } else { MySockets.Server.GetAUser(leaderID).MessageHandler("No group with that name exists."); } }
public void ChangeVisibilityRule(GroupVisibilityRule newRule) { GroupRuleForVisibility = newRule; InformPlayersInGroup("Group visibility rule has been changed to " + newRule.ToString().Replace("_", " ")); }
public void ChangeVisibilityRule(ObjectId LeaderId, string groupName, GroupVisibilityRule newRule) { Group group = GetGroup(groupName); if (group != null) { if (LeaderId.Pid == group.LeaderId.Pid) { group.ChangeVisibilityRule(newRule); } else { Server.GetAUser(LeaderId).MessageHandler("Only the group leader can change group visibility rules."); } } else { Server.GetAUser(LeaderId).MessageHandler("No group with that name exists."); } }