Quote:
Originally Posted by sudomehanik
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 have
#sql.db_securitynocheck.query:{CALL smp_new_check_security(?, ?)}
Delete comment it and comment query
You need this procedure, I not know if this will work (I did not tested) but you may try:
Code:
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
Assuming you have rest columns with default values and your account is 60 and password is 255 and you use default left salt 2011
Delete spacebars after @