Наследование: IrcEventArgs
Пример #1
0
 public bool Handle(JoinEventArgs args)
 {
     Invoke(Method, GetValues(Method.GetParameters(), (info) => {
     return Process(info, args);
       }));
       return true;
 }
Пример #2
0
 private static void OnJoin(object sender, JoinEventArgs e)
 {
     if (!irc.IsMe(e.Who))
     {
         //CreateUser(e.Who, false);
         Log(e.Who + " joined.");
         Console.WriteLine(e.Who + " has joined!");
     }
     else
     {
         CreateUser(e.Who, true); // TwitchTV will never recognize the streamer as an admin if this isn't here.
     }
     Users.TotalUsers++;
     /*_playercount++;
     VoteDuration = _playercount;
     _logform.SetUserCount((int)_playercount);*/
     //VoteDuration = Users.All.Count;
     //_logform.SetUserCount(Users.All.Count);
 }
Пример #3
0
 // When someone joins the IRC
 void OnJoin(object sender, JoinEventArgs e)
 {
     try
     {
         Player.GlobalMessageDevs("To Devs: " + Server.GlobalChatColour + e.Data.Nick + "&g has joined the " + (e.Data.Channel == devchannel ? "Dev " : "") + "Global Chat Channel.");
         globalchat.RfcNames(channel);
         globalchat.RfcNames(devchannel);
     }
     catch (Exception ex) { Server.ErrorLog(ex); }
 }
Пример #4
0
 public void Greet(JoinEventArgs args)
 {
     if (args.Who != Bot.Nickname) {
     Bot.SendMessage(SendType.Message, args.Channel, string.Format("Hello {0}", args.Who));
       }
 }
Пример #5
0
 static void client_OnJoin(object sender, JoinEventArgs e)
 {
     TouchUser(e.Who, true, false);
     if (e.Who.ToLower() == Nickname.ToLower())
     {
         client.RfcNames(Channel);
         State = IrcState.Ready;
         //SendRawMessage("JTVCLIENT");
         SendRawMessage("TWITCHCLIENT 3");
         SendRawMessage("CAP REQ :twitch.tv/membership");
         string botname = desBot.State.JtvSettings.Value.Nickname.ToString();
         SendChannelMessage(botname + " is online! (v" + Token.GetCurrentVersion() + "@twitch.tv)" + (Program.IsBuggyTwitch ? "/bt" : ""), false);
     }
 }
Пример #6
0
        private void _OnJoin(object sender, JoinEventArgs e)
        {
            GroupChatModel groupChat = (GroupChatModel) GetChat(e.Channel, ChatType.Group);
            if (e.Data.Irc.IsMe(e.Who)) {
                // tell join handlers, that they need to wait!!
                lock (_ActiveChannelJoinList) {
                    _ActiveChannelJoinList.Add(e.Channel.ToLower());
                }

                if (groupChat == null) {
                    groupChat = new GroupChatModel(e.Channel, e.Channel, this);
                    groupChat.UnsafePersonsComparer = StringComparer.OrdinalIgnoreCase;
                    Session.AddChat(groupChat);
                } else {
                    // chat still exists, so we we only need to enable it
                    // (sync is done in _OnChannelActiveSynced)
                    Session.EnableChat(groupChat);
                }
            } else {
                // someone else joined, let's add him to the channel chat
                // HACK: some buggy networks might send JOIN messages for users
                // that are already on the channel
                if (groupChat.UnsafePersons.ContainsKey(e.Who.ToLower())) {
            #if LOG4NET
                   _Logger.Error("_OnJoin(): groupChat.UnsafePerson contains " +
                                  "already: '" + e.Who + "', ignoring...");
            #endif
                    // ignore
                } else {
                    IrcUser siuser = _IrcClient.GetIrcUser(e.Who);
                    var icuser = CreateGroupPerson(e.Who);
                    icuser.Ident = siuser.Ident;
                    icuser.Host = siuser.Host;
                    groupChat.UnsafePersons.Add(icuser.NickName.ToLower(), icuser);
                    Session.AddPersonToGroupChat(groupChat, icuser);
                }
            }

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

            var msg = builder.ToMessage();
            Session.AddMessageToChat(groupChat, msg);
        }
