Jump to content
Sign in to follow this  
Rumor

How To add custom ban reasons in the client

Recommended Posts

1. Extract root archive and open intrologin.py

 

 

search for:

loginFailureMsgDict={

It should look something like this:

self.loginFailureMsgDict={
			#"DEFAULT" : locale.LOGIN_FAILURE_UNKNOWN,

			"ALREADY"	: locale.LOGIN_FAILURE_ALREAY,
			"NOID"		: locale.LOGIN_FAILURE_NOT_EXIST_ID,
			"WRONGPWD"	: locale.LOGIN_FAILURE_WRONG_PASSWORD,
			"FULL"		: locale.LOGIN_FAILURE_TOO_MANY_USER,
			"SHUTDOWN"	: locale.LOGIN_FAILURE_SHUTDOWN,
			"REPAIR"	: locale.LOGIN_FAILURE_REPAIR_ID,
			"BLOCK"		: locale.LOGIN_FAILURE_BLOCK_ID,
			"WRONGMAT"	: locale.LOGIN_FAILURE_WRONG_MATRIX_CARD_NUMBER,
			"QUIT"		: locale.LOGIN_FAILURE_WRONG_MATRIX_CARD_NUMBER_TRIPLE,
			"BESAMEKEY"	: locale.LOGIN_FAILURE_BE_SAME_KEY,
			"NOTAVAIL"	: locale.LOGIN_FAILURE_NOT_AVAIL,
			"NOBILL"	: locale.LOGIN_FAILURE_NOBILL,
			"BLKLOGIN"	: locale.LOGIN_FAILURE_BLOCK_LOGIN,
			"WEBBLK"	: locale.LOGIN_FAILURE_WEB_BLOCK,
			"BANNED"	: locale.LOGIN_FAILURE_BLOCK_ID,
		}

After the last line add a new line and enter a code for a custom ban reason (you will use this later so keep it easy to remember):

self.loginFailureMsgDict={
			#"DEFAULT" : locale.LOGIN_FAILURE_UNKNOWN,

			"ALREADY"	: locale.LOGIN_FAILURE_ALREAY,
			"NOID"		: locale.LOGIN_FAILURE_NOT_EXIST_ID,
			"WRONGPWD"	: locale.LOGIN_FAILURE_WRONG_PASSWORD,
			"FULL"		: locale.LOGIN_FAILURE_TOO_MANY_USER,
			"SHUTDOWN"	: locale.LOGIN_FAILURE_SHUTDOWN,
			"REPAIR"	: locale.LOGIN_FAILURE_REPAIR_ID,
			"BLOCK"		: locale.LOGIN_FAILURE_BLOCK_ID,
			"WRONGMAT"	: locale.LOGIN_FAILURE_WRONG_MATRIX_CARD_NUMBER,
			"QUIT"		: locale.LOGIN_FAILURE_WRONG_MATRIX_CARD_NUMBER_TRIPLE,
			"BESAMEKEY"	: locale.LOGIN_FAILURE_BE_SAME_KEY,
			"NOTAVAIL"	: locale.LOGIN_FAILURE_NOT_AVAIL,
			"NOBILL"	: locale.LOGIN_FAILURE_NOBILL,
			"BLKLOGIN"	: locale.LOGIN_FAILURE_BLOCK_LOGIN,
			"WEBBLK"	: locale.LOGIN_FAILURE_WEB_BLOCK,
			"BANNED"	: locale.LOGIN_FAILURE_BLOCK_ID,
			"BOT"		: "Banned for use of SwitchBot",
		}

You can see that the reason is for switchbot, this is the message that will be displayed to the user who's banned.

 

2. Banning users with the custom ban reason:

 

Go into the account.account database and find the user's account. Go to the status column and change "OK" to "BOT".

  • Love 5

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.