Example #1
0
 public void OnGGMessageReceived(object sender, Goodgame.GGMessageEventArgs e)
 {
     SendMessage(new Message(String.Format("{0} ({1}{2})", e.Message.Text, e.Message.Sender.Name, settings.goodgameChatAlias), EndPoint.Goodgame, EndPoint.SteamAdmin));
 }
Example #2
0
 void ggChat_OnMessageReceived(object sender, Goodgame.Message e)
 {           
     SendMessage(new UbiMessage(String.Format("{0}", e.Text), EndPoint.Goodgame, EndPoint.SteamAdmin) 
     { 
         FromName = e.User, 
         ToName = e.ToName,
         NickColor = settings.goodgameNickColor,
         TextOnly = false
     });
 }
Example #3
0
        public void ConnectGoodgame()
        {
            if (!settings.goodgameEnabled)
                return;

            //if (ggChat != null)
            //    ggChat.Disconnect();
            ggChat = new Goodgame(settings.goodgameUser, settings.goodgamePassword, settings.goodgameLoadHistory);

            ggChat.OnMessageReceived += OnGGMessageReceived;
            ggChat.OnConnect += OnGGConnect;
            ggChat.OnChannelListReceived += OnGGChannelListReceived;
            ggChat.OnError += OnGGError;
            ggChat.Connect();
        }
Example #4
0
        public void ConnectGoodgame()
        {
            if (isClosing)
                return;

            if (!settings.goodgameEnabled)
                return;

            ggChat = new Goodgame(settings.goodgameUser, settings.goodgamePassword, settings.goodgameLoadHistory);

            ggChat.OnMessageReceived += new EventHandler<Goodgame.Message>(ggChat_OnMessageReceived);
            ggChat.OnLogin += new EventHandler<EventArgs>(ggChat_OnLogin);
            ggChat.OnDisconnect += OnGGDisconnect;
            ggChat.OnError += OnGGError;
            if (ggChat.Login())
            {
                ggChat.Start();
                ggChat.GetDescription();
                if (String.IsNullOrEmpty(settings.goodgame_ShortDescription))
                    settings.goodgame_ShortDescription = ggChat.ShortDescription;
                if (String.IsNullOrEmpty(settings.goodgame_Game))
                    settings.goodgame_Game = ggChat.Game;
            }
            else
            {
                SendMessage(new UbiMessage(String.Format("Goodgame: login failed!"), EndPoint.Goodgame, EndPoint.Error));  
            }

        }
Example #5
-1
 private void OnGGError(object sender, Goodgame.TextEventArgs e)
 {
     SendMessage(new Message(String.Format("Goodgame error: {0}", e.Text), EndPoint.Goodgame, EndPoint.SteamAdmin));
 }