/// <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); } }
/// <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); } }
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); } }
private void IrcClient_Channel_UserLeft(object sender, IrcChannelUserEventArgs e) { var channel = (IrcChannel)sender; OnChannelUserJoined(channel, e); }
protected virtual void OnChannelUserJoined(IrcChannel channel, IrcChannelUserEventArgs e) { }
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); }
protected override void OnChannelUserLeft(IrcChannel channel, IrcChannelUserEventArgs e) { // }
protected override void OnChannelUserJoined(IrcChannel channel, IrcChannelUserEventArgs e) { SendGreeting(channel.Client.LocalUser, e.ChannelUser.User); }
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); }
void RaceChannel_UserKicked(object sender, IrcChannelUserEventArgs e) { if (e.ChannelUser.User.NickName == Client.LocalUser.NickName && Kicked != null) Kicked(this, null); }
void m_channel_UserJoined(object sender, IrcChannelUserEventArgs e) { CheckModeratorStatus(e.ChannelUser); }
private void Form1_UserJoined(object sender, IrcChannelUserEventArgs e) { client.LocalUser.SendMessage(e.ChannelUser.Channel,"Welcome " + e.ChannelUser); }
protected override void OnChannelUserJoined(IrcChannel channel, IrcChannelUserEventArgs e) { Trace.TraceInformation("OnChannelUserJoined"); }
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); }
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); }
/// <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); }
/// <summary> /// </summary> /// <param name="channel"> /// </param> /// <param name="e"> /// </param> protected abstract void OnChannelUserLeft(IrcChannel channel, IrcChannelUserEventArgs e);
private static void IrcClient_Channel_UserLeft(object sender, IrcChannelUserEventArgs e) { }
/// <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); }
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; } } }
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(); } }
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); }
private void OnUserLeft(object sender, IrcChannelUserEventArgs e) { IrcBotUser user; this.users.TryRemove(e.ChannelUser.User.NickName, out user); }
protected virtual void OnChannelUserLeft(IrcChannel channel, IrcChannelUserEventArgs e) { }
void m_channel_UserJoined(object sender, IrcChannelUserEventArgs e) { CheckModeratorStatus(e.ChannelUser); e.ChannelUser.ModesChanged += ChannelUser_ModesChanged; }
private void ircClient_Channel_UserLeft(object sender, IrcChannelUserEventArgs e) { var channel = (IrcChannel)sender; writeLine(e.ChannelUser.User.NickName+" left the channel " +channel.Name); }
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)); }
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); } }
private void ChannelOnUserLeft(object sender, IrcChannelUserEventArgs ircChannelUserEventArgs) { Message(ircChannelUserEventArgs.ChannelUser.User.NickName + " was a real dick that year..."); }
/// <summary> /// </summary> /// <param name="channel"> /// </param> /// <param name="e"> /// </param> protected abstract void OnChannelUserJoined(IrcChannel channel, IrcChannelUserEventArgs e);
private void ChannelOnUserJoined(object sender, IrcChannelUserEventArgs ircChannelUserEventArgs) { this.Message("Hello " + ircChannelUserEventArgs.ChannelUser.User.NickName); }
/// <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); }
protected override void OnChannelUserJoined(IrcChannel channel, IrcChannelUserEventArgs e) { }