public void RemoveFromGroup(IUser addedBy, IGroup group, IRichTextString reason = null) { if (!IsCurrentlyInGroup(group)) { return; //Not even in the group. } GroupUpdateHistory.Add( new GroupUpdate() { Group = group, Rank = group.GetLowestRank(), ActionedBy = addedBy, ActionedDateTime = DateTime.Now.ToDateTime(), Reason = reason ?? ObjectFactory.CreateRichTextString("No Reason.") } ); }
public void AddToGroup(IUser addedBy, IGroup group, IRichTextString reason = null) { if (IsCurrentlyInGroup(group)) { return; //Currently a member, no need to add again. } GroupUpdateHistory.Add( new GroupUpdate() { Group = group, Rank = group.GetLowestRank(), ActionedBy = addedBy, ActionedDateTime = DateTime.Now.ToDateTime(), Reason = reason ?? ObjectFactory.CreateRichTextString("No Reason.") } ); }
public void Demote(IUser demotedBy, IGroup group, IRichTextString reason = null) { if (!IsCurrentlyInGroup(group)) { return; //Not in the group. Can't demote! } IRank currentRank = GetRankInGroupOrNull(group) ?? group.GetLowestRank(); IRank newRank = group.GetNextLowerRank(currentRank); GroupUpdateHistory.Add( new GroupUpdate() { Group = group, Rank = newRank, ActionedBy = demotedBy, ActionedDateTime = DateTime.Now.ToDateTime(), Reason = reason ?? ObjectFactory.CreateRichTextString("No Reason.") } ); }