Can you tell me if it is possible to enable auto-registration in the game? For example, I enter my username and password, and the account is automatically created. If so, how to do it. This technical point is interesting
Glandu2 emu haveQuote:
Can you tell me if it is possible to enable auto-registration in the game? For example, I enter my username and password, and the account is automatically created. If so, how to do it. This technical point is interesting
CREATE PROCEDURE smp_new_check_security
@ account VARCHAR(60),
@ pass VARCHAR(255)
AS
BEGIN
SET NOCOUNT ON;
DECLARE @ hashedpass VARBINARY(16);
SET @ hashedpass = HASHBYTES('MD5', '2011' + @ pass);
IF EXISTS (
SELECT TOP 1
FROM Auth.dbo.Account WITH (NOLOCK)
WHERE account = @ account AND password = @ hashedpass
)
BEGIN
SELECT * FROM Auth.dbo.Account WITH (NOLOCK)
WHERE account = @ account AND password = @ hashedpass;
END
ELSE
BEGIN
INSERT INTO Auth.dbo.Account (account, password)
VALUES @ account, @ hashedpass);
SELECT * FROM Auth.dbo.Account WITH (NOLOCK)
WHERE account = @ account AND password = @ hashedpass;
END
END