public static void Switch(GstatsSession session, Dictionary <string, string> recv)
        {
            string command = recv.Keys.First();

            try
            {
                switch (command)
                {
                case "auth":
                    AuthHandler.SendSessionKey(session, recv);
                    break;

                case "authp":
                    AuthPHandler.AuthPlayer(session, recv);
                    break;

                case "getpd":    //get player data
                    break;

                default:
                    session.UnknownDataRecived(recv);
                    break;
                }
            }
            catch (Exception e)
            {
                LogWriter.Log.WriteException(e);
            }
        }
Beispiel #2
0
        public static void Switch(GStatsClient client, Dictionary <string, string> recv)
        {
            string command = recv.Keys.First();

            try
            {
                switch (command)
                {
                case "auth":
                    AuthHandler.SendSessionKey(client, recv);
                    break;

                case "authp":
                    AuthpHandler.AuthPlayer(client, recv);
                    break;

                default:
                    LogWriter.Log.Write("[GSTAS] received unknown data " + command, LogLevel.Debug);
                    break;
                }
            }
            catch (Exception e)
            {
                LogWriter.Log.WriteException(e);
            }
        }