Exemplo n.º 1
0
 void spring_PlayerSaid(object sender, SpringLogEventArgs e) {
     tas.GameSaid(e.Username, e.Line);
     User us;
     tas.ExistingUsers.TryGetValue(e.Username, out us);
     bool isMuted = us != null && us.BanMute;
     if (Program.main.Config.RedirectGameChat && e.Username != tas.UserName && !e.Line.StartsWith("Allies:") &&
         !e.Line.StartsWith("Spectators:") && !isMuted) tas.Say(SayPlace.Battle, "", "[" + e.Username + "]" + e.Line, false);
 }
Exemplo n.º 2
0
 void spring_GameOver(object sender, SpringLogEventArgs e) {
     SayBattle("Game over, exiting");
     // Spring sends GAMEOVER for every player and spec, we only need the first one.
     spring.GameOver -= spring_GameOver;
     ZkData.Utils.SafeThread(() =>
         {
             // Wait for gadgets that send spring autohost messages after gadget:GameOver()
             // such as awards.lua
             Thread.Sleep(10000);
             spring.ExitGame();
             spring.GameOver += spring_GameOver;
         }).Start();
 }