statsincludes/stats_frontend.php
changeset 51 508400fc5282
parent 20 e2f6e3af9959
equal deleted inserted replaced
50:45164bc2567a 51:508400fc5282
    13   // remove a user from the DB
    13   // remove a user from the DB
    14   $targetuser = trim(substr(strstr($message['message'], '|'), 1));
    14   $targetuser = trim(substr(strstr($message['message'], '|'), 1));
    15   if ( empty($targetuser) )
    15   if ( empty($targetuser) )
    16     $targetuser = $message['nick'];
    16     $targetuser = $message['nick'];
    17   
    17   
    18   if ( $targetuser != $message['nick'] && !in_array($message['nick'], $privileged_list) )
    18   if ( $targetuser != $message['nick'] && !check_permissions($message['nick'], array('context' => 'deletestats')) )
    19   {
    19   {
    20     $irc->privmsg($message['nick'], "Sorry, you need to be a moderator to delete statistics for users other than yourself.");
    20     $irc->privmsg($message['nick'], "Sorry, you need to be a moderator to delete statistics for users other than yourself.");
    21     return true;
    21     return true;
    22   }
    22   }
    23   
    23