Inheritance: IrcEventArgs
		void ClientOnPart(object sender, PartEventArgs e)
		{
			_events.Enqueue(new IrcEvent { Type = IrcEvent.EventType.Part, Event = e });
			_waitHandle.Set();
		}
Exemple #2
0
        void OnPart(object sender, PartEventArgs e)
        {
            if (channel == null || e.Data.Channel != channel.Name)
                return;

            AddNotification("{0} left the chat.".F(e.Who));
            Game.RunAfterTick(() => Users.Remove(e.Who));
        }
Exemple #3
0
 private static void MeebyIrc_OnPart(object sender, PartEventArgs e)
 {
     Console.WriteLine("! PART: " + e.Data.Nick);
 }
Exemple #4
0
 // When someone leaves the IRC
 void OnPart(object sender, PartEventArgs e)
 {
     Server.s.Log(Server.IRCColour + e.Data.Nick + "&g has left the " + (e.Data.Channel.ToLower() == opchannel.ToLower() ? "operator " : "") + "channel" + (!String.IsNullOrEmpty(e.PartMessage) ? " (" + e.PartMessage + ")" : ""));
     Player.GlobalChat(null, Server.IRCColour + e.Data.Nick + "&g has left the " + (e.Data.Channel.ToLower() == opchannel.ToLower() ? "operator " : "") + "channel" + (!String.IsNullOrEmpty(e.PartMessage) ? " (" + e.PartMessage + ")" : ""), false);
     irc.RfcNames(channel);
     irc.RfcNames(opchannel);
 }
Exemple #5
0
 void OnPart(object sender, PartEventArgs e)
 {
     if(Client.IsMe(e.Who)) {
         return;
     }
     this.UserLeft(this.GetChannel(e.Channel), this.GetUser(e.Who));
 }
Exemple #6
0
 // When someone leaves the IRC
 void OnPart(object sender, PartEventArgs e)
 {
     Server.s.Log(e.Data.Nick + " has left channel " + e.Data.Channel);
     if (e.Data.Channel == opchannel)
     {
         Player.GlobalChat(null, Server.IRCColour + e.Data.Nick + Server.DefaultColor + " has left the operator channel", false);
     }
     else
     {
         Player.GlobalChat(null, Server.IRCColour + e.Data.Nick + Server.DefaultColor + " has left the channel", false);
     }
     irc.RfcNames(channel);
     irc.RfcNames(opchannel);
 }
Exemple #7
0
 static void irc_OnPart(object sender, PartEventArgs e)
 {
     logger.Trace("Part: " + e.Channel);
 }
Exemple #8
0
 // When someone leaves the IRC
 void OnPart(object sender, PartEventArgs e)
 {
     Logger.Log(e.Data.Nick + " has left the IRC channel", LogType.IRCChat);
     Player.GlobalMessage(e.Data.Nick + " has left the IRC channel");
     irc.RfcNames(channel);
 }
Exemple #9
0
 public void OnPart(object sender, PartEventArgs e)
 {
     if (!logs.ContainsKey (e.Data.Channel))
         EnableChannel (e.Data.Channel);
     logs [e.Data.Channel].AddLine (e.Who + " has left " + e.Channel + ": " + e.PartMessage);
 }
Exemple #10
0
 private void OnPart(object sender, PartEventArgs e)
 {
     // Same as with quit
     if (OpList == null) OpList = new HashSet<string>();
     if (OpList.Contains(e.Who))
     {
         //Remove him if he's there.
         OpList.Remove(e.Who);
     }
 }
Exemple #11
0
 /// <summary>
 /// Updates the UI status strip when we leave a channel
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void irc_OnPart(object sender, PartEventArgs e)
 {
 }
