Changeset 2024

Show
Ignore:
Timestamp:
02/13/2010 11:09:00 AM (6 months ago)
Author:
djb61
Message:

If a known user PM's the sitebot in plaintext when blowfish is enabled do not silently drop the message but respond with a plaintext message informing them that a blowfish key must be set. This is taken from the submitted patch against the ticket but changed to remove the exact format of the site command (as this can be changed in the config so could be wrong) and also so that DH1080 is only mentioned if this is actually enabled in the sitebot.
See: #251

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/plugins/org.drftpd.plugins.sitebot/src/org/drftpd/plugins/sitebot/SiteBot.java

    r2018 r2024  
    13051305                                } 
    13061306                        } else { 
    1307                                 // means we got an unencrypted line from a chan that should be encrypted 
     1307                                if(_users.containsKey(sender)) { 
     1308                                        StringBuilder reply = new StringBuilder("Use site command "); 
     1309                                        if (_config.getDH1080Enabled()) { 
     1310                                                reply.append("or DH1080 key-exchange "); 
     1311                                        } 
     1312                                        reply.append("to set a blowfish key before sending a private message"); 
     1313                                        sendMessage(sender, reply.toString()); 
     1314                                } 
     1315                                // means we got an unencrypted line from a user that should be encrypted 
    13081316                                if (_config.getBlowfishPunish()) { 
    13091317                                        punishUnencryptedUser(sender,sender+"!"+login+"@"+hostname);