Exemplo n.º 1
0
 protected internal virtual void OnUserKicked(KickEventArgs e)
 {
     if (UserKicked != null)
     {
         UserKicked(this, e);
     }
 }
Exemplo n.º 2
0
 protected internal virtual void OnUserKicked(KickEventArgs e)
 {
     try
     {
         UserKicked(this, e);
     }
     catch (Exception err)
     {
         UnhandledException(this, new UnhandledExceptionEventArgs(err, false));
     }
 }
Exemplo n.º 3
0
 internal void OnUserKicked(KickEventArgs e)
 {
     if (UserKicked != null) UserKicked(this, e);
 }
Exemplo n.º 4
0
        /*
        // Track all nick changes
        private void Client_NickChanged(object sender, NickChangedEventArgs e)
        {
            // Log
            BaseUtils.Log(e.OldNick + " - " + e.NewNick);

            // Loop through everything and check if it's there
            bool found = false;
            foreach (KeyValuePair<string, List<string>> kvP in alias.alias)
            {
                // If the key is the old nick
                if (kvP.Key == e.OldNick)
                {
                    if (!kvP.Value.Contains(e.NewNick)) alias.alias[e.OldNick].Add(e.NewNick);
                    found = true;
                    break;
                }

                // If the key is the new nick
                if (kvP.Key == e.NewNick)
                {
                    if (!kvP.Value.Contains(e.OldNick)) alias.alias[e.NewNick].Add(e.OldNick);
                    found = true;
                    break;
                }

                // If the value contains the old nick
                if (kvP.Value.Contains(e.OldNick) && kvP.Key != e.NewNick && !kvP.Value.Contains(e.NewNick))
                {
                    alias.alias[kvP.Key].Add(e.NewNick);
                    found = true;
                    break;
                }

                // If the value contains the new nick
                if (kvP.Value.Contains(e.NewNick) && kvP.Key != e.OldNick && !kvP.Value.Contains(e.OldNick))
                {
                    alias.alias[kvP.Key].Add(e.OldNick);
                    found = true;
                    break;
                }

                // Else
                if (kvP.Value.Contains(e.NewNick) && kvP.Value.Contains(e.OldNick))
                {
                    found = true;
                }
            }

            // If there was nothing, create a new entry
            if (!found) alias.alias.Add(e.OldNick, new List<string>() { e.NewNick });

            // Save
            Utils.Save(alias);
        }
        */
        private void Client_UserKicked(object sender, KickEventArgs e)
        {
            if (e.Kicked.Nick != settings.name)
                return;

            BaseUtils.LogSpecial(e.Kicker.Nick + " kicked me from " + e.Channel.Name + "! Reason: " + e.Reason);
            client.PartChannel(e.Channel.Name);
            settings.channels.Remove(e.Channel.Name);
            Utils.Save(settings);
        }