Beispiel #1
0
        public void Handle(object sender, AddOperationRequestEventArgs e)
        {
            CustomCommand cc = customCommandFactory.Create(e.RequestName, e.RequestValue,
                                                           e.GetCooldown(), e.GetPermittedUsers());

            if (AddCommand(cc))
            {
                string message = string.Format("!{0} command successfully added!", cc.Name);
                if (e.IsWhisper)
                {
                    client.Whisper(e.User, message);
                }
                else
                {
                    client.SendMessage(message);
                }
            }
        }
Beispiel #2
0
 public void OnEvent(AddOperationRequestEventArgs e)
 {
     AddOperationHandler(this, e);
 }