/*
* brisk - briskin5.phh
*
- * Copyright (C) 2006-2009 Matteo Nastasi
+ * Copyright (C) 2006-2011 Matteo Nastasi
* mailto: nastasi@alternativeoutput.it
* matteo.nastasi@milug.org
* web: http://www.alternativeoutput.it
* not, write to the Free Software Foundation, Inc, 59 Temple Place -
* Suite 330, Boston, MA 02111-1307, USA.
*
- * $Id$
- *
*/
define(BRISKIN5_PLAYERS_N, 3);
define(BRISKIN5_MAX_PLAYERS, BRISKIN5_PLAYERS_N);
function garbage_manager($force)
{
-
+ GLOBAL $G_base;
+
/* Garbage collector degli utenti in timeout */
$ismod = FALSE;
$curtime = time();
/* se gli altri utenti non erano d'accordo questo utente viene bannato */
$remcalc = $this->table[0]->exitlock_calc(&$this->user, $user_cur->table_pos);
if ($remcalc < 3) {
- require_once("/var/www/webspace/trusty/Obj/hardban.phh");
+ require_once("${G_base}Obj/hardban.phh");
Hardbans::add(($user_cur->flags & USER_FLAG_AUTH ? $user_cur->name : FALSE),
$user_cur->ip, $user_cur->sess, $user_cur->laccwr + BAN_TIME);
}
}
}
+function log_points($curtime, &$user, $where, $mesg)
+{
+ GLOBAL $_SERVER;
+
+ if (($fp = @fopen(LEGAL_PATH."/points.log", 'a')) != FALSE) {
+ /* Unix time | session | nickname | IP | where was | mesg */
+ fwrite($fp, sprintf("%ld|%s|%s|%s|%s|%s|%s|\n", $curtime, $user->sess,
+ ($user->flags & USER_FLAG_AUTH ? 'A' : 'N'),
+ $user->name, $_SERVER['REMOTE_ADDR'], $where , $mesg));
+ fclose($fp);
+ }
+}
+
?>