Inheritance: CtcpEventArgs
Ejemplo n.º 1
0
 void irc_OnChannelAction( object sender, ActionEventArgs e )
 {
     Console.WriteLine( String.Format( "Channel Action: {0} <{1}> {2}", e.Data.Channel, e.Data.Nick, e.ActionMessage ) );
 }
Ejemplo n.º 2
0
        private void _OnChannelAction(object sender, ActionEventArgs e)
        {
            ChatModel chat = GetChat(e.Data.Channel, ChatType.Group);

            var builder = CreateMessageBuilder();
            builder.AppendAction();
            builder.AppendIdendityName(GetPerson(chat, e.Data.Nick));
            builder.AppendText(" ");
            builder.AppendMessage(e.ActionMessage);

            var msg = builder.ToMessage();
            MarkHighlights(msg);
            Session.AddMessageToChat(chat, msg);
        }
Ejemplo n.º 3
0
 void mClient_OnChannelAction(object sender, ActionEventArgs e)
 {
     AddText(string.Format("* {0} {1}", e.Data.Nick, e.ActionMessage));
 }
Ejemplo n.º 4
0
 void mClient_OnQueryAction(object sender, ActionEventArgs e)
 {
     AddText(string.Format("* {0}", e.ActionMessage));
 }
 void client_OnChannelAction(object sender, ActionEventArgs e)
 {
     _window.AddItem("OnChannelAction-> " + e.ActionMessage, e.Data.Nick, e.Data.Channel);
 }
Ejemplo n.º 6
0
        private void _OnQueryAction(object sender, ActionEventArgs e)
        {
            ChatModel chat = GetChat(e.Data.Nick, ChatType.Person);
            if (chat == null) {
                IrcPersonModel person = new IrcPersonModel(e.Data.Nick,
                                                           null,
                                                           e.Data.Ident,
                                                           e.Data.Host,
                                                           NetworkID,
                                                           this);
                chat = new PersonChatModel(person, e.Data.Nick, e.Data.Nick, this);
                Session.AddChat(chat);
                Session.SyncChat(chat);
            }

            MessageModel fmsg = new MessageModel();
            TextMessagePartModel fmsgti;

            fmsgti = new TextMessagePartModel();
            fmsgti.Text = String.Format(" * {0} ", e.Data.Nick);
            fmsgti.IsHighlight = true;
            fmsg.MessageParts.Add(fmsgti);

            _IrcMessageToMessageModel(ref fmsg, e.ActionMessage);

            Session.AddMessageToChat(chat, fmsg);
        }
Ejemplo n.º 7
0
        void IRC_OnQueryAction(object sender, ActionEventArgs e)
        {
            if (e.Data.Nick != QueriedUser) return;

            Output(new ColorTextPair[] { new ColorTextPair(ZChat.Options.BracketFore, "* "),
                                                         new ColorTextPair(ZChat.Options.TextFore, e.Data.Nick) },
                                   new ColorTextPair[] { new ColorTextPair(ZChat.Options.TextFore, e.ActionMessage.Substring(1)) });
            ShowActivity();
        }
Ejemplo n.º 8
0
 void IRC_OnQueryAction(object sender, ActionEventArgs e)
 {
     DelegateIncomingQueryMessage(e.Data.Nick, e);
 }
Ejemplo n.º 9
0
        void irc_OnQueryAction(object sender, ActionEventArgs e)
        {
            Output(new ColorTextPair[] { new ColorTextPair(ZChat.Options.QueryTextFore, "* "),
                                         new ColorTextPair(ZChat.Options.QueryTextFore, e.Data.Nick) },
                   new ColorTextPair[] { new ColorTextPair(ZChat.Options.QueryTextFore, e.ActionMessage.Substring(1)) });

            lastQuerySender = e.Data.Nick;
            ShowActivity();
        }
Ejemplo n.º 10
0
 void onIRCAction(object sender, ActionEventArgs e)
 {
     messageToVP(false, "", "{0} {1}", e.Data.Nick, e.ActionMessage);
 }
Ejemplo n.º 11
0
        void irc_OnChannelAction(object sender, ActionEventArgs e)
        {
            if (e.Data.Channel != Channel) return;

            Output(new ColorTextPair[] { new ColorTextPair(ZChat.Options.BracketFore, "* "),
                                         new ColorTextPair(ZChat.Options.TextFore, e.Data.Nick) },
                   new ColorTextPair[] { new ColorTextPair(ZChat.Options.TextFore, e.ActionMessage.Substring(1)) });

            ShowActivity();
        }
