-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Blocked) Add rank_icon to ADDUSER command #275
Conversation
While the code in this PR works, it is currently blocked due to not knowing how to get this information into the in-game player list. Getting the data into chobby should be working fine. |
I would honestly expect SPADS to panic at this, ill have to test it on integration. |
I think I would much prefer to make this an extensible field, likely via base64'd json. There have been multiple requests to transfer additional metadata in ADDUSER. |
@Beherith just to clarify you want the last argument to be base 64 json string instead of just rank icon? Example:
|
I later figured out why it doesn't error. It's because there's an existing bug. Teifion does not send cpu in the ADDUSER command. BarManager.py is expecting it
So everything is off by one. Also see this comment by Teifion: |
Not working on this so closing |
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
Teiserver currently sends this for ADDUSER :
Proposed Changes
I propose to send this instead from TeiServer
where
rank_icon
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 doesn't error with this modification. However I have no idea why it doesn't error.
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. Launch SPADS
This is the normal command to launch spads.
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. Check via logs what rank_icon is being send (Not sure how to log this)
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 logs and it should be different.