ban.class.php 404 Bytes
Newer Older
Dries's avatar
   
Dries committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?

$type = array("addresses" => 0x01,
              "profanity" => 0x02,
              "hostnames" => 0x03,
              "usernames" => 0x04);

function ban_match($mask, $category) {
  ### Connect to database:
  db_connect();

  ### Perform query:
  $result = db_query("SELECT * FROM bans WHERE type = $category AND '$mask' LIKE mask");
  
  ### Return result:
  return db_fetch_object($result);
}

?>