Provides data for events that concern an IrcChannelUser.
Inheritance: IrcCommentEventArgs
コード例 #1
0
        /// <summary>
        ///     Raises the <see cref="UserLeft" /> event.
        /// </summary>
        /// <param name="e">The <see cref="IrcChannelUserEventArgs" /> instance containing the event data.</param>
        protected virtual void OnUserLeft(IrcChannelUserEventArgs e)
        {
            var handler = UserLeft;

            if (handler != null)
            {
                handler(this, e);
            }
        }
コード例 #2
0
        /// <summary>
        /// Raises the <see cref="UserKicked"/> event.
        /// </summary>
        /// <param name="e">The <see cref="IrcChannelUserEventArgs"/> instance containing the event data.</param>
        protected virtual void OnUserKicked(IrcChannelUserEventArgs e)
        {
            var handler = this.UserKicked;

            if (handler != null)
            {
                handler(this, e);
            }
        }
コード例 #3
0
ファイル: TShockIRC.cs プロジェクト: bippity/TShockIRC
        void OnChannelJoined(object sender, IrcChannelUserEventArgs e)
        {
            if (Config.IgnoredIRCNicks.Contains(e.ChannelUser.User.NickName))
                return;

            if (String.Equals(e.ChannelUser.Channel.Name, Config.Channel, StringComparison.OrdinalIgnoreCase))
            {
                if (!IrcUsers.ContainsKey(e.ChannelUser.User))
                    IrcUsers.Add(e.ChannelUser.User, TShock.Groups.GetGroupByName(TShock.Config.DefaultGuestGroupName));
                e.ChannelUser.User.Quit += OnUserQuit;

                if (!String.IsNullOrEmpty(Config.IRCJoinMessageFormat))
                    TShock.Utils.Broadcast(String.Format(Config.IRCJoinMessageFormat, e.ChannelUser.User.NickName), Color.Yellow);
            }
        }
コード例 #4
0
        private void IrcClient_Channel_UserLeft(object sender, IrcChannelUserEventArgs e)
        {
            var channel = (IrcChannel)sender;

            OnChannelUserJoined(channel, e);
        }
コード例 #5
0
 protected virtual void OnChannelUserJoined(IrcChannel channel, IrcChannelUserEventArgs e)
 {
 }
コード例 #6
0
ファイル: TwitchListenerClient.cs プロジェクト: destinygg/bot
 private void IrcClient_Channel_UserLeft(object sender, IrcChannelUserEventArgs e)
 {
     var channel = (IrcChannel) sender;
       Console.WriteLine("[{0}] User {1} left the channel.", channel.Name, e.ChannelUser.User.NickName);
 }
コード例 #7
0
 protected override void OnChannelUserLeft(IrcChannel channel, IrcChannelUserEventArgs e)
 {
     //
 }
コード例 #8
0
 protected override void OnChannelUserJoined(IrcChannel channel, IrcChannelUserEventArgs e)
 {
     SendGreeting(channel.Client.LocalUser, e.ChannelUser.User);
 }
コード例 #9
0
ファイル: ChannelBot.cs プロジェクト: kellyelton/OctgnHelpBot
        private void ChannelOnUserJoined(object sender, IrcChannelUserEventArgs ircChannelUserEventArgs)
        {
            if (this.HandleUserJoin(ircChannelUserEventArgs.ChannelUser.User.NickName))
            {
                this.Message(
                    "Hello, " + ircChannelUserEventArgs.ChannelUser.User.NickName
                    + ". If you need help may I recommend http://www.octgn.net/help ?");
                this.Message(
                    "If you need to report an issue you can always do that here https://github.com/kellyelton/OCTGN/issues .");
                this.Message("If you feel patient, you can ask you question here. Please be aware that it can take awhile to get a reply, so it is highly recommended to use one of the above methods first.");
            }
            else
            {

            }
            //this.Message("Hello " + ircChannelUserEventArgs.ChannelUser.User.NickName);
        }
コード例 #10
0
ファイル: SpeedRunsLiveIRC.cs プロジェクト: 0xwas/LiveSplit
 void RaceChannel_UserKicked(object sender, IrcChannelUserEventArgs e)
 {
     if (e.ChannelUser.User.NickName == Client.LocalUser.NickName && Kicked != null)
        Kicked(this, null);
 }