Exemple #12
0
        private void _OnPart(object sender, PartEventArgs e)
        {
            #if LOG4NET
            _Logger.Debug("_OnPart() e.Channel: "+e.Channel+" e.Who: "+e.Who);
            #endif
            GroupChatModel groupChat = (GroupChatModel) GetChat(e.Channel, ChatType.Group);
            // only remove the chat if it was enabled, that way we can retain
            // the message buffer
            if (e.Data.Irc.IsMe(e.Who)) {
                if (groupChat.IsEnabled) {
                    Session.RemoveChat(groupChat);
                }
                // nothing else we can do
                return;
            }

            PersonModel person = groupChat.GetPerson(e.Who);
            Session.RemovePersonFromGroupChat(groupChat, person);

            MessageModel msg = new MessageModel();
            msg.MessageType = MessageType.Event;
            TextMessagePartModel textMsgPart;

            textMsgPart = new TextMessagePartModel();
            textMsgPart.Text = "-!- ";
            msg.MessageParts.Add(textMsgPart);

            textMsgPart = new TextMessagePartModel();
            textMsgPart.ForegroundColor = GetNickColor(e.Data.Nick);
            textMsgPart.Text = e.Who;
            msg.MessageParts.Add(textMsgPart);

            textMsgPart = new TextMessagePartModel();
            textMsgPart.Text = String.Format(
                                    _("{0} [{1}] has left {2} [{3}]"),
                                    String.Empty,
                                    e.Data.Ident + "@" + e.Data.Host,
                                    e.Channel,
                                    e.PartMessage);
            msg.MessageParts.Add(textMsgPart);

            Session.AddMessageToChat(groupChat, msg);
        }
		void ClientPart(PartEventArgs e)
		{
			var channel = Server.Channel(e.Data.Channel);
			if (channel != null)
			{
				if (_iam == e.Who)
				{
					channel.Connected = false;
					channel.ErrorCode = 0;
					_log.Info("parted " + channel);
					FireNotificationAdded(Notification.Types.ChannelParted, channel);
				}
				else
				{
					var bot = channel.Bot(e.Who);
					if (bot != null)
					{
						bot.Connected = false;
						bot.LastMessage = "parted channel " + e.Channel;
						UpdateBot(bot);
					}
				}
				UpdateChannel(channel);
			}
		}
Exemple #14
0
 // When someone leaves the IRC
 void OnPart(object sender, PartEventArgs e)
 {
     try
     {
         if (e.Data.Channel == devchannel)
         {
             Player.GlobalMessageDevs("To Devs: " + Server.GlobalChatColour + e.Data.Nick + Server.DefaultColor + " has left the Dev Global Chat Channel");
         }
         else
         {
             Player.GlobalMessageDevs("To Devs: " + Server.GlobalChatColour + e.Data.Nick + Server.DefaultColor + " has left the Global Chat Channel");
         }
         globalchat.RfcNames(channel);
         globalchat.RfcNames(devchannel);
     }
     catch (Exception ex) { Server.ErrorLog(ex); }
 }
Exemple #15
0
        void irc_OnPart(object sender, PartEventArgs e)
        {
            if (e.Channel != Channel) return;

            Output(new ColorTextPair[] { new ColorTextPair(ZChat.Options.TextFore, "!") },
                   new ColorTextPair[] { new ColorTextPair(ZChat.Options.TextFore, e.Who + " left the channel (" + e.PartMessage + ")") });

            UpdateUsers();
            if (ZChat.Options.HighlightTrayIconForJoinsAndQuits)
                ShowActivity();
        }
Exemple #16
0
 void irc_OnPart( object sender, PartEventArgs e )
 {
     CurrentPug.RemovePlayer( e.Who );
 }
 void onIRCPart(object sender, PartEventArgs e)
 {
     messageToVP(true, "", msgPart, e.Who, e.Channel);
 }
