home *** CD-ROM | disk | FTP | other *** search
- /*
- **
- ** _kckscdr.qc (KickSuicider Code , 1.3)
- **
- ** Copyright (C) 1996 Johannes Plass
- **
- ** This program is free software; you can redistribute it and/or modify
- ** it under the terms of the GNU General Public License as published by
- ** the Free Software Foundation; either version 2 of the License, or
- ** (at your option) any later version.
- **
- ** This program is distributed in the hope that it will be useful,
- ** but WITHOUT ANY WARRANTY; without even the implied warranty of
- ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- ** GNU General Public License for more details.
- **
- ** You should have received a copy of the GNU General Public License
- ** along with this program; if not, write to the Free Software
- ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- **
- ** Author: Johannes Plass (plass@dipmza.physik.uni-mainz.de)
- **
- */
-
- void(entity player) KickSuiciderInit =
- {
- if (!USE_MODULE_KICKSUICIDER) return;
- // nothing to be done here.
- // player.kick_suicider_lasttime is initialized in
- // function PutClientInServer() in client.qc
- };
-
- void(entity player) KickSuiciderInfo =
- {
- local string limit;
-
- if (!USE_MODULE_KICKSUICIDER) return;
-
- // 123456789#123456789#123456789#12345678
- sprint(player,"# KickSuicider: You will be kicked\n");
- sprint(player," for 2 suicides within 2 minutes.\n");
- };
-
- float(entity player) KickSuicider =
- {
- if (!USE_MODULE_KICKSUICIDER) return;
-
- if (time < player.kick_suicider_lasttime + 120) {
- if (USE_MODULE_SERVERCONSOLE) { //#jp#(ServerConsole)
- dprint("Kicking "); //#jp#(ServerConsole)
- dprint(player.netname); //#jp#(ServerConsole)
- dprint(" for suiciding\n"); //#jp#(ServerConsole)
- } //#jp#(ServerConsole)
- sprint (player,"Suiciders suck, you are kicked.\n");
- stuffcmd(player,"disconnect\n");
- return(1);
- }
- player.kick_suicider_lasttime = time;
- return(0);
- };
-
-
-