コード例 #11
0
 void m_channel_UserJoined(object sender, IrcChannelUserEventArgs e)
 {
     CheckModeratorStatus(e.ChannelUser);
 }
コード例 #12
0
 private void Form1_UserJoined(object sender, IrcChannelUserEventArgs e)
 {
     client.LocalUser.SendMessage(e.ChannelUser.Channel,"Welcome " + e.ChannelUser);
 }
コード例 #13
0
ファイル: AzureBot.cs プロジェクト: bremnes/IrcBot
 protected override void OnChannelUserJoined(IrcChannel channel, IrcChannelUserEventArgs e)
 {
     Trace.TraceInformation("OnChannelUserJoined");
 }
コード例 #14
0
ファイル: IrcChannelViewModel.cs プロジェクト: schwarz/handle
        private void channelUserLeft(object sender, IrcChannelUserEventArgs e)
        {
            if (this.Settings.AdvertiseParts)
              {
            this.Messages.Add(new Message(String.Format("{0} [{1}] has left {2} [{3}]",
                                                    e.ChannelUser.User.NickName,
                                                    e.ChannelUser.User.HostName,
                                                    e.ChannelUser.Channel.Name,
                                                    e.Comment),
                                      DateTime.Now.ToString(this.Settings.TimestampFormat),
                                      "=!=",
                                      MessageLevels.Part));
              }

              this.Users.Remove(e.ChannelUser);
        }
コード例 #15
0
ファイル: IrcChannelViewModel.cs プロジェクト: schwarz/handle
 private void channelUserJoined(object sender, IrcChannelUserEventArgs e)
 {
     if (this.Settings.AdvertiseJoins)
       {
     this.Messages.Add(new Message(String.Format("{0} [{1}] has joined {2}",
                                             e.ChannelUser.User.NickName,
                                             e.ChannelUser.User.HostName,
                                             e.ChannelUser.Channel.Name),
                               DateTime.Now.ToString(this.Settings.TimestampFormat),
                               "=!=",
                               MessageLevels.Join));
       }
       this.Users.Add(e.ChannelUser);
       this.Users.Sort(IrcChannelUserComparison.Compare);
 }
コード例 #16
0
 /// <summary>
 /// Raises the <see cref="UserLeft"/> event.
 /// </summary>
 /// <param name="e">The <see cref="IrcChannelUserEventArgs"/> instance containing the event data.</param>
 protected virtual void OnUserLeft(IrcChannelUserEventArgs e)
 {
     var handler = this.UserLeft;
     if (handler != null)
         handler(this, e);
 }
コード例 #17
0
 /// <summary>
 /// </summary>
 /// <param name="channel">
 /// </param>
 /// <param name="e">
 /// </param>
 protected abstract void OnChannelUserLeft(IrcChannel channel, IrcChannelUserEventArgs e);
コード例 #18
0
ファイル: TwitchRelay.cs プロジェクト: Kolpa/DeathmicChatbot
 private static void IrcClient_Channel_UserLeft(object sender, IrcChannelUserEventArgs e)
 {
 }
コード例 #19
0
ファイル: IrcChannel.cs プロジェクト: IrcDotNet/IrcDotNet
 /// <summary>
 ///     Raises the <see cref="UserKicked" /> event.
 /// </summary>
 /// <param name="e">The <see cref="IrcChannelUserEventArgs" /> instance containing the event data.</param>
 protected virtual void OnUserKicked(IrcChannelUserEventArgs e)
 {
     var handler = UserKicked;
     if (handler != null)
         handler(this, e);
 }
