/// <summary> /// Process the message for the specified client. /// </summary> /// <param name="aClient">The client who sent the message.</param> public override void Process(Client aClient) { Player player = aClient.Player; MessageBoard board = null; switch (Channel) { case Channel.MsgTrade: board = World.TradeBoard; break; case Channel.MsgFriend: board = World.FriendBoard; break; case Channel.MsgTeam: board = World.TeamBoard; break; case Channel.MsgSyn: board = World.SynBoard; break; case Channel.MsgOther: board = World.OtherBoard; break; case Channel.MsgSystem: board = World.SystemBoard; break; default: break; } switch (_Action) { case Action.Del: { if (Params.Length != 1) { return; } String author = Params[0]; if (author != player.Name && !(player.IsGM || player.IsPM)) { return; } MessageBoard.MessageInfo message = board.GetMsgInfoByAuthor(author); board.Delete(message); break; } case Action.GetList: { String[] list = board.GetList(Index); player.Send(new MsgMessageBoard(Index, Channel, list, Action.List)); break; } case Action.GetWords: { if (Params.Length != 1) { return; } String author = Params[0]; String words = board.GetWords(author); player.Send(new MsgTalk(author, player.Name, words, Channel, Color.White)); break; } default: { sLogger.Error("Action {0} is not implemented for MsgMessageBoard.", (Byte)_Action); break; } } }