Пример #7
0
 // When someone joins the IRC
 void OnJoin(object sender, JoinEventArgs e)
 {
     try
     {
         if (e.Data.Channel == devchannel)
         {
             Player.GlobalMessageDevs("To Devs: " + Server.GlobalChatColour + e.Data.Nick + Server.DefaultColor + " has joined the Dev Global Chat Channel.");
         }
         else
         {
             Player.GlobalMessageDevs("To Devs: " + Server.GlobalChatColour + e.Data.Nick + Server.DefaultColor + " has joined the Global Chat Channel.");
         }
         globalchat.RfcNames(channel);
         globalchat.RfcNames(devchannel);
     }
     catch (Exception ex) { Server.ErrorLog(ex); }
 }
Пример #8
0
 internal void HandleOnJoin(object sender, JoinEventArgs args)
 {
     foreach (var join in Joins) {
     join.Handle(args);
       }
 }
Пример #9
0
 public void OnJoin(object sender, JoinEventArgs e)
 {
 }
Пример #10
0
 void irc_OnJoin(object sender, JoinEventArgs e)
 {
     //Debug.WriteLine("Join: " + e.Channel);
 }
Пример #11
0
 void irc_OnJoin(object sender, JoinEventArgs e)
 {
     while (ircMessageQueue.Count > 0) {
         var msg = ircMessageQueue.Dequeue();
         IrcSendMessage(msg);
     }
 }
Пример #12
0
 public void OnJoin(object sender, JoinEventArgs e)
 {
     if (!logs.ContainsKey (e.Data.Channel))
         EnableChannel (e.Data.Channel);
     logs [e.Data.Channel].AddLine (e.Data.Nick + " has joined " + e.Channel);
 }
Пример #13
0
 /// <summary>
 /// Update the UI status strip once we are in the announce channel
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void irc_OnJoin(object sender, JoinEventArgs e)
 {
 }
Пример #14
0
 private void MeebyIrc_OnJoin(object sender, Meebey.SmartIrc4net.JoinEventArgs e)
 {
     parent.ThreadSafeAddPreviewText("! JOINED: " + e.Data.Nick, LineType.IrcCommand);
 }
Пример #15
0
 private void OnJoin(object sender, JoinEventArgs e)
 {
     AddClientLine(e.Who + " has logged on to the network.", Color.DarkBlue);
     AddGameMsg("Information", e.Who + " has logged on to the network.");
 }
Пример #16
0
        void OnJoin(object sender, JoinEventArgs e)
        {
            if (e.Who == client.Nickname || channel == null || e.Channel != channel.Name)
                return;

            AddNotification("{0} joined the chat.".F(e.Who));
            Game.RunAfterTick(() => Users.Add(e.Who, new ChatUser(e.Who, false, false)));
        }
Пример #17
0
 void OnJoin(object sender, JoinEventArgs e)
 {
     if (!irc.IsMe(e.Who)) incrementHiveSize();
 }
Пример #18
0
 void HandleOnJoin(object sender, JoinEventArgs e)
 {
     foreach (var plugin in plugins) {
     plugin.HandleOnJoin(sender, e);
       }
 }
Пример #19
0
        void irc_OnJoin(object sender, JoinEventArgs e)
        {
            if (e.Channel != Channel) return;

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

            UpdateUsers();
            if (ZChat.Options.HighlightTrayIconForJoinsAndQuits)
                ShowActivity();
        }
Пример #20
0
 // When someone joins the IRC
 void OnJoin(object sender, JoinEventArgs e)
 {
     Logger.Log(e.Data.Nick + " has joined the IRC channel", LogType.IRCChat);
     Player.GlobalMessage(e.Data.Nick + " has joined the IRC channel");
     irc.RfcNames(channel);
 }
Пример #21
0
 void onIRCJoin(object sender, JoinEventArgs e)
 {
     messageToVP(true, "", msgEntry, e.Who, e.Channel);
 }
Пример #22
0
 void OnJoin(object sender, JoinEventArgs e)
 {
     if (Client.IsMe(e.Who)) {
         return;
     }
     this.UserJoined(this.GetChannel(e.Channel), this.GetUser(e.Who));
 }
