Exemplo n.º 1
0
 private void Client_UserKicked(object sender, KickEventArgs e)
 {
     if (e.Kicked == client.User)
     {
         client.JoinChannel(e.Channel.Name);
     }
 }
Exemplo n.º 2
0
 internal void HandleOnKick(object sender, KickEventArgs e)
 {
     if (OnKick != null)
     {
         OnKick(this, e);
     }
 }
Exemplo n.º 3
0
        void ClientKick(KickEventArgs e)
        {
            var channel = Server.Channel(e.Data.Channel);

            if (channel != null)
            {
                if (_iam == e.Whom)
                {
                    channel.Connected = false;
                    _log.Warn("kicked from " + channel.Name + " (" + e.KickReason + ")");
                    FireNotificationAdded(Notification.Types.ChannelKicked, channel);
                }
                else
                {
                    var bot = channel.Bot(e.Whom);
                    if (bot != null)
                    {
                        bot.Connected   = false;
                        bot.LastMessage = "kicked from " + e.Channel;
                        UpdateBot(bot);
                    }
                }
                UpdateChannel(channel);
            }
        }
Exemplo n.º 4
0
 private void IrcKickReceived(object sender, KickEventArgs e)
 {
     if (e.Channel == this.targetChannel)
     {
         this.RemoveTracking(e.KickedUser);
     }
 }
Exemplo n.º 5
0
 void ClientOnKick(object sender, KickEventArgs e)
 {
     _events.Enqueue(new IrcEvent {
         Type = IrcEvent.EventType.Kick, Event = e
     });
     _waitHandle.Set();
 }
Exemplo n.º 6
0
 private static void IrcClient_OnKick(object sender, KickEventArgs e)
 {
     world.Penalize(new Penalty()
     {
         PenaltyType = PenaltyType.Kick, Nick = e.Whom
     });
 }
Exemplo n.º 7
0
 void OnKick(object sender, KickEventArgs e)
 {
     Player.GlobalMessage(Server.IRCColour + e.Data.Nick + " was kicked from the " + (e.Data.Channel.ToLower() == opchannel.ToLower() ? "operator " : "") + "channel (" + e.KickReason + ")");
     Server.s.Log(Server.IRCColour + e.Data.Nick + " was kicked from the " + (e.Data.Channel.ToLower() == opchannel.ToLower() ? "operator " : "") + "channel (" + e.KickReason + ")");
     irc.RfcNames(channel);
     irc.RfcNames(opchannel);
 }
Exemplo n.º 8
0
 void Kick(object sender, KickEventArgs e)
 {
     if (irc.IsMe(e.Whom))
     {
         log.Message("Kicked from {0} by {1}", e.Channel, e.Who);
         currentChannels.Remove(e.Channel);
     }
 }
Exemplo n.º 9
0
 void ircClient_OnKick(object sender, KickEventArgs e)
 {
     if (e.Data.Nick != m_Nick)
     {
         m_IRCClient.RfcNames(e.Data.Channel);
         System.Console.WriteLine(e.Data.Nick + " went Offline");
     }
 }
Exemplo n.º 10
0
 void OnKick(object sender, KickEventArgs kickEventArgs)
 {
     if (kickEventArgs.Whom.Equals(_ircInterface.Nick))
     {
         _ircInterface.DebugLog("Kicked from channel " + kickEventArgs.Channel + ", attempting to rejoin");
         _ircInterface.Client.RfcJoin(kickEventArgs.Channel);
     }
 }
Exemplo n.º 11
0
        void onIRCKick(object sender, KickEventArgs e)
        {
            messageToVP(true, "", msgKicked, e.Who, e.Whom, e.Channel, e.KickReason);

            if (e.Whom == config.NickName)
            {
                irc.Disconnect();
            }
        }
Exemplo n.º 12
0
        void Kick(object s, KickEventArgs e)
        {
            writer.Log(e.Channel,
                       "<-- {0} was kicked by {1} [{2}]", e.Whom, e.Who, e.KickReason);

            if (irc.IsMe(e.Whom))
            {
                writer.CloseLog(e.Channel);
            }
        }
Exemplo n.º 13
0
        /// <summary>
        /// Verarbeitet einen Kick
        /// </summary>
        /// <seealso cref="OnKick"/>
        private void _connection_OnKick(object sender, KickEventArgs e)
        {
            Log.Information("{Nickname} wurde von {Operator} aus dem Raum {Channel} geworfen", e.Who, e.Whom, e.Channel);
            MaintainUser(e.Who);

            ThreadPool.QueueUserWorkItem(x =>
            {
                OnKick?.Invoke(this, e);
            });
        }
Exemplo n.º 14
0
        private void IrcKickReceived(object sender, KickEventArgs e)
        {
            if (e.Channel != this.TargetChannel)
            {
                // not for us
                return;
            }

            this.logger.DebugFormat("Seen kick for {0}", e.KickedUser);
            this.LostUser((IrcUser)e.KickedUser);
        }
Exemplo n.º 15
0
 /// <summary>
 /// Handles the IRC OnKick event.
 /// </summary>
 /// <param name="sender">Sender.</param>
 /// <param name="e">EventArgs.</param>
 void OnKick(object sender, KickEventArgs e)
 {
     if (OpList == null)
     {
         OpList = new Dictionary <string, string>();
     }
     if (OpList.ContainsKey(e.Whom))
     {
         OpList.Remove(e.Whom);
     }
 }
