Ejemplo n.º 1
0
 /// <summary>
 /// The welcome newbie on join event.
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="e">
 /// The e.
 /// </param>
 private static void WelcomeNewbieOnJoinEvent(object sender, JoinEventArgs e)
 {
     try
     {
         joinMessageService.Welcome(e.User, e.Channel);
     }
     catch (Exception exception)
     {
         Log.Error("Exception encountered in WelcomeNewbieOnJoinEvent", exception);
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// The notify on join event.
        /// </summary>
        /// <param name="sender">
        /// The sender.
        /// </param>
        /// <param name="e">
        /// The e.
        /// </param>
        private static void NotifyOnJoinEvent(object sender, JoinEventArgs e)
        {
            try
            {
                // FIXME: ServiceLocator - CSH
                var commandServiceHelper = ServiceLocator.Current.GetInstance<ICommandServiceHelper>();

                var legacyUser = LegacyUser.NewFromOtherUser(e.User);
                if (legacyUser == null)
                {
                    throw new NullReferenceException(string.Format("Legacy user creation failed from user {0}", e.User));
                }

                new Notify(legacyUser, e.Channel, new string[0], commandServiceHelper).NotifyJoin(legacyUser, e.Channel);
            }
            catch (Exception exception)
            {
                Log.Error("Exception encountered in NotifyOnJoinEvent", exception);
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// The block monitoring on join event.
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="joinEventArgs">
 /// The join event args.
 /// </param>
 private static void BlockMonitoringOnJoinEvent(object sender, JoinEventArgs joinEventArgs)
 {
     blockMonitoringService.DoEventProcessing(joinEventArgs.Channel, joinEventArgs.User, (IIrcClient)sender);
 }