home *** CD-ROM | disk | FTP | other *** search
/ Superpower (Alt) / SUPERPOWER.iso / q / patch / mbq624 / _kckscdr.qc < prev    next >
Encoding:
Text File  |  1996-08-19  |  1.7 KB  |  60 lines

  1. /*
  2. **
  3. ** _kckscdr.qc (KickSuicider Code , 1.1)
  4. **
  5. ** Copyright (C) 1996 Johannes Plass
  6. ** 
  7. ** This program is free software; you can redistribute it and/or modify
  8. ** it under the terms of the GNU General Public License as published by
  9. ** the Free Software Foundation; either version 2 of the License, or
  10. ** (at your option) any later version.
  11. ** 
  12. ** This program is distributed in the hope that it will be useful,
  13. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. ** GNU General Public License for more details.
  16. **
  17. ** You should have received a copy of the GNU General Public License
  18. ** along with this program; if not, write to the Free Software
  19. ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20. ** 
  21. ** Author:   Johannes Plass (plass@dipmza.physik.uni-mainz.de)
  22. **
  23. */
  24.  
  25. void(entity player) KickSuiciderInit =
  26. {
  27.    // nothing to be done here.
  28.    // player.kick_suicider_lasttime is initialized in 
  29.    // function PutClientInServer() in client.qc
  30. };
  31.  
  32. void(entity player) KickSuiciderInfo =
  33. {
  34.    local string limit;
  35.  
  36.    if (!USE_MODULE_KICKSUICIDER) return;
  37.  
  38.    //             123456789#123456789#123456789#12345678
  39.    sprint(player,"# KickSuicider: You will be kicked\n");
  40.    sprint(player,"  for 2 suicides within 2 minutes.\n");
  41. };
  42.  
  43. float(entity player) KickSuicider =
  44. {
  45.    if (!USE_MODULE_KICKSUICIDER) return;
  46.  
  47.    if (time < player.kick_suicider_lasttime + 120) {
  48.       dprint("Kicking ");
  49.       dprint(player.netname);
  50.       dprint(" for suiciding\n");
  51.       sprint (player,"Suiciders suck, you are kicked.\n");
  52.       stuffcmd(player,"disconnect\n");
  53.       return(1);
  54.    }
  55.    player.kick_suicider_lasttime = time;
  56.    return(0);
  57. };
  58.  
  59.  
  60.