Пример #23
0
 static void irc_OnJoin(object sender, JoinEventArgs e)
 {
     Commands.Core.Seen.set.go(e.Data.Nick, e.Data.Channel, String.Format("{0} has joined the channel", e.Data.Nick));
 }
Пример #24
0
 // When someone joins the IRC
 void OnJoin(object sender, JoinEventArgs e)
 {
     Server.s.Log(e.Data.Nick + " has joined channel " + e.Data.Channel);
     if (e.Data.Channel == opchannel)
     {
         Player.GlobalChat(null, Server.IRCColour + e.Data.Nick + Server.DefaultColor + " has joined the operator channel", false);
     }
     else
     {
         Player.GlobalChat(null, Server.IRCColour + e.Data.Nick + Server.DefaultColor + " has joined the channel", false);
     }
     irc.RfcNames(channel);
     irc.RfcNames(opchannel);
 }
Пример #25
0
 private void _ircClient_OnJoin(object sender, JoinEventArgs e)
 {
     if(e.Who != _botName)
     {
         User existingUser = GetUser(e.Who);
         if (existingUser != null)
             _users.Add(existingUser);
         else
             _users.Add(new User(e.Who, _defaultStartValue));
     }
 }
Пример #26
0
        void IRC_OnJoin(object sender, JoinEventArgs e)
        {
            // this is how we know the server has successfully joined us to a channel
            if (e.Who == IRC.Nickname
                && !channelWindows.Any<ChannelWindow>(delegate(ChannelWindow chan)
                { if (chan.Channel == e.Channel) return true; else return false; }))
            {
                Application.Current.Dispatcher.Invoke(new VoidDelegate(delegate
                {
                    ChannelWindow newWindow = new ChannelWindow(this);
                    newWindow.Channel = e.Channel;
                    newWindow.UserInput += ParseUserInput;

                    newWindow.Closed += channelWindow_Closed;
                    channelWindows.Add(newWindow);
                    newWindow.Show();
                }));
            }
        }
Пример #27
0
 // When someone joins the IRC
 void OnJoin(object sender, JoinEventArgs e)
 {
     //Player.GlobalMessageDevs("To Devs: " + Server.GlobalChatColour + e.Data.Nick + Server.DefaultColor + " has joined the Global Chat Channel.");
     globalchat.RfcNames(channel);
 }
Пример #28
0
 // When someone joins the IRC
 void OnJoin(object sender, JoinEventArgs e)
 {
     Server.s.Log(Server.IRCColour + e.Data.Nick + "&g has joined the " + (e.Data.Channel.ToLower() == opchannel.ToLower() ? "operator " : "") + "channel");
     Player.GlobalChat(null, Server.IRCColour + e.Data.Nick + "&g has joined the " + (e.Data.Channel.ToLower() == opchannel.ToLower() ? "operator " : "") + "channel", false);
     irc.RfcNames(channel);
     irc.RfcNames(opchannel);
 }
Пример #29
0
 void mClient_OnJoin(object sender, JoinEventArgs e)
 {
     UpdateNames();
 }
Пример #30
0
        void OnJoin( object sender, JoinEventArgs e )
        {
            var mainChan = Settings.Current.GetChannelsForTag( "main" )
                .FirstOrDefault();

            if ( mainChan == null )
            {
                Log.WriteWarn( "IRC", "No main channel configured, won't connect to Steam!" );
                return;
            }

            if ( e.Data.Nick == client.Nickname && string.Equals( e.Channel, mainChan.Channel, StringComparison.OrdinalIgnoreCase ) )
            {
                if ( !Steam.Instance.Connected )
                    Steam.Instance.Connect();
            }
        }
Пример #31
0
 protected object Process(ParameterInfo info, JoinEventArgs args)
 {
     if (info.ParameterType == typeof(JoinEventArgs)) {
     return args;
       } else if (info.ParameterType == typeof(string)) {
     string name = info.Name.ToLower();
     switch (name) {
     case "who":
     case "nick":
       return args.Who;
     case "channel":
     default:
       return args.Channel;
     }
       } else {
     return Process(info, args.Data);
       }
 }