コード例 #1
0
ファイル: Helpmebot.cs プロジェクト: tom29739/helpmebot
 /// <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);
     }
 }
コード例 #2
0
ファイル: Helpmebot.cs プロジェクト: tom29739/helpmebot
        /// <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);
            }
        }
コード例 #3
0
ファイル: Helpmebot.cs プロジェクト: helpmebot/helpmebot
 /// <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);
 }