Ban
class Ban extends UrlModel implements NamedModel
A ban imposed by an admin on a player
Constants
| TABLE | The name of the database table used for queries | 
| CREATE_PERMISSION | 
 | 
| EDIT_PERMISSION | 
 | 
| SOFT_DELETE_PERMISSION | 
 | 
| HARD_DELETE_PERMISSION | 
 | 
Methods
Add an IP to the ban
Remove an IP from the ban
Check whether or not a player is allowed to join a server when they've been banned
Get the creation time of the ban
Get the expiration time of the ban
Get the ban's description
Get the ban summary that will appear when a player is denied access to a league server on join
Get the IP address of the banned player
Get the time when the ban was last updated
Get the ID of the player who was banned
Calculate whether a ban has expired or not.
Check whether the ban will expire automatically
Set the server message of the ban
Update the last edit timestamp
Set whether the ban's victim is allowed to enter a match server
Add a new ban
Get a query builder for news
Get the name of the entity
Delete the object
Get the possible statuses representing an active model (visible to everyone)
{@inheritdoc}
Details
        at line         line 116
                            
    addIP(string $ipAddress)
        
    
    Add an IP to the ban
        at line         line 129
                            
    removeIP(string $ipAddress)
        
    
    Remove an IP from the ban
        at line         line 145
                            Ban
    setIPs(string[] $ipAddresses)
        
    
    Set the IP addresses of the ban
        at line         line 170
                            bool
    allowedServerJoin()
        
    
    Check whether or not a player is allowed to join a server when they've been banned
        at line         line 179
                            Player
    getAuthor()
        
    
    Get the user who imposed the ban
        at line         line 188
                            TimeDate
    getCreated()
        
    
    Get the creation time of the ban
        at line         line 197
                            TimeDate
    getExpiration()
        
    
    Get the expiration time of the ban
        at line         line 206
                            string
    getReason()
        
    
    Get the ban's description
        at line         line 215
                            string
    getServerMessage()
        
    
    Get the ban summary that will appear when a player is denied access to a league server on join
        at line         line 228
                            string[]
    getIpAddresses()
        
    
    Get the IP address of the banned player
        at line         line 239
                            TimeDate
    getUpdated()
        
    
    Get the time when the ban was last updated
        at line         line 248
                            Player
    getVictim()
        
    
    Get the player who was banned
        at line         line 257
                            int
    getVictimID()
        
    
    Get the ID of the player who was banned
        at line         line 267
                            bool
    isExpired()
        
    
    Calculate whether a ban has expired or not.
        at line         line 281
                            bool
    willExpire()
        
    
    Check whether the ban will expire automatically
        at line         line 291
                            Ban
    expire()
        
    
    Mark the ban as expired
        at line         line 318
                            Ban
    setServerMessage(string $message)
        
    
    Set the server message of the ban
        at line         line 328
                            Ban
    setReason(string $reason)
        
    
    Set the reason of the ban
        at line         line 337
                            Ban
    updateEditTimestamp()
        
    
    Update the last edit timestamp
        at line         line 347
                            Ban
    setAllowServerJoin(bool $allowServerJoin)
        
    
    Set whether the ban's victim is allowed to enter a match server
        at line         line 365
                static            Ban
    addBan(int $playerID, int $authorID, mixed|null $expiration, string $reason, string $srvmsg = '', string[] $ipAddresses = array(), bool $allowServerJoin = false)
        
    
    Add a new ban
        at line         line 404
                static            QueryBuilder
    getQueryBuilder()
        
    
    Get a query builder for news
        at line         line 417
                            string
    getName()
        
    
    Get the name of the entity
        at line         line 425
                            void
    delete()
        
    
    Delete the object
Please note that this does not delete the object entirely from the database, it only hides it from users. You should overload this function if your object does not have a 'status' column which can be set to 'deleted'.
        at line         line 434
                static            string[]
    getActiveStatuses()
        
    
    Get the possible statuses representing an active model (visible to everyone)
        at line         line 442
                static            
    getLazyColumns()
        
    
    {@inheritdoc}
        at line         line 451
                static            Ban[]
    getBans()
        
    
    Get all the bans in the database that aren't disabled or deleted
        at line         line 461
                static            Ban|null
    getBan(int $playerId)
        
    
    Get an active ban for the player