Contributors use a high rank to determine their rank icon. The problem is that this makes contributors look like pro gamers and they might not be. In order to create more flexibility to rank icons, we should separate them from rank. If we can separate it from rank we could use rank icons made by Ice
The current protocol is this:
CLIENTSTATUS userName status
status contains bits of information including rank.
Proposed Changes
I propose to send this instead from TeiServer
CLIENTSTATUS userName status rankIcon
where rankIcon is a string that can take these values:
1Chev, 2Chev, ...8Chev
1Moderator, 2Moderator, ...8Moderator
1Contributor, 2Contributor, ...8Contributor
1Streamer, 2Streamer, ...8Streamer
1Mentor, 2Mentor, ...8Mentor
Bot
But it's very flexible and can really be anything. The numeric prefix represents their chev level purely based on playtime. After that the postfix depends on if they have a special role or not. If a user has multiple roles it will pick one in this order: Moderator > Contributor > Streamer > Mentor.
Required SPADS modification
SPADS will error due to the extra argument. The var/plugins/barmanager.py needs the hCLIENTSTATUS_pre signature to change (see below)
Required Chobby Modifications
No change is required to Chobby to prevent errors. Chobby is using regex that will simply ignore the extra argument.
Test Steps
1. Fix SPADS Plugin
Before launching SPADS you will need to modify var/plugins/barmanager.py
Change this line
Each of them will have a password of password. Their chev level is defined by their name.
3. Login with test users
Launch Chobby and login with any of the test users. In the SPADS logs you will see what rank icon is being sent. Now go to Teiserver website and login with root@localhost with password password
Go to Users > Find the user > Edit > Change their role to include any of Moderator/Contributor/Streamer/Mentor
Relogin with that user in Chobby. Check the SPADS logs and it should be different.
Context
Contributors use a high rank to determine their rank icon. The problem is that this makes contributors look like pro gamers and they might not be. In order to create more flexibility to rank icons, we should separate them from rank. If we can separate it from rank we could use rank icons made by Ice
The current protocol is this:
status contains bits of information including rank.
Proposed Changes
I propose to send this instead from TeiServer
where rankIcon is a string that can take these values:
But it's very flexible and can really be anything. The numeric prefix represents their chev level purely based on playtime. After that the postfix depends on if they have a special role or not. If a user has multiple roles it will pick one in this order: Moderator > Contributor > Streamer > Mentor.
Required SPADS modification
SPADS will error due to the extra argument. The var/plugins/barmanager.py needs the
hCLIENTSTATUS_pre
signature to change (see below)Required Chobby Modifications
No change is required to Chobby to prevent errors. Chobby is using regex that will simply ignore the extra argument.
Test Steps
1. Fix SPADS Plugin
Before launching SPADS you will need to modify
var/plugins/barmanager.py
Change this lineto this
Also at the top of this function add a log:
Now launch SPADS as normal
2. Add TeiServer Test Users
Launch teiserver with this command (that allows running Elixir commands)
In the same terminal run this to generate test users
This will generate the following users:
Each of them will have a password of
password
. Their chev level is defined by their name.3. Login with test users
Launch Chobby and login with any of the test users. In the SPADS logs you will see what rank icon is being sent. Now go to Teiserver website and login with
root@localhost
with passwordpassword
Go to Users > Find the user > Edit > Change their role to include any of Moderator/Contributor/Streamer/Mentor Relogin with that user in Chobby. Check the SPADS logs and it should be different.