Jump to content

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
Link to comment
Share on other sites

Announcements



×
×
  • 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.