コード例 #20
0
ファイル: BotDeathmic.cs プロジェクト: Kolpa/DeathmicChatbot
 protected override void OnChannelUserJoined(IrcChannel channel, IrcChannelUserEventArgs e)
 {
     if (Properties.Settings.Default.SilentMode.ToString() != "true")
     {
         if (xmlprovider == null)
         {
             xmlprovider = new XMLProvider();
         }
         ReconnectInbound = false;
         if (!e.ChannelUser.User.ToString().ToLower().Contains("andchat"))
         {
             #region whisperstatsonjoin
             NormalisedUser normaliseduser = new NormalisedUser();
             normaliseduser.orig_username = e.ChannelUser.User.ToString();
             IEnumerable<User> joineduser = LUserList.Where(x => x.isUser(normaliseduser.normalised_username()));
             if (joineduser.Count() > 0)
             {
                 Tuple<DateTime, int> VisitData = joineduser.First().visit();
                 string visitstring = "";
                 switch (VisitData.Item2)
                 {
                     case 1: visitstring = VisitData.Item2 + "st"; break;
                     case 2: visitstring = VisitData.Item2 + "nd"; break;
                     case 3: visitstring = VisitData.Item2 + "rd"; break;
                     default: visitstring = VisitData.Item2 + "th"; break;
                 }
                 String days_since_last_visit = DateTime.Now.Subtract(Convert.ToDateTime(VisitData.Item1)).ToString("d' days 'h':'mm':'ss");
                 String output = "This is " + normaliseduser.normalised_username() + "'s " + visitstring + " visit. Their last visit was on " + VisitData.Item1.ToString("dd-MM-yyyy HH:mm:ss") + " (" + days_since_last_visit + " ago)";
                 foreach (var loggingOp in LUserList.Where(x => x.bIsLoggingOp))
                     thisclient.LocalUser.SendNotice(loggingOp.Name, output);
             }
             else
             {
                 String output = "This is " + normaliseduser.normalised_username() + "'s first visit.";
                 foreach (var loggingOp in LUserList.Where(x => x.bIsLoggingOp))
                     thisclient.LocalUser.SendNotice(loggingOp.Name, output);
                 User newUser = new User();
                 XDocument Streams = XDocument.Load(Directory.GetCurrentDirectory() + "/XML/Streams.xml");
                 IEnumerable<XElement> streamchildren = from streams in Streams.Root.Elements() select streams;
                 foreach (var stream in streamchildren)
                 {
                     newUser.addStream(stream.Attribute("Channel").Value, true);
                 }
                 newUser.Name = normaliseduser.normalised_username();
                 newUser.bIsLoggingOp = false;
                 newUser.password = "";
                 newUser.bMessages = false;
                 newUser.visit();
                 LUserList.Add(newUser);
                 // TODO: Suscribe to all streams;
             }
             #endregion
             SaveUserList();
             foreach (string streamname in xmlprovider.OnlineStreamList())
             {
                 string _streamname = streamname.Replace(",", "");
                 User user = getUser(normaliseduser.normalised_username().ToLower());
                 if(user != null)
                 if (user.isSubscribed(_streamname))
                 {
                         thisclient.LocalUser.SendNotice(e.ChannelUser.User.ToString(), String.Format(
                                                     "Stream running: _{0}_ ({1}) at {2}",
                                                     _streamname,
                                                     xmlprovider.StreamInfo(_streamname, "game"),
                                                     xmlprovider.StreamInfo(_streamname, "URL")
                                                     ));
                 }
             }
             normaliseduser = null;
         }
     }
 }
コード例 #21
0
 protected override void OnChannelUserJoined(IrcChannel channel, IrcChannelUserEventArgs e)
 {
     SendGreeting(channel.Client.LocalUser, e.ChannelUser.User);
 }
コード例 #22
0
ファイル: BotDeathmic.cs プロジェクト: Kolpa/DeathmicChatbot
 protected override void OnChannelUserLeft(IrcChannel channel, IrcChannelUserEventArgs e)
 {
     ReconnectInbound = false;
     NormalisedUser normaliseduser = new NormalisedUser();
     normaliseduser.orig_username = e.ChannelUser.User.ToString();
     IEnumerable<User> joineduser = LUserList.Where(x => x.isUser(normaliseduser.normalised_username()));
     if(joineduser.Count() > 0)
     {
         joineduser.First().leave();
     }
 }
コード例 #23
0
ファイル: Program.cs プロジェクト: IrcDotNet/IrcDotNet
 private static void IrcClient_Channel_UserJoined(object sender, IrcChannelUserEventArgs e)
 {
     var channel = (IrcChannel)sender;
     Console.WriteLine("[{0}] User {1} joined the channel.", channel.Name, e.ChannelUser.User.NickName);
 }
コード例 #24
0
ファイル: IrcBot.cs プロジェクト: IrcDotNet/IrcDotNet
 protected virtual void OnChannelUserJoined(IrcChannel channel, IrcChannelUserEventArgs e)
 {
 }
コード例 #25
0
ファイル: IrcBot.cs プロジェクト: koushikajay/Alfred
 private void OnUserLeft(object sender, IrcChannelUserEventArgs e)
 {
     IrcBotUser user;
     this.users.TryRemove(e.ChannelUser.User.NickName, out user);
 }
