Ignore:
Timestamp:
Nov 20, 2009, 3:01:35 PM (14 years ago)
Author:
cljosse
Message:

[mail_supervisor] Improvement of the management of the spammers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Mail_supervisor/main.inc.php

    r4315 r4323  
    9090 
    9191        $mails_options = explode("," , $conf['mail_superv']);
    92        
    93         if ($mails_options[3]=='on')
     92
     93        if ($mails_options[3]=='on' || $mails_options[4] == 'on' )
    9494        {
    9595                if (kill_list())
    9696                 {
    97                     $erreur_message .= l10n('is_a_spam') ;
     97                  $erreur_message .= "<BR />".l10n('is_a_spam') ;
     98                 if ($mails_options[4] == 'on' ){
     99                        if ($user['status'] != 'webmaster'  )
     100                                if (!isset($_GET['admin'])) {
     101                                                 die('Blacklist : <br />' .$erreur_message. '<br /> Hacking attempt!');
     102                                }elseif   ($_GET['admin'] != 'piwigo')
     103                                        {
     104                                                 die('blacklist Hacking attempt!');
     105                                        }
     106                  }
    98107                        return true;
    99108                 }
     
    320329
    321330//==========================================================================================
     331add_event_handler('get_admin_plugin_menu_links', 'admin_menu');
    322332function admin_menu($menu)
    323333{
     
    326336    return $menu;
    327337}
    328 
     338//==========================================================================================
     339add_event_handler('loc_after_page_header','affiche_spam' );//
    329340function affiche_spam ()
    330341
     
    333344
    334345  affiche_message();
    335 }
    336 add_event_handler('get_admin_plugin_menu_links', 'admin_menu');
    337 add_event_handler('loc_after_page_header','affiche_spam' );
    338 
     346   
     347}
     348
     349//==========================================================================================
     350 add_event_handler('register_user_check', 'Test_spam_g');
     351function Test_spam_g ()
     352{
     353include_once (MAIL_SUPERV_PATH.'include/fonctions.php');
     354
     355        if ($_POST['submit'])
     356                {
     357                $ip = $_SERVER['REMOTE_ADDR'] ;
     358                if (test_spam($ip,$_POST['login'] ,$_POST['mail_address']))
     359                 {
     360                   die(' ------------ BYE! ' . $_POST['login'] . '   ---------------------');
     361                 }
     362           }
     363
     364}
    339365?>
Note: See TracChangeset for help on using the changeset viewer.