
   /* AMXMOD script.
   *
   * MJV
   *  A  DOD  script for tk's, that enable ftk and forgivetk say commands
   and a menu.
   * Also remembers and kicks and bans players if needed...
   *
   *
   * 5.12.2002 first version...
   *
   * 5.2.2003
   * - added ip-adress to log-files
   *
   * 05/2003
   * - dodv1.0 changes... mp_punish to mp_tkpenalty -1
   * - removed compile warnings (silly things..)
   * - added new forgive commands: !forgivetk, forgive tk
   * - added new cvar-tk_grenade_relief, to make grenade tk-action
   *   configurable
   * - changed all texts except the menu and kick/ban to be normal
   *   client  messages...  (mainly  because  hud-messages  are  easy  to
   disappear)
   * - other things that I can't remember anymore
   *
   * 06/2003
   * - made first compatible version of VALVE_1 and similar WONIDs
   *
   * 8.6.2003
   *  -  silly error (probably a typing one...) the mp_tkpunish was still
   in use...so now finally
   *   to mp_tkpenalty...
   *
   *
   * Installation:
   *
   *  - Create a new folder ../amx/info
   *    This  folder contains all necessary info about players, when they
   leave
   *    the  server and there is something that should be remembered from
   them.
   *    This folder is not cleared by the script, so it's up to you, when
   *    will  you  clean or move files off from here, that are not needed
   anymore.
   *    (There is going to be lot of files in here over time)
   *  - Create or check the precence of ../amx/logs
   *    Here  will  be  created  daily files from kicks and bans that are
   made by the
   *    script...
   *
   *
   * Operation:
   *
   *  Script  will  monitor  the  team kills, that players make, and take
   actions, when
   *  there is certain conditions met with these tk's.
   *  Script  will  present  a menu for either forgive or remember the tk
   done by
   *  teammate.
   *  Grenade  team  kills  can  be treated differently, if assigned from
   cvars.
   *  When on, if someone kills more than one teammate,
   *  killer  get's  only  one unforgettable tk. This is to prevent kicks
   caused by
   *  "died a grenade in hand and killed my whole team"-deaths.
   *
   *  These actions are modifiable by cvars from console:
   *
   *  tk_script         - turn death_MSG catching on/off (enable/disable
   *                      forgivetk-script
   *  tk_tkstokick      - how many tks before kick
   *  tk_kickstoban     - how many kicks before timeban
   *  tk_kickstopermban - how many kicks before permanent ban
   *  tk_rememberkicks  - how many minutes to remember kicks, before
   *                      zeroing kick-counter
   *  tk_remembertks    -   how   many  minutes  to  remember  tk  count,
   originally
   *                      assigned to at least map change time...
   *  tk_bantime        - how many minutes player is banned
   *  tk_forgettk       -  how  many seconds player has to play clean (no
   tks)
   *                      before  mapchange  to get tk count decreased by
   one
   *                      (if has tks...)
   *  tk_grenade_relief - if on, grenade tk's are treated differently
   *
   *  So, the basic rules for operation are as follows:
   *
   *  - When player makes a tk, his 'tk'-counter is added by one.
   *  - If players 'tk'-counter reaches "tk_tkstokick", he will be kicked
   and his 'kick'-
   *    counter is added by one. Players 'tk'-counter is zeroed.
   *  -  If  player comes back to the server, and has recorded kicks, and
   "tk_rememberkicks"
   *    minutes  has  not passed from last visit, his 'kick'-counter will
   not zero. It's value
   *    will be taken back from the memory file instead.
   *  - On every kick are checked the following:
   *    If 'kick'-counter value reaches "tk_kickstoban", player is banned
   *    from server "tk_bantime" minutes
   *    If  'kick'-counter  value  reaches "tk_kickstopermban", player is
   banned permanently
   *    from the server.
   *  -  If  player  stays  out from server "tk_remembertks" minutes, his
   'tk'-counter is
   *    zeroed. Originally this is ment to remember tk's over mapchanges,
   but basicly
   *    can  be  used  exactly  like  it's  name  implies...how  long the
   'tk'-counters value
   *    is valid...
   *  -  If  player stays out from server "tk_rememberkicks" minutes, his
   'kick'-counters value
   *    is not valid anymore (both counters are zeroed, a clean table)...
   *  -  If,  when  map  changes,  player  has  played  without teamkills
   "tk_forgettk" seconds, his
   *    possible 'tk'-counter will be decreased by one.
   *
   * Commands, that are available from say or say_team:
   *
   *  say  tks   -  will  show  the  tk and kick status to calling player
   only.
   *  say kicks -  same as above
   *  say  ftk        -  will forgive last tk done if was not forgiven by
   menu
   *  say forgivetk  -  same as above
   *  say forgive tk -      -"-
   *  say !forgivetk -      -"-
   *
   * Known problems:
   *
   *  - Script uses a method of comparing wonid's on every action what it
   makes,
   *    mainly  because of checking, that the actions are made on correct
   players,
   *    and  players  that  are still in game (not exited, and new player
   come in
   *    replace).  I  encountered  problems,  when  I  was using only the
   player id's
   *    that are used by amx-functions...
   *    This, of course, is slower than only using the player id's.
   *  -  Sometimes  the  menu  and info fields shown in HUD disappear too
   quickly...
   *    I  don't  know  how  to prevent this. Related to the four-channel
   thing...?
   *    (changed to be only the menu and kick/ban messages)
   *  - Scripts date-calculations I tried to make as fast as possible, so
   *    the  script  uses  precalculated values for counting the datetime
   values,
   *    that  are  used  in  script and recorded to files. This can cause
   problems
   *    on  between February and March someday, because the Feb day count
   is fixed
   *    to  28.  Also,  the  precalculated  values are not all tested. If
   there are
   *    mistakes, they all relate to month changes.
   *  - Double code... yes I'm lazy I know....:)
   *  - new VALVE WONIDs not confirmed to work yet...!!
   *
   * Future:
   *
   *  -  Thinking  of  implementing  a  team-attack prevention or similar
   actions
   *    also...perhaps...
   *  -  Cause  I'm  lazy, possibly waiting somebody else to make similar
   script
   *    or to modify this...:)
   *
   */
   #include <amxmod>
   new gMenu
   new tks[33] = {0,...}
   new tkKillerId[33] = {0,...}
   new timeOfEnter[33] = {0,...}
   new kicks[33] = {0,...}
   new grenadeTk[33] = {0,...}
   new playerKickStatus[33] = {0,...}
   new tkKillerWonid[33][20]
   new playerWonid[33][20]
   public menu_option1(id,keys)
   {
      new victimWonid[20]
      getWonid(id,victimWonid)
      if (equal(playerWonid[id],victimWonid)) {
         new killerAuthid[20]
         if (is_user_connected(tkKillerId[id])) {
            getWonid(tkKillerId[id],killerAuthid)
            if (equal(tkKillerWonid[id],killerAuthid)) {
               new name2[32]
               new name1[32]
               get_user_name(tkKillerId[id],name1,31)
               get_user_name(id,name2,31)
               client_print(tkKillerId[id],print_chat,"  *  %s:  You  can
   try to say sorry to the %s...",name1,name2)
            }
         } else {
            tkKillerId[id]=0
            tkKillerWonid[id] = ""
         }
      }
      return PLUGIN_HANDLED
   }
   public forgive(id)
   {
      new victimWonid[20]
      new killerWonid[20]
      getWonid(id,victimWonid)
      if (equal(playerWonid[id],victimWonid)) {
         if (tkKillerId[id]>0) {
            if (is_user_connected(tkKillerId[id])) {
               getWonid(tkKillerId[id],killerWonid)
               if (equal(tkKillerWonid[id],killerWonid)) {
                  if (tks[tkKillerId[id]]>0) {
                     tks[tkKillerId[id]]--
                     if ((tks[tkKillerId[id]]) < 0) {
                        tks[tkKillerId[id]] = 0
                     } else {
                        new string1[32]
                        new string2[32]
                        get_user_name(id,string1,31)
                        get_user_name(tkKillerId[id],string2,31)
                        client_print(0,print_chat,"*  %s  forgave  %s",st
   ring1,string2)
                     }
                  }
               }
            }
            tkKillerId[id] = 0
            tkKillerWonid[id] = ""
         }
      }
   }
   public menu_option2(id,keys)
   {
      forgive(id)
      return PLUGIN_HANDLED
   }
   forgivetk_menu(id,namek[])
   {
      new toshow[256]
      format(toshow,255,"Forgive  TK:  ^n^n1.  Forgive later or never^n2.
   Forgive tk to %s", namek)
      new keys = (1<<0)|(1<<1)
      show_menu(id,keys,toshow,12)
   }
   public kick_player(id,authId[],name[])
   {
      new ddate[20]
      new ttime[20]
      get_time("%d%m%Y",ddate,19)
      get_time("%H%M%S",ttime,19)
      new killerUid = get_user_userid(id)
      new killerIp[30]
      get_user_ip(id,killerIp,29,0);
      new s1[99]
      new file[99]
      tks[id] = 0
      kicks[id]++
      if (kicks[id] == (get_cvar_num("tk_kickstoban"))) {
         new float:banHours
         new bnTime
         bnTime = get_cvar_num("tk_bantime")
         banHours = float:(bnTime/60)
         playerKickStatus[id] = 2
         format(s1,98,"[BANNED]   %s   %s   <%s>   <%s>   <%s>   for   %d
   hours",ddate,ttime,killerIp,authId,name,banHours)
         format(file,98,"addons/amx/logs/kick%s.log",ddate)
         client_cmd(id,"echo  You have been banned for %d hours from this
   server...",banHours)
         set_hudmessage(255,255,255,0.01,0.15,0, 6.0,6.0, 1.0, 1.0, 3)
         show_hudmessage(0,"%s has been banned from this server...",name)
         write_file(file,s1)
         server_cmd("banid %d %s kick",bnTime,authId)
         server_cmd("writeid")
      }   else   if  (kicks[id]  >=  (get_cvar_num("tk_kickstopermban")))
   {
         playerKickStatus[id] = 3
         format(s1,98,"[BANNED]      %s     %s     <%s>     <%s>     <%s>
   permanently",ddate,ttime,killerIp,authId,name)
         format(file,98,"addons/amx/logs/kick%s.log",ddate)
         client_cmd(id,"echo  You  have been banned permanently from this
   server...")
         set_hudmessage(255,255,255,0.01,0.15,0, 6.0,6.0, 1.0, 1.0, 3)
         show_hudmessage(0,"%s  has  been  banned  permanently  from this
   server...",name)
         write_file(file,s1)
         server_cmd("banid %d %s kick",0,authId)
         server_cmd("writeid")
      } else {
         new float:kickHours
         new kTime
         kTime = get_cvar_num("tk_rememberkicks")
         kickHours = float:(kTime/60)
         playerKickStatus[id] = 1
         format(s1,98,"[KICKED] %s %s <%s> <%s>
   <%s>",ddate,ttime,killerIp,authId,name)
         format(file,98,"addons/amx/logs/kick%s.log",ddate)
         if (kicks[id] == (get_cvar_num("tk_kickstoban"))-1) {
            client_cmd(id,"echo  You  were  kicked...Next  kick  will ban
   you...")
            client_cmd(id,"echo  You are totally cleaned from kicks after
   staying out %d hours...",kickHours)
         } else if (kicks[id] == (get_cvar_num("tk_kickstopermban"))-1) {
            client_cmd(id,"echo  You  were kicked. Next kick will ban you
   permanently.")
            client_cmd(id,"echo  You are totally cleaned from kicks after
   staying out %d hours...",kickHours)
         } else {
            client_cmd(id,"echo  You  were  kicked. %d kicks will get you
   banned.",get_cvar_num("tk_kickstoban"))
            client_cmd(id,"echo    %d   kicks   will   get   you   banned
   permanently",get_cvar_num("tk_kickstopermban"))
            client_cmd(id,"echo  You are totally cleaned from kicks after
   staying out %d hours...",kickHours)
         }
         set_hudmessage(255,255,255,0.01,0.15,0, 6.0,6.0, 1.0, 1.0, 3)
         show_hudmessage(0,"%s was kicked for too many TK's...",name)
         write_file(file,s1)
         server_cmd("kick # %d",killerUid)
      }
   }
   public check_grenade_tks(param[])
   {
      new vId = param[0]
      new kId = param[1]
      new killerAuthid[20]
      getWonid(kId,killerAuthid)
      if (equal(tkKillerWonid[vId],killerAuthid)) {
         if (is_user_connected(kId)) {
            new maxtk = get_cvar_num("tk_tkstokick")
            new killer[32]
            new victim[32]
            get_user_name(kId,killer,31)
            get_user_name(vId,victim,31)
            if (grenadeTk[kId]==1) {
               tks[kId]++
               grenadeTk[kId]=0
               new victimAuthid[20]
               getWonid(vId,victimAuthid)
               if (equal(playerWonid[vId],victimAuthid)) {
                  if (is_user_connected(vId)) {
                     tkKillerId[vId] = kId
                     tkKillerWonid[vId] = killerAuthid
                     forgivetk_menu(vId,killer)
                  }
               }
               if ((tks[kId]) < maxtk)
                  client_print(0,print_chat,"*     %s:     TK     warning
   %d/%d",killer,tks[kId],maxtk)
               if (tks[kId] == (maxtk-1)) {
                if (kicks[kId] == (get_cvar_num("tk_kickstoban"))-1) {
                     client_print(kId,print_chat,"*  %s: Next TK will get
   you banned...",killer)
                } else if (kicks[kId] ==
   (get_cvar_num("tk_kickstopermban"))-1) {
                     client_print(kId,print_chat,"* %s: WARNING...Next TK
   will get you banned permanently...",killer)
                  }
             }
               if ((tks[kId]) > (maxtk-1)) {
                  kick_player(kId,killerAuthid,killer)
               }
            }
            if (grenadeTk[kId] > 1) {
               tks[kId]++
               if (grenadeTk[kId]==2)
                  client_print(0,print_chat,"*   %s:   Two  teammates  at
   once... Go practise your throwing arm somewhere else...",killer)
               if (grenadeTk[kId]==3)
                  client_print(0,print_chat,"*  %s:  THREE  teammates  at
   once... Whose side are you playing in here...?",killer)
               if (grenadeTk[kId]==4)
                  client_print(0,print_chat,"*  %s: FOUR TEAMMATES IN ONE
   BLOW... You are not getting friends here...",killer)
               if (grenadeTk[kId]>4)
                  client_print(0,print_chat,"*    Watch   this   %s   guy
   carefully... he is really talented...",killer)
               grenadeTk[kId]=0
               if ((tks[kId]) < maxtk)
                  client_print(0,print_chat,"*     %s:     TK     warning
   %d/%d",killer,tks[kId],maxtk)
               if (tks[kId] == (maxtk-1)) {
                if (kicks[kId] == (get_cvar_num("tk_kickstoban"))-1) {
                     client_print(kId,print_chat,"*  %s: Next TK will get
   you banned...",killer)
                } else if (kicks[kId] ==
   (get_cvar_num("tk_kickstopermban"))-1) {
                     client_print(kId,print_chat,"* %s: WARNING...Next TK
   will get you banned permanently...",killer)
                  }
             }
               if ((tks[kId]) > (maxtk-1)) {
                  kick_player(kId,killerAuthid,killer)
               }
            }
         }
      }
   }
   public death_msg(id)
   {
      if (get_cvar_num("tk_script")) {
         new killerId = read_data(1)
         new victimId = read_data(2)
         if (killerId && (killerId!=victimId)) {
            new teamVictim[10]
            new teamKiller[10]
            get_user_info(victimId,"team",teamVictim,9)
            get_user_info(killerId,"team",teamKiller,9)
            if (teamKiller[1]==teamVictim[1]) {
               new victimAuthid[20]
               getWonid(victimId,victimAuthid)
               new weapon = read_data(3)
           if        (((weapon==13)||(weapon==14)||(weapon==36))       &&
   get_cvar_num("tk_grenade_relief")) {
                  if (equal(playerWonid[victimId],victimAuthid)) {
                     grenadeTk[killerId]++
                     if (grenadeTk[killerId]==1) {
                        new killerAuthid[20]
                        getWonid(killerId,killerAuthid)
                        tkKillerWonid[victimId]=killerAuthid
                        new param[2]
                        param[0] = victimId
                        param[1] = killerId
                        set_task(2.0,"check_grenade_tks",0,param,2)
                     }
                  }
               } else {
                  new maxtk = get_cvar_num("tk_tkstokick")
                  new killer[32]
                  new victim[32]
                  new killerAuthid[20]
                  get_user_name(killerId,killer,31)
                  get_user_name(victimId,victim,31)
                  if (equal(playerWonid[victimId],victimAuthid)) {
                     getWonid(killerId,killerAuthid)
                     tkKillerId[victimId] = killerId
                     tkKillerWonid[victimId] = killerAuthid
                     tks[killerId]++
                     if ((tks[killerId]) < maxtk) {
                        forgivetk_menu(victimId,killer)
                        client_print(0,print_chat,"*   %s:   TK   warning
   %d/%d",killer,tks[killerId],maxtk)
                    }
                     if (tks[killerId] == (maxtk-1)) {
                         if (kicks[killerId] ==
   (get_cvar_num("tk_kickstoban"))-1) {
                              client_print(killerId,print_chat,"*     %s:
   Next TK will get you banned...",killer)
                         }      else      if      (kicks[killerId]     ==
   (get_cvar_num("tk_kickstopermban"))-1) {
                              client_print(killerId,print_chat,"*     %s:
   WARNING...Next TK will get you banned permanently...",killer)
                        }
                   }
                     if ((tks[killerId]) > (maxtk-1)) {
                        kick_player(killerId,killerAuthid,killer)
                     }
                  }
               }
            }
         }
      }

      return PLUGIN_CONTINUE
   }
   public display_tks(id)
   {
      new string1[32]
      get_user_name(id,string1,31)
      client_print(id,print_chat,"*   %s:   You   have  %d  tk's  and  %d
   kicks  in this server...",string1,tks[id],kicks[id])
      return PLUGIN_HANDLED
   }
   public forgive_tk(id)
   {
      forgive(id)
      return PLUGIN_HANDLED
   }
   public client_connect(id)
   {
      new filename[100]
      new seku,minu,hour
      new line[5]
      get_time("%H",line,4)
      hour = strtonum(line)
      get_time("%M",line,4)
      minu = strtonum(line)
      get_time("%S",line,4)
      seku = strtonum(line)
      timeOfEnter[id] = (hour*3600) + (minu*60) + seku
      getWonid(id,playerWonid[id])
      if (!is_user_bot(id)) {
         format(filename,99,"addons/amx/info/%s",playerWonid[id])
         tks[id] = 0
         tkKillerId[id] = 0
         grenadeTk[id] = 0
         tkKillerWonid[id] = ""
         playerKickStatus[id] = 0
         kicks[id] = 0
         if (file_exists(filename)) {
            new linelength = 0
            new gtime = 0
            new ftime = 0
            new day,month,fmin,fhour,fday,fmonth
            get_time("%m",line,4)
            month = strtonum(line)
            get_time("%d",line,4)
            day = strtonum(line)-1

            switch (month) {
               case 1:
                  gtime=0
               case 2:
                  gtime=44640
               case 3:
                  gtime=84969
               case 4:
                  gtime=129600
               case 5:
                  gtime=172800
               case 6:
                  gtime=217440
               case 7:
                  gtime=260640
               case 8:
                  gtime=305280
               case 9:
                  gtime=349920
               case 10:
                  gtime=393120
               case 11:
                  gtime=437760
               case 12:
                  gtime=480960
            }
            gtime+= (day*1440) + (hour*60) + minu
            read_file(filename,3,line,4,linelength)
            fmonth = strtonum(line)
            read_file(filename,4,line,4,linelength)
            fday = strtonum(line)-1
            read_file(filename,5,line,4,linelength)
            fhour = strtonum(line)
            read_file(filename,6,line,4,linelength)
            fmin = strtonum(line)
            switch (fmonth) {
               case 1:
                  ftime=0
               case 2:
                  ftime=44640
               case 3:
                  ftime=84969
               case 4:
                  ftime=129600
               case 5:
                  ftime=172800
               case 6:
                  ftime=217440
               case 7:
                  ftime=260640
               case 8:
                  ftime=305280
               case 9:
                  ftime=349920
               case 10:
                  ftime=393120
               case 11:
                  ftime=437760
               case 12:
                  ftime=480960
            }
            ftime+= (fday*1440) + (fhour*60) + fmin
            new float:kickHours
            new kiTime
            new tkTime
            kiTime = get_cvar_num("tk_rememberkicks")
            tkTime = get_cvar_num("tk_remembertks")
            kickHours = float:(kiTime/60)

            if ((gtime - ftime) < kiTime) {
               read_file(filename,2,line,4,linelength)
               kicks[id]=strtonum(line)
               if (kicks[id]) {
                 client_cmd(id,"echo  You have already %d kicks from this
   server...",kicks[id])
              client_cmd(id,"echo     %d     kicks     will    get    you
   banned.",get_cvar_num("tk_kickstoban"))
              client_cmd(id,"echo   %d   kicks   will   get   you  banned
   permanently.",get_cvar_num("tk_kickstopermban"))
              client_cmd(id,"echo  Stay  out from this server %d hours to
   get totally clean.",kickHours)
               }
            }

            if ((gtime - ftime) < tkTime) {
               read_file(filename,1,line,4,linelength)
               tks[id]=strtonum(line)
               if (tks[id]) {
                 client_cmd(id,"echo  You  have  %d  tks in from previous
   visit or last map.",tks[id])
              client_cmd(id,"echo  Play  nice long enough to get your tks
   decreased...")
              client_cmd(id,"echo  Or  stay  out  %d  minutes  to get tks
   cleaned...",tkTime)
             }
            }
         }
      }
      return PLUGIN_CONTINUE
   }
   public client_disconnect(id)
   {
      new Wonid[20]
      getWonid(id,Wonid)
      if (!is_user_bot(id)) {
         if (equal(playerWonid[id],Wonid)) {
            new filename[100]
            format(filename,99,"addons/amx/info/%s",Wonid)
            new name[32]
            new itksS[40] = ""
            new ikicksS[5] = ""
            new itimeS[5] = ""
            get_user_name(id,name,31)
            if (file_exists(filename)) {
               delete_file(filename)
            }
            if (playerKickStatus[id] == 3) {
               kicks[id] = 0
               tks[id] = 0
            } else if (playerKickStatus[id] == 2) {
               tks[id] = 0
            } else if (playerKickStatus[id] == 1) {
              tks[id] = 0
            } else {
               if (tks[id] > 0) {
                  new lseku,lminu,lhour
                  new lline[5]
                  new leaveTime
                  new playingTime
                  get_time("%H",lline,4)
                  lhour = strtonum(lline)
                  get_time("%M",lline,4)
                  lminu = strtonum(lline)
                  get_time("%S",lline,4)
                  lseku = strtonum(lline)
                  leaveTime = (lhour*3600) + (lminu*60) + lseku
                  if (leaveTime < timeOfEnter[id]) {
                     leaveTime += 86400
                  }
                  playingTime = leaveTime - timeOfEnter[id]
                  if (playingTime > (get_cvar_num("tk_forgettk"))) {
                     tks[id]--
                  }
               }
            }
            if (tks[id] || kicks[id]) {
               new killerIp[30]
               get_user_ip(id,killerIp,29,0);
               numtostr(tks[id],itksS,4)
               numtostr(kicks[id],ikicksS,4)
               write_file(filename,name,-1)
               write_file(filename,itksS,-1)
               write_file(filename,ikicksS,-1)
               get_time("%m",itimeS,4)
               write_file(filename,itimeS,-1)
               get_time("%d",itimeS,4)
               write_file(filename,itimeS,-1)
               get_time("%H",itimeS,4)
               write_file(filename,itimeS,-1)
               get_time("%M",itimeS,4)
               write_file(filename,itimeS,-1)
               write_file(filename,killerIp,-1)
            }
         }
      }
   }
   public check_say (id) {
       new word[14]
       read_args(word,13)
       if (contain(word,"forgive tk") != -1) {
           forgive(id)
           return PLUGIN_HANDLED
       }
       return PLUGIN_CONTINUE
   }
   public getWonid(id,wonid[]) {
      get_user_authid(id,wonid,19)
      replace(wonid,19,":","")
   }
   public plugin_init()
   {
      register_plugin("DOD Forgive TK","0.9.4","MJV")
      gMenu = register_menuid("Forgive TK")
      register_menucmd(gMenu,(1<<0),"menu_option1")
      register_menucmd(gMenu,(1<<1),"menu_option2")
      register_event("DeathMsg","death_msg","a")
      register_cvar("tk_script","1")
      register_cvar("tk_tkstokick","3")
      register_cvar("tk_kickstoban","2")
      register_cvar("tk_kickstopermban","3")
      register_cvar("tk_rememberkicks","1440")
      register_cvar("tk_remembertks","10")
      register_cvar("tk_bantime","60")
      register_cvar("tk_forgettk","1795")
      register_cvar("tk_grenade_relief","1")
      register_clcmd("say tks","display_tks")
      register_clcmd("say_team tks","display_tks")
      register_clcmd("say kicks","display_tks")
      register_clcmd("say_team kicks","display_tks")
      register_clcmd("say ftk","forgive_tk")
      register_clcmd("say forgivetk","forgive_tk")
      register_clcmd("say_team ftk","forgive_tk")
      register_clcmd("say_team forgivetk","forgive_tk")
      register_clcmd("say !forgivetk","forgive_tk")
      register_clcmd("say_team !forgivetk","forgive_tk")
      register_clcmd("say","check_say")
      register_clcmd("say_team","check_say")
      server_cmd("mp_tkpenalty -1")
      return PLUGIN_CONTINUE
   }
