It's weird that it works for you, the number 131072 is supposed to go in the usertype in the account table.
I found that the "rid" field in the auth table is the role id, meaning that depending on what role id the user have, the permissions he gets as GM.
I don't know exactly the relation between the role id and the permission but I think it's safer to put all of them, based in what reflax posted in another thread, I made this two stored procedures:
Code:
USE [PassportBOIOLD]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[addGM]
@name varchar(64) = NULL
AS
BEGIN
DECLARE @id int
DECLARE @rid int = 0
BEGIN TRAN
SELECT @id=id FROM account WHERE name = @name
IF (@id IS NOT NULL)
BEGIN
WHILE (@rid < 12)
BEGIN
INSERT INTO auth VALUES (@id,904,@rid)
SET @rid = @rid + 1
END
SET @rid = 100;
WHILE (@rid < 106)
BEGIN
INSERT INTO auth VALUES (@id,904,@rid)
SET @rid = @rid + 1
END
SET @rid = 200;
WHILE (@rid < 215)
BEGIN
INSERT INTO auth VALUES (@id,904,@rid)
SET @rid = @rid + 1
END
SET @rid = 500;
WHILE (@rid < 519)
BEGIN
INSERT INTO auth VALUES (@id,904,@rid)
SET @rid = @rid + 1
END
UPDATE account SET usertype = 131072 WHERE id = @id
END
COMMIT TRAN
END
GO
Code:
USE [PassportBOIOLD]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[removeGM]
@name varchar(64) = null
AS
BEGIN
DECLARE @id int
BEGIN TRAN
SELECT @id=id FROM account WHERE name = @name
IF (@id IS NOT NULL)
BEGIN
DELETE FROM auth WHERE userid = @id
UPDATE account SET usertype = 0 WHERE id = @id
END
COMMIT TRAN
END
GO
Just put them in a new query windows and execute them, aftewards you can use this to add or remove a GM:
EXEC addGM 'username'
EXEC removeGM 'username'
It seems that you need to restart the server for the changes to make effect.