예제 #1
0
 static public void newGuild(Chat.ChatGuildEventArgs arg)
 {
     if (GuildAlert)
     {
         if (File.Exists(SoundfileWisper))
         {
             new SoundPlayer(SoundfileWisper).Play();
         }
         else
         {
             Logging.WriteDiagnostic(Colors.Red, "Alert playing SoundfileWisper failes");
         }
     }
     Logging.Write(Colors.Lime, "Guildmessage: {0}: {1} - Timestamp: {2}: {3}", arg.Author, arg.Message, DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString());
 }
예제 #2
0
파일: Root.cs 프로젝트: Mirabis/PushHub
 /// <summary>
 ///     Sends Guild Messages
 /// </summary>
 /// <param name="e"></param>
 private static void GuildMessage(Chat.ChatGuildEventArgs eg)
 {
     try
     {
         if (!Filtered(eg.Message))
         {
             return;                        //Skip
         }
         var title = FormatIt("Guild message from {0}.", eg.Author);
         SendNotification(eg.Message, title);
     }
     catch (Exception ex)
     {
         Logging.WriteException(ex);
     }
 }
예제 #3
0
 /// <summary>
 /// Makes Noise at Guild Message and Logs it
 /// </summary>
 public void newGuild(Chat.ChatGuildEventArgs arg)
 {
     if (Rarekiller.Settings.Guild)
     {
         if (File.Exists(Rarekiller.Settings.SoundfileGuild))
         {
             new SoundPlayer(Rarekiller.Settings.SoundfileGuild).Play();
         }
         else if (File.Exists(Rarekiller.Soundfile2))
         {
             new SoundPlayer(Rarekiller.Soundfile2).Play();
         }
         else
         {
             Logging.WriteDiagnostic(Colors.MediumPurple, "Rarekiller: playing Soundfile failes");
         }
         Logging.Write(Colors.Lime, "Rarekiller: Guildmessage: {0}: {1} - Timestamp: {2}: {3}", arg.Author, arg.Message, DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString());
     }
 }