<?php
defined('COT_CODE') or die('Wrong URL');

if(cot_plugin_active('banlist')) {
  require_once cot_langfile('banlist', 'plug');
  cot::$db->registerTable('banlist');

  $banlist_email_mask = mb_strstr($email, '@');
  $banlist_email_mask_multi = explode('.', $banlist_email_mask);

  $sql = $db->query("SELECT banlist_reason, banlist_email FROM $db_banlist WHERE banlist_iswarning=0 AND (banlist_email='".$db->prep($banlist_email_mask)."' ".
  	"OR banlist_email='".$db->prep($banlist_email_mask_multi[0])."') LIMIT 1");
  if ($row = $sql->fetch())
  {
    $return['success'] = 0;
    $return['in_stop_list'] = 1;
  }
}

?>