Ejemplo n.º 12
0
 static void irc_OnChannelAction(object sender, ActionEventArgs e)
 {
     if (e.ActionMessage == "joined")
     {
         Channel c = irc.GetChannel("");
         Hashtable users = c.Users;
         Random n = new Random();
         List<string> l = new List<string>();
         foreach(KeyValuePair<string, string> p in users)
         {
             l.Add(p.Key);
         }
         string user = l[n.Next(l.Count)];
         if(!sl.ContainsKey(user))
         {
             irc.RfcPrivmsg(TargetUser, "hi there!");
             allowPrivateMessages = true;
             sl.Add(user, "");
         }
     }
 }
Ejemplo n.º 13
0
 private void MeebyIrc_OnChannelAction(object sender, Meebey.SmartIrc4net.ActionEventArgs e)
 {
     parent.ThreadSafeAddPreviewText("OnChannelAction Event: " + e.Data, LineType.IrcCommand);
 }
Ejemplo n.º 14
0
        private void _OnQueryAction(object sender, ActionEventArgs e)
        {
            var chat = (PersonChatModel) GetChat(e.Data.Nick, ChatType.Person);
            bool newChat = false;
            if (chat == null) {
                var person = CreatePerson(e.Data.Nick);
                person.Ident = e.Data.Ident;
                person.Host = e.Data.Host;
                chat = new PersonChatModel(person, e.Data.Nick, e.Data.Nick, this);
                newChat = true;
            }

            var builder = CreateMessageBuilder();
            builder.AppendAction();
            builder.AppendIdendityName(chat.Person, true);
            builder.AppendSpace();
            builder.AppendMessage(e.ActionMessage);
            var msg = builder.ToMessage();
            MarkHighlights(msg);

            if (newChat) {
                // don't create chats for filtered messages
                if (Session.IsFilteredMessage(chat, msg)) {
                    Session.LogMessage(chat, msg, true);
                    return;
                }
                Session.AddChat(chat);
                Session.SyncChat(chat);
            }

            Session.AddMessageToChat(chat, msg);
        }
Ejemplo n.º 15
0
 void OnAction(object sender, ActionEventArgs e)
 {
     //Player.GlobalMessageDevsStaff("To Devs/Staff: *" + Server.GlobalChatColour + e.Data.Nick + " " + Server.DefaultColor + e.ActionMessage);
 }
Ejemplo n.º 16
0
 void OnAction(object sender, ActionEventArgs e)
 {
     Player.GlobalMessage(Server.IRCColour + "*" + e.Data.Nick + " " + e.ActionMessage);
 }
Ejemplo n.º 17
0
 private void OnChannelAction(object sender, ActionEventArgs eventArgs)
 {
     foreach (BotPlugin plugin in PluginManager.Plugins)
     {
         plugin.OnChannelAction(eventArgs);
     }
 }
Ejemplo n.º 18
0
 void OnAction(object sender, ActionEventArgs e)
 {
     try
     {
         if (e.Data.Channel == devchannel) Player.GlobalMessageDevsStaff("<[DevGlobal] *" + Server.GlobalChatColour + e.Data.Nick + " &g" + e.ActionMessage);
         else DisplayAction(e.ActionMessage, e);
     }
     catch (Exception ex) { Server.ErrorLog(ex); }
 }
Ejemplo n.º 19
0
 public void OnQueryAction(object sender, ActionEventArgs e)
 {
     OnMessage( ChatMessageType.Action, e.Data.Nick, e.Data.Message );
 }
Ejemplo n.º 20
0
 void OnAction(object sender, ActionEventArgs e)
 {
     string temp = IRCColor.IRCToMinecraftColor(e.ActionMessage); string storedNick = e.Data.Nick;
     if (e.Data.Channel.ToLower() == opchannel.ToLower())
     {
         Server.s.Log(Server.IRCColour + "[(Op) IRC] *" + e.Data.Nick + " " + temp);
         Player.GlobalMessageOps(Server.IRCColour + "[(Op) IRC] *" + storedNick + " " + temp);
     }
     else
     {
         Server.s.Log(Server.IRCColour + "[IRC] *" + e.Data.Nick + " " + temp);
         Player.GlobalChat(null, Server.IRCColour + "[IRC] *" + storedNick + " " + temp, false);
     }
 }
Ejemplo n.º 21
0
        private void _OnChannelAction(object sender, ActionEventArgs e)
        {
            ChatModel chat = GetChat(e.Data.Channel, ChatType.Group);

            MessageModel fmsg = new MessageModel();
            TextMessagePartModel fmsgti;

            fmsgti = new TextMessagePartModel();
            fmsgti.Text = " * ";
            fmsg.MessageParts.Add(fmsgti);

            fmsgti = new TextMessagePartModel();
            fmsgti.ForegroundColor = GetNickColor(e.Data.Nick);
            fmsgti.Text = e.Data.Nick + " ";
            fmsg.MessageParts.Add(fmsgti);

            _IrcMessageToMessageModel(ref fmsg, e.ActionMessage);

            Session.AddMessageToChat(chat, fmsg);
        }