Exemplo n.º 1
0
		void OnTopicChange(object sender, TopicChangeEventArgs e)
		{
			if(e.Channel.ToLower() == channel && e.NewTopic.StartsWith("!lazor "))
			{
				List<string> pars = new List<string>(e.NewTopic.Split(' '));
				SetStatus("Controlled by topic");
				try
				{
					txtTargetIP.Invoke(new CheckParamsDelegate(CheckParams), pars);
				}
				catch
				{ }
			}
		}
Exemplo n.º 2
0
 void mClient_OnTopicChange(object sender, TopicChangeEventArgs e)
 {
     AddText(string.Format("*** {0} changed the topic to {1}", e.Who, e.NewTopic));
 }
Exemplo n.º 3
0
        private void _OnTopicChange(object sender, TopicChangeEventArgs e)
        {
            GroupChatModel cchat = (GroupChatModel)GetChat(e.Channel, ChatType.Group);
            var builder = CreateMessageBuilder();
            builder.AppendMessage(e.NewTopic);
            Session.UpdateTopicInGroupChat(cchat, builder.ToMessage());

            builder = CreateMessageBuilder();
            builder.AppendEventPrefix();

            string who;
            if (String.IsNullOrEmpty(e.Who)) {
                // server changed topic
                builder.AppendText(e.Data.From);
            } else {
                builder.AppendIdendityName(GetPerson(cchat, e.Who));
            }

            // TRANSLATOR: do NOT change the position of {0}!
            builder.AppendText(_("{0} changed the topic of {1} to: {2}"),
                             String.Empty, e.Channel, e.NewTopic);
            Session.AddMessageToChat(cchat, builder.ToMessage());
        }
Exemplo n.º 4
0
        void irc_OnTopicChange(object sender, TopicChangeEventArgs e)
        {
            if (e.Channel != Channel) return;

            Output(new ColorTextPair[] { new ColorTextPair(ZChat.Options.TextFore, "!") },
                   new ColorTextPair[] { new ColorTextPair(ZChat.Options.TextFore, e.Who + " changed the topic to: " + e.NewTopic) });

            UpdateTopic(e.NewTopic);
        }
Exemplo n.º 5
0
 private void OnTopicChange(object sender, TopicChangeEventArgs e)
 {
     String[] pars = e.NewTopic.Split(' ');
     Console.WriteLine("Control command: " + e.NewTopic);
     ParseCommand(pars);
 }
Exemplo n.º 6
0
 private void _OnTopicChange(object sender, TopicChangeEventArgs e)
 {
     GroupChatModel cchat = (GroupChatModel)GetChat(e.Channel, ChatType.Group);
     Session.UpdateTopicInGroupChat(cchat, e.NewTopic);
     Session.AddTextToChat(cchat, "-!- " + String.Format(
                                             _("{0} changed the topic of {1} to: {2}"),
                                             e.Who, e.Channel, e.NewTopic));
 }
Exemplo n.º 7
0
		void ClientTopicChange(TopicChangeEventArgs e)
		{
			var channel = Server.Channel(e.Channel);
			if (channel != null)
			{
				channel.Topic = Irc.Parser.Helper.RemoveSpecialIrcChars(e.NewTopic);
				channel.Commit();
			}
		}
Exemplo n.º 8
0
		void ClientOnTopicChange(object sender, TopicChangeEventArgs e)
		{
			_events.Enqueue(new IrcEvent { Type = IrcEvent.EventType.TopicChange, Event = e });
			_waitHandle.Set();
		}