[Question] Client Side Registration menu

User Tag List

Results 1 to 5 of 5
  1. #1
    Sufursky's Avatar Member
    Reputation
    1
    Join Date
    Apr 2013
    Posts
    7
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Question] Client Side Registration

    Hi, sorry for bad english in advance.
    I've made frame for account creation and now i don't know, how i should send those informations to auth server through client.
    Is there some possible way to do or i have to send it to php script?
    [Question] Client Side Registration-acccreate-jpg
    Thanks for your ideas.
    Regards, Sufursky.

    [Question] Client Side Registration
  2. #2
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    I have the same, when the "create" button is pressed, I call this code:

    Code:
    function CreateAccountFinal(self)
    	CreateAccountFrame:Hide();
    	local username = AccountNameEditBox:GetText();
    	local password = AccountPasswordEditBox:GetText();
    	local cpassword = AccountPasswordConfirmEditBox:GetText();
    	
    	if ( password ~= cpassword ) then
    		GlueDialog_Show("REALM_TOURNAMENT_WARNING", "Account creation failed.\n\rPasswords do not match.", nil);
    		return;
    	elseif ( strlen(username) < 3 or strlen(username) < 5 or strfind(username, "[^%w]") or strfind(password, "[^%w]") ) then
    		GlueDialog_Show("REALM_TOURNAMENT_WARNING", "Account creation failed.\n\rOnly alphanumerical characters (A-Z, 0-9) allowed!", nil);
    		return;
    	end
    	
    	local info = table.concat({"?", username, "?", password, "?"});
    	CreateAccountReply = true;
    	DefaultServerLogin(info, tostring(math.random(1, 100000)));
    end
    The server listens for a username/password beginning with ?. It runs some verification and if all passes, it creates the account. It responds with a error code depending upon how far it gets.

    The bool that I flag as true makes the error messages on login display differently if it is true. This way I can create custom error messages for account creation.

  3. #3
    Sufursky's Avatar Member
    Reputation
    1
    Join Date
    Apr 2013
    Posts
    7
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you for that perfect idea, but is there a way to send account info with email together?
    If i've set info like:
    local info = table.concat({"?", username, "?", password, "?", email, "?"});
    client automaticaly starts downloading WoW-x.x.x.x-4.0.0.12911-Downloader
    I can't explain myself why, because i have no patching implemented.

  4. #4
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Sufursky View Post
    Thank you for that perfect idea, but is there a way to send account info with email together?
    If i've set info like:
    local info = table.concat({"?", username, "?", password, "?", email, "?"});
    client automaticaly starts downloading WoW-x.x.x.x-4.0.0.12911-Downloader
    I can't explain myself why, because i have no patching implemented.
    If it is patching on login then you have not adjusted your realmlist or are trying to login with an email.

    My server side code:

    Code:
    	// Clear the shitty hash (for server)
    	string AccountName = (char*)&m_challenge.I;
    	if (AccountName.substr(0, 1) == "?")
    	{
    		if (AccountName.find_first_not_of("ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789?") != string::npos)
    		{
    			LOG_ERROR("[AuthChallenge]: Tried to create account with illegal characters.");
    			SendChallengeError(CE_NO_ACCOUNT); //Well **** you for editing the files!
    			return;
    		}
    
    		int pass_start = AccountName.find("?", 1) + 1;
    		if (pass_start < 4) //No username
    		{
    			LOG_ERROR("[AuthChallenge] Tried to create account with no account name.");
    			SendChallengeError(CE_NO_ACCOUNT);
    			return;
    		}
    
    		int pass_end = AccountName.rfind("?");
    		if (pass_end <= pass_start) //No password
    		{
    			LOG_ERROR("[AuthChallenge] Tried to create account with no password.");
    			SendChallengeError(CE_NO_ACCOUNT);
    			return;
    		}
    
    		int name_len = pass_start - 2;
    		int pass_len = pass_end - pass_start;
    		string username = AccountName.substr(1, name_len);
    		string password = AccountName.substr(pass_start, pass_len);
    
    		m_account = AccountMgr::getSingleton().GetAccount(username);
    		if (m_account != 0)
    		{
    			LOG_ERROR("[AuthChallenge] Account creation failed: account name already taken.");
    			SendChallengeError(CE_ACCOUNT_IN_USE);
    			return;
    		}
    
    		string cmd = username + " " + password + " none"; //Prepare command for CreateAccount
    		char acct[50];
    
    		memcpy(acct, cmd.c_str(), 50); //CreateAccount doesn't take const char*
    		LogonConsole::getSingleton().CreateAccount(acct);
    		SendChallengeError(CE_SERVER_FULL); //Success!
    		LOG_BASIC("[AuthChallenge] Client %s has created an account with name: \"%s\"", GetRemoteIP().c_str(), username.c_str());
    		return;
    	}
    You would add email by adding it to the table with a question mark, then having the server side code look for the next question mark.

  5. #5
    Sufursky's Avatar Member
    Reputation
    1
    Join Date
    Apr 2013
    Posts
    7
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for help mate. I realized that email is not so important to know.
    Topic can be closed.
    Regards, Sufursky.

Similar Threads

  1. change pet name. client side
    By drejan in forum World of Warcraft General
    Replies: 3
    Last Post: 08-17-2007, 01:55 AM
  2. [Question] Server Side Model Edits?
    By Super Noob in forum WoW ME Questions and Requests
    Replies: 3
    Last Post: 08-05-2007, 12:10 AM
  3. Client-Side Only Text Color Change Edit
    By orangegold in forum World of Warcraft Bots and Programs
    Replies: 9
    Last Post: 04-23-2007, 01:19 AM
  4. How to change models and textures client side only
    By Matt in forum World of Warcraft Guides
    Replies: 9
    Last Post: 11-29-2006, 12:35 AM
  5. World of Warcraft Naked Patch (Client-Side Only)
    By Matt in forum World of Warcraft Exploits
    Replies: 2
    Last Post: 05-19-2006, 10:33 PM
All times are GMT -5. The time now is 11:39 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search