Provides data for the IrcClient.ProtocolError event.
상속: System.EventArgs
예제 #1
0
파일: Program.cs 프로젝트: jonbonne/OCTGN
 private static void ClientOnProtocolError(object sender, IrcProtocolErrorEventArgs ircProtocolErrorEventArgs)
 {
     if (ircProtocolErrorEventArgs.Code == 433)
     {
         
     }
 }
예제 #2
0
 /// <summary>
 /// </summary>
 /// <param name="sender">
 /// </param>
 /// <param name="e">
 /// </param>
 public virtual void IrcClient_ProtocolError(object sender, IrcProtocolErrorEventArgs e)
 {
 }
예제 #3
0
        /// <summary>
        /// </summary>
        /// <param name="sender">
        /// </param>
        /// <param name="e">
        /// </param>
        public override void IrcClient_ProtocolError(object sender, IrcProtocolErrorEventArgs e)
        {
            // on Protocol Error 433 (Nickname in Use) change to an alternate one
            if (e.Code == 433)
            {
                IrcClient client = (IrcClient)sender;
                string actualName = client.LocalUser.NickName;
                int temp = -1;
                if (actualName.Replace(Config.Instance.CurrentConfig.RelayBotNick, string.Empty) != string.Empty)
                {
                    int.TryParse(actualName.Replace(Config.Instance.CurrentConfig.RelayBotNick, string.Empty), out temp);
                    temp++;
                }
                else
                {
                    temp = 1;
                }

                actualName = Config.Instance.CurrentConfig.RelayBotNick + temp;
                client.LocalUser.SetNickName(actualName);
            }
        }
예제 #4
0
파일: IrcClient.cs 프로젝트: txdv/ircdotnet
 /// <summary>
 /// Raises the <see cref="ProtocolError"/> event.
 /// </summary>
 /// <param name="e">The <see cref="IrcProtocolErrorEventArgs"/> instance containing the event data.</param>
 protected virtual void OnProtocolError(IrcProtocolErrorEventArgs e)
 {
     var handler = this.ProtocolError;
     if (handler != null)
         handler(this, e);
 }
예제 #5
0
        private static void ClientOnProtocolError(object sender, IrcProtocolErrorEventArgs ircProtocolErrorEventArgs)
        {
            Log("Error: " + ircProtocolErrorEventArgs.Message, ConsoleColor.Magenta);
            if (ircProtocolErrorEventArgs.Code == 433)
            {

            }
        }
예제 #6
0
파일: IrcBot.cs 프로젝트: stauken/twitchbot
 void ircConnection_ProtocolError(object sender, IrcProtocolErrorEventArgs e)
 {
     Console.ForegroundColor = ConsoleColor.Red;
     Console.WriteLine(e.Message);
     Console.ForegroundColor = ConsoleColor.Gray;
     LogWrite(String.Format("IRC Protocol Error: {0}", e.Message));
 }
예제 #7
0
파일: Command.cs 프로젝트: charla-n/BIRC
 private void Client_ProtocolError(object sender, IrcProtocolErrorEventArgs e)
 {
     connection.AddHistory(HtmlWriter.WriteError(e.Message));
 }