Exemplo n.º 16
0
        //Kick: "Name<uid><wonid><>" was kicked by "Console" (message "") [52b]
        /// <summary>
        /// Raises the <see cref="PlayerKicked"/> event.
        /// </summary>
        /// <param name="timestamp">Time at which <see cref="PlayerKicked"/> event was fired.</param>
        /// <param name="info">Information about <see cref="PlayerKicked"/> event.</param>
        protected virtual void OnKick(DateTime timestamp, string[] info)
        {
            KickEventArgs eventArgs = new KickEventArgs()
            {
                Timestamp = timestamp,
                Player    = GetPlayerInfo(info[1]),
                Kicker    = info[3],
                Message   = info.Length == 7 ? info[5] : string.Empty
            };

            PlayerKicked.Fire(ServerEndPoint, eventArgs);
        }
Exemplo n.º 17
0
 private void KickHandler(object sender, KickEventArgs e)
 {
     lock (seenData)
     {
         var result = seenData.SeenEntries.Where(s => s.Nick == e.Who).FirstOrDefault();
         if (result != null)
         {
             result.LastSeenTime = DateTime.Now;
             result.LastAction   = "(KICK) " + e.KickReason + " (by " + e.Whom + ")";
             result.OnStatus     = false;
         }
         SaveDb();
     }
 }
 void BotOnKick(object sender, KickEventArgs e)
 {
     if (e.Whom == Bot.Nickname)
     {
         lock (NickCache)
         {
             NickCache.Clear();
         }
     }
     else
     {
         RemoveNick(e.Whom);
     }
 }
Exemplo n.º 19
0
 void OnKick(object sender, KickEventArgs e)
 {
     if (e.Whom == client.Nickname)
     {
         Disconnect();
         connectionStatus = ChatConnectionStatus.Error;
         AddNotification("You were kicked from the chat by {0}. ({1})".F(e.Who, e.KickReason));
     }
     else
     {
         Users.Remove(e.Whom);
         AddNotification("{0} was kicked from the chat by {1}. ({2})".F(e.Whom, e.Who, e.KickReason));
     }
 }
Exemplo n.º 20
0
        /// <summary>
        /// Called when a user is kicked off the channel
        /// </summary>
        /// <param name="kick">KickEventArgs</param>
        public void CheckKick(KickEventArgs kick)
        {
            IrcClient irc = kick.Data.Irc;

            if (kick.Who != irc.Nickname)
            {
                /* Check prot */
                IrcUser usr = irc.GetIrcUser(kick.Whom);
                if (usr != null)
                {
                    if (ops.GetProtLevel(usr.Ident + "@" + usr.Host) >= 200)
                    {
                        irc.RfcKick(kick.Channel, kick.Who, kick.Whom + " is kick protected d00d!!");
                    }
                }
            }
        }
Exemplo n.º 21
0
        private static void OnKick(object sender, KickEventArgs e)
        {
            string victim = e.Whom;

            if (victim == CRCOptions.Name)
            {
                Users.Clear();
                string message = CRCStrings.Localize("client_got_kicked") + e.KickReason;
                CRCDisplay.AddError(message);
                CRCGame.AddError(message);
                CRCDisplay.OnGotKicked();
            }
            else
            {
                crcNicks.Remove(e.Who);
                Users.Remove(victim);
                Users.Sort();
                string message = victim + CRCStrings.Localize("client_kicked") + e.KickReason;
                CRCDisplay.AddInformation(message);
                CRCGame.AddInformation(message);
            }
            CRCDisplay.UpdateUsers();
            CRCGame.UpdateUsers();
        }
Exemplo n.º 22
0
 private void OnKickEvent(object sender, KickEventArgs e)
 {
     this.RemoveExemption(e.Channel, e.User);
 }
Exemplo n.º 23
0
 void OnKick(object sender, KickEventArgs e)
 {
     Disconnect();
     connectionStatus = ChatConnectionStatus.Error;
     AddNotification("Error: You were kicked from the chat by {0}".F(e.Who));
 }
Exemplo n.º 24
0
 void irc_OnKick(object sender, KickEventArgs e)
 {
     pub.CheckKick(e);
 }
Exemplo n.º 25
0
 private static void OnKick(object sender, KickEventArgs kickEventArgs)
 {
     var information = MethodBase.GetCurrentMethod().Name;
     try
     {
         var serverUser = GetServerUser(sender);
         Trace.WriteLine(information, serverUser.ToString());
     }
     catch (Exception ex)
     {
         Console.WriteLine("{0} exception {1}", information, ex.Message);
     }
 }
Exemplo n.º 26
0
 static void i_OnKick(object sender, KickEventArgs e)
 {
     // SmartIrc4net documentation is NOT clear on the Who/Whom mixup
     InvokePluginWithChannelUserChange(e.Channel, e.Whom, e.Who, e.KickReason, ChannelUserChange.Kick);
 }
Exemplo n.º 27
0
 private void ParentServer_OnKick(object sender, KickEventArgs e)
 {
     AddLine(ChannelStrings.Kick.With(e.Kickee + ":" + e.Channel, e.User.Nick, e.Reason));
 }
Exemplo n.º 28
0
 private void _ircClient_GotUserKicked(object sender, KickEventArgs e)
 {
 }
Exemplo n.º 29
0
 private void OnUserKicked(object sender, KickEventArgs e)
 {
     GetChannel(e.Channel).RemoveUser(e.Recipient);
 }
Exemplo n.º 30
0
 protected void RaiseGotUserKicked(KickEventArgs e)
 {
     Dispatch(GotUserKicked, e);
 }
Exemplo n.º 31
0
 void mClient_OnKick(object sender, KickEventArgs e)
 {
     AddText(string.Format("*** {0} has kicked {1}", e.Who, e.Whom));
     UpdateNames();
 }
 public void PluginsOnKick(object sender, KickEventArgs e)
 {
     OnKick(this, e);
 }