コード例 #26
0
ファイル: IrcBot.cs プロジェクト: IrcDotNet/IrcDotNet
 protected virtual void OnChannelUserLeft(IrcChannel channel, IrcChannelUserEventArgs e)
 {
 }
コード例 #27
0
 protected virtual void OnChannelUserLeft(IrcChannel channel, IrcChannelUserEventArgs e)
 {
 }
コード例 #28
0
ファイル: TwitchClient.cs プロジェクト: BigAbboTT/WinterBot
 void m_channel_UserJoined(object sender, IrcChannelUserEventArgs e)
 {
     CheckModeratorStatus(e.ChannelUser);
     e.ChannelUser.ModesChanged += ChannelUser_ModesChanged;
 }
コード例 #29
0
ファイル: mainForm.cs プロジェクト: Foltik/SugoiRC
 private void ircClient_Channel_UserLeft(object sender, IrcChannelUserEventArgs e)
 {
     var channel = (IrcChannel)sender;
     writeLine(e.ChannelUser.User.NickName+" left the channel " +channel.Name);
 }
コード例 #30
0
ファイル: DefaultIrcClient.cs プロジェクト: pjmagee/Nircbot
        private void ChannelOnUserLeft(object sender, IrcChannelUserEventArgs e)
        {
            var channel = (IrcChannel)sender;
            var ircUser = e.ChannelUser.User;

            User user = this.GetOrCreateGuestUser(ircUser);

            Parallel.ForEach(this.Modules, module => module.OnUserLeft(user, channel.Name));
        }
コード例 #31
0
ファイル: TShockIRC.cs プロジェクト: bippity/TShockIRC
        void OnChannelLeft(object sender, IrcChannelUserEventArgs e)
        {
            if (Config.IgnoredIRCNicks.Contains(e.ChannelUser.User.NickName))
                return;

            if (String.Equals(e.ChannelUser.Channel.Name, Config.Channel, StringComparison.OrdinalIgnoreCase))
            {
                IrcUsers.Remove(e.ChannelUser.User);
                if (!String.IsNullOrEmpty(Config.IRCLeaveMessageFormat))
                    TShock.Utils.Broadcast(String.Format(Config.IRCLeaveMessageFormat, e.ChannelUser.User.NickName, e.Comment), Color.Yellow);
            }
        }
コード例 #32
0
ファイル: ChannelBot.cs プロジェクト: jonbonne/OCTGN
 private void ChannelOnUserLeft(object sender, IrcChannelUserEventArgs ircChannelUserEventArgs)
 {
     Message(ircChannelUserEventArgs.ChannelUser.User.NickName + " was a real dick that year...");
 }
コード例 #33
0
 /// <summary>
 /// </summary>
 /// <param name="channel">
 /// </param>
 /// <param name="e">
 /// </param>
 protected abstract void OnChannelUserJoined(IrcChannel channel, IrcChannelUserEventArgs e);
コード例 #34
0
ファイル: ChannelBot.cs プロジェクト: jonbonne/OCTGN
 private void ChannelOnUserJoined(object sender, IrcChannelUserEventArgs ircChannelUserEventArgs)
 {
     this.Message("Hello " + ircChannelUserEventArgs.ChannelUser.User.NickName);
 }
コード例 #35
0
        /// <summary>
        /// </summary>
        /// <param name="sender">
        /// </param>
        /// <param name="e">
        /// </param>
        private void IrcClient_Channel_UserLeft(object sender, IrcChannelUserEventArgs e)
        {
            var channel = (IrcChannel)sender;

            this.OnChannelUserJoined(channel, e);
        }
コード例 #36
0
ファイル: StatsBot.cs プロジェクト: gkinsman/StatsBot
 protected override void OnChannelUserJoined(IrcChannel channel, IrcChannelUserEventArgs e)
 {
 }
コード例 #37
0
 protected override void OnChannelUserLeft(IrcChannel channel, IrcChannelUserEventArgs e)
 {
     //
 }
コード例 #38
0
ファイル: Program.cs プロジェクト: uzbekdev1/IrcDotNet
        private static void IrcClient_Channel_UserJoined(object sender, IrcChannelUserEventArgs e)
        {
            var channel = (IrcChannel)sender;

            Console.WriteLine("[{0}] User {1} joined the channel.", channel.Name, e.ChannelUser.User.NickName);
        }