question: public void addMutedUsername ( final String username , final Date muteTill ) { if ( isUsernameMuted ( username ) ) { removeMutedUsername ( username ) ; } Timestamp muteTillTs = null ; if ( muteTill != null ) { muteTillTs = new Timestamp ( muteTill . getTime ( ) ) ; } s_logger . fine ( "Muting username:" + username ) ; final Connection con = Database . getConnection ( ) ; try { final PreparedStatement ps = con . prepareStatement ( "insert into muted_usernames (username, mute_till) values (?, ?)" ) ; ps . setString ( 1 , username ) ; ps . setTimestamp ( 2 , muteTillTs ) ; ps . execute ( ) ; ps . close ( ) ; con . commit ( ) ; } catch ( final SQLException sqle ) { if ( sqle . getErrorCode ( ) == 30000 ) { s_logger . info ( "Tried to create duplicate muted username:" + username + " error:" + sqle . getMessage ( ) ) ; return ; } s_logger . log ( Level . SEVERE , "Error inserting muted username:" + username , sqle ) ; throw new IllegalStateException ( sqle . getMessage ( ) ) ; } finally { DbUtil . closeConnection ( con ) ; } }
target:  Mute the given username. If muteTill is not null, the mute will expire when muteTill is reached. <p> If this username is already muted, this call will update the mute_end.