RefereeInfo entity stores authentication credentials and identity information for tournament referees. This allows the system to automatically manage lobbies via the osu! IRC interface.
Class Definition
Namespace:ss.Internal.Management.Server.AutoRef
Table: referees
Source: /home/daytona/workspace/source/ss.Integrated.Management.Server/Database/Models.cs:335
Properties
The unique identifier for the referee.Column:
id (Primary Key)The referee’s display name as shown in the tournament interface.Can differ from their osu! username.Column:
display_nameThe Discord user ID (snowflake) for the referee.Used to:
- Link Discord commands to referee identity
- Send notifications about assigned matches
- Control access to referee-only commands
discord_idThe osu! user ID from
https://osu.ppy.sh/users/{OsuID}Column: osu_idThe IRC password for authenticating with BanchoBot.Column:
irc_passwordSecurity: This field stores sensitive authentication credentials. See Security Considerations.Security Considerations
Best Practices
-
Encryption at Rest
- Store IRC passwords encrypted in the database
- Use application-level encryption before saving
- Never log IRC passwords in plaintext
-
Access Control
- Restrict database access to authorized personnel only
- Never expose IRC passwords via API endpoints
- Use role-based access control for referee management
-
IRC Token Management
- Use osu! IRC authentication tokens (not account passwords)
- Tokens can be generated at: https://osu.ppy.sh/home/account/edit#legacy-api
- Rotate tokens periodically
- Revoke tokens when referees leave the tournament
-
Secure Transmission
- Always use HTTPS for any API calls involving referee data
- Never transmit IRC passwords in query parameters or logs
Example Encryption Wrapper
Usage Examples
Registering a New Referee
Assigning Referee to Match
Finding Referee by Discord ID
Listing All Referees
Getting Referee Assignments
IRC Authentication Example
Updating Referee Information
Validating Referee Access
Workflow
Referee Onboarding
- Staff creates a RefereeInfo record with Discord and osu! IDs
- Referee generates an IRC token from their osu! account settings
- Token is securely stored (encrypted) in the
IRCfield - System can now authenticate as the referee for automated match management
Match Management
- Referee is assigned to a match via
MatchRoom.RefereeId - System retrieves referee credentials when needed
- Decrypts IRC password for authentication
- Connects to BanchoBot IRC to manage the lobby
- Executes commands as the referee (e.g.,
!mp make,!mp invite)
Offboarding
- When a referee leaves:
- Remove or disable their RefereeInfo record
- Reassign any pending matches to other referees
- Optionally notify them to revoke their IRC token
Related Models
- MatchRoom - References RefereeInfo for match management
- QualifierRoom - References RefereeInfo for lobby management