コード例 #1
0
    void CreateGamersfirstAccount()
    {
        string username = web.Param("username");
        string password = web.Param("password");
        string email    = web.Param("email");
        string g1Id     = web.Param("g1Id");

        string g1PayClass = DetectAccountClassification(g1Id);
        int    g1PayCode  = GetPayCodeFromClassification(g1PayClass);

        // create acc
        SqlCommand sqcmd = new SqlCommand();

        sqcmd.CommandType = CommandType.StoredProcedure;
        sqcmd.CommandText = "ECLIPSE_CREATEACCOUNT";
        sqcmd.Parameters.AddWithValue("@in_IP", LastIP);
        sqcmd.Parameters.AddWithValue("@in_Username", username);
        sqcmd.Parameters.AddWithValue("@in_Password", password);
        sqcmd.Parameters.AddWithValue("@in_Email", email);
        sqcmd.Parameters.AddWithValue("@in_Reg_SID", string.Format("G1AccClass {0} to {1}", g1PayClass, g1PayCode));
        sqcmd.Parameters.AddWithValue("@in_ReferralID", "1289081317");

        if (!CallWOApi(sqcmd))
        {
            return;
        }

        // ok, account creation successed
        Response.Write("WO_0");
        reader.Read();
        string CustomerID = getString("CustomerID");

        // link gamersfirst id
        {
            sqcmd             = new SqlCommand();
            sqcmd.CommandType = CommandType.StoredProcedure;
            sqcmd.CommandText = "WO_G1LinkAccount";
            sqcmd.Parameters.AddWithValue("@in_CustomerID", CustomerID);
            sqcmd.Parameters.AddWithValue("@in_G1ID", g1Id);
            sqcmd.Parameters.AddWithValue("@in_G1PayCode", g1PayCode);

            CallWOApi(sqcmd);
        }

        CreateForumAcc.Create(username, password, email);
        return;
    }
コード例 #2
0
    protected override void Execute()
    {
        username = web.Param("username");
        password = web.Param("password");
        email    = web.Param("email");
        steamId  = web.Param("steamId");

        if (!CreateAccount())
        {
            return;
        }

        LinkSteamId();
        CreateForumAcc.Create(username, password, email);

        return;
    }