Changeset 199:9ae0347da354

Show
Ignore:
Timestamp:
04/24/2008 08:56:26 PM (4 years ago)
Author:
Dmitry Nezhevenko <dion@…>
Branch:
default
Message:

Disable !word clear for non-owner users

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/plugins/word/wordplugin.cpp

    r196 r199  
    187187                if (cmd=="CLEAR") 
    188188                { 
    189                         words.clear(bot()->getStorage(s)); 
    190                         reply(s, "Ok"); 
     189                        if (getRole(s)<ROLE_OWNER) 
     190                        { 
     191                                reply(s,"Only owner can do this"); 
     192                        }  
     193                        else  
     194                        { 
     195                                words.clear(bot()->getStorage(s)); 
     196                                reply(s, "Ok"); 
     197                        } 
    191198                        return true; 
    192199                }