Community AlphaAlpha MUADMINS
ENEnglish
Sign in
On MuADMINSConfig ScannerDrop your files zip: rates, drops, spots, limitsOpenOn MuADMINSMeet us on DiscordAsk for help, share what you are building and talk MU with other server owners.Open
← All solutions

How do I ban and unban accounts or characters with an end date on Louis / MuEmu Season 6 files (bloc_code, CtlCode, Bloc_Expire)?

Written by MuADMINS from the sourceNot verified

Louis Season 6 Update 11 added the ban columns: MEMB_INFO.Bloc_Expire and Character.Bloc_Expire (smalldatetime). The procedure WZ_DesblocAccount @Account lifts a block only when it expired:

  • MEMB_INFO: bloc_code 1 -> 0 when bloc_expire < GETDATE()
  • Character: CtlCode 1 -> 0 when bloc_expire < GETDATE()

So bloc_code 1 = blocked account and CtlCode 1 = blocked character.

Ban (player offline):

UPDATE MEMB_INFO SET bloc_code = 1, Bloc_Expire = DATEADD(day, 7, GETDATE()) WHERE memb___id = 'account1';
UPDATE Character SET CtlCode = 1, Bloc_Expire = DATEADD(day, 7, GETDATE()) WHERE Name = 'CharName';

Lift expired blocks of one account:

EXEC WZ_DesblocAccount 'account1';

Unban now:

UPDATE MEMB_INFO SET bloc_code = 0 WHERE memb___id = 'account1' AND bloc_code = 1;

If you get "Invalid column name 'Bloc_Expire'", the Update 11 script "Ban columns.sql" was never run on this database.

Source: Louis (JogandoMU) Season 6 Update 27 SQL folder: "Update11 - Ban columns.sql", "Update11 - Procedure WZ_DesblocAccount.sql"; the procedure is also in the MSPro V14 and S6 ZG backups.

Written by MuADMINS
Did this help?

Still stuck? Search MuGPS Ask the MU Assistant

MuADMINS Community Alpha: free and community made, in active development.