Exemple #18
0
        private void _OnPart(object sender, PartEventArgs e)
        {
            #if LOG4NET
            _Logger.Debug("_OnPart() e.Channel: "+e.Channel+" e.Who: "+e.Who);
            #endif
            GroupChatModel groupChat = (GroupChatModel) GetChat(e.Channel, ChatType.Group);
            // only remove the chat if it was enabled, that way we can retain
            // the message buffer
            if (e.Data.Irc.IsMe(e.Who)) {
                if (groupChat.IsEnabled) {
                    Session.RemoveChat(groupChat);
                }
                // nothing else we can do
                return;
            }

            PersonModel person = groupChat.GetPerson(e.Who);
            if (person == null) {
            #if LOG4NET
                // HACK: some buggy networks might send PART messages for users
                // that are not on the channel
                _Logger.Error("_OnPart(): groupChat.GetPerson(" + e.Who + ") returned null!");
            #endif
            } else {
                Session.RemovePersonFromGroupChat(groupChat, person);
            }

            var builder = CreateMessageBuilder();
            builder.MessageType = MessageType.Event;
            builder.AppendEventPrefix();
            builder.AppendIdendityName(GetPerson(groupChat, e.Who));
            // TRANSLATOR: do NOT change the position of {0}!
            builder.AppendText(_("{0} [{1}] has left {2}"),
                               String.Empty,
                               String.Format("{0}@{1}", e.Data.Ident, e.Data.Host),
                               e.Channel);

            if (!String.IsNullOrEmpty(e.PartMessage)) {
                builder.AppendText("[");
                // colors in part messages are annoying
                builder.StripColors = true;
                builder.AppendMessage(e.PartMessage);
                builder.AppendText("]");
            }

            Session.AddMessageToChat(groupChat, builder.ToMessage());
        }
Exemple #19
0
 static void irc_OnPart(object sender, PartEventArgs e)
 {
     Commands.Core.Seen.set.go(e.Data.Nick, e.Data.Channel, String.Format("{0} has parted the channel", e.Data.Nick));
 }
Exemple #20
0
 static void client_OnPart(object sender, PartEventArgs e)
 {
     TouchUser(e.Who, false, true);
 }
Exemple #21
0
 private void _ircClient_OnPart(object sender, PartEventArgs e)
 {
     UserQuit(e.Who);
 }
Exemple #22
0
		void OnPart(object sender, PartEventArgs e)
		{
			if(OpList == null) OpList = new Dictionary<string, string>();
			if(OpList.ContainsKey( e.Who))
			{
				OpList.Remove(e.Who);
			}
		}
 // When someone leaves the IRC
 void OnPart(object sender, PartEventArgs e)
 {
     //Player.GlobalMessageDevs("To Devs: " + Server.GlobalChatColour + e.Data.Nick + Server.DefaultColor + " has left the Global Chat Channel");
     globalchat.RfcNames(channel);
 }
 // When someone leaves the IRC
 void OnPart(object sender, PartEventArgs e)
 {
     try
     {
         Player.GlobalMessageDevs("To Devs: " + Server.GlobalChatColour + e.Data.Nick + "&g has left the " + (e.Data.Channel == devchannel ? "Dev " : "") + "Global Chat Channel" + (!String.IsNullOrEmpty(e.PartMessage) ? " (" + e.PartMessage + ")" : ""));
         globalchat.RfcNames(channel);
         globalchat.RfcNames(devchannel);
     }
     catch (Exception ex) { Server.ErrorLog(ex); }
 }
Exemple #25
0
 void mClient_OnPart(object sender, PartEventArgs e)
 {
     UpdateNames();
 }
 private static void OnPart(object sender, PartEventArgs e)
 {
     if (irc.IsMe(e.Who)) Console.WriteLine("We left!");
     else
     {
         Log(e.Who + " parted.");
         /*if (Users.RemoveAll(x => x.Name.Equals(e.Who)) > 0)
         {
             Console.WriteLine(e.Who + " has left!");
             //VoteDuration = Users.All.Count;
             //_logform.SetUserCount(Users.All.Count);
         }
         else Console.WriteLine(e.Who + " has left, but we were unable to remove them.");*/
     }
     Users.TotalUsers--;
 }
Exemple #27
0
 private void OnPart(object sender, PartEventArgs e)
 {
     if (e.Data.Irc.ActiveChannelSyncing)
     {
         IrcUser user = e.Data.Irc.GetIrcUser(e.Who);
         if (user != null)
         {
             userService.DeauthenticateUser(user.Host);
         }
     }
     else
     {
         e.Data.Irc.RfcNames(e.Data.Channel);
     }
 }