Inheritance: CtcpEventArgs
Beispiel #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 ) );
 }
Beispiel #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);
        }
Beispiel #3
0
 void mClient_OnChannelAction(object sender, ActionEventArgs e)
 {
     AddText(string.Format("* {0} {1}", e.Data.Nick, e.ActionMessage));
 }
Beispiel #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);
 }
Beispiel #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);
        }
Beispiel #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();
        }
Beispiel #8
0
 void IRC_OnQueryAction(object sender, ActionEventArgs e)
 {
     DelegateIncomingQueryMessage(e.Data.Nick, e);
 }
Beispiel #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();
        }
 void onIRCAction(object sender, ActionEventArgs e)
 {
     messageToVP(false, "", "{0} {1}", e.Data.Nick, e.ActionMessage);
 }
Beispiel #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();
        }
Beispiel #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, "");
         }
     }
 }
Beispiel #13
0
 private void MeebyIrc_OnChannelAction(object sender, Meebey.SmartIrc4net.ActionEventArgs e)
 {
     parent.ThreadSafeAddPreviewText("OnChannelAction Event: " + e.Data, LineType.IrcCommand);
 }
Beispiel #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);
        }
Beispiel #15
0
 void OnAction(object sender, ActionEventArgs e)
 {
     //Player.GlobalMessageDevsStaff("To Devs/Staff: *" + Server.GlobalChatColour + e.Data.Nick + " " + Server.DefaultColor + e.ActionMessage);
 }
Beispiel #16
0
 void OnAction(object sender, ActionEventArgs e)
 {
     Player.GlobalMessage(Server.IRCColour + "*" + e.Data.Nick + " " + e.ActionMessage);
 }
Beispiel #17
0
 private void OnChannelAction(object sender, ActionEventArgs eventArgs)
 {
     foreach (BotPlugin plugin in PluginManager.Plugins)
     {
         plugin.OnChannelAction(eventArgs);
     }
 }
Beispiel #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); }
 }
Beispiel #19
0
 public void OnQueryAction(object sender, ActionEventArgs e)
 {
     OnMessage( ChatMessageType.Action, e.Data.Nick, e.Data.Message );
 }
Beispiel #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);
     }
 }
Beispiel #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);
        }