
   new const PLUGINNAME[] = "Chat Responder"
   new const VERSION[] = "0.7"
   new const AUTHOR[] = "JGHG"
   /*
       Copyleft 2003
       IMPORTANT:
       ==========
       Any  client  with  ability  ADMIN_CFG  can  add  new hear/response
   combos,
       which means it can view just about any file in your mod directory!
       Be sure you know who you give ADMIN_CFG access to!!!
       Responses can be maximum RESPONSELENGTH characters long (normally
       512, check this in the "#define RESPONSELENGTH" line below)
       This  limit  does  not  affect  displaying  of  files which can be
   longer.
       You  can  have  a  maximum  of WORDSTOHEAR different words/phrases
   stored.
       This value is normally 64, but if you need more, you can change it
       on the "#define WORDSTOHEAR" line below.
       Usage:
       ======
       amx_chatrespond <wordtohear> <response> <flags>
       Flags (add inside quotes as third argument):
       ============================================
       a    Global, response will be sent to all (default is private)
       b    No Spam Global, no spam (if you set both a and b, only b will
   run)
       c#     Display to # (print_chat is default, max lengths are tested
   with Counter-strike)
            1    = print_notify (max length 128 characters, prints to top
   left area)
            2    = print_console (max length 128 characters)
            3    = print_chat (default when c flag is not set, max length
   128 characters)
            4    = print_center  (max length 40 characters)
             5    =  Message  of  the  day  (a  and b flags not possible,
   unknown max length...)
             6x:y:r:g:b  =  Hud  message style, you must specify position
   (x:y) and colour (r:g:b)
            Where        should be
             x            a  decimal  value  between 0.0 (extreme left of
   screen) and 1.0 (right). Use -1.0 to center dimension.
             y            a  decimal  value  between  0.0 (extreme top of
   screen) and 1.0 (bottom). Use -1.0 to center dimension.
            r            an integer between 0 and 255. 255 is full red.
            g            an integer between 0 and 255. 255 is full green.
            b            an integer between 0 and 255. 255 is full blue.
       d    Match only whole words (ex: don't find "ip" in "whipped")
       e    Case sensitive search (default is case insensitive)
       f#   Kick player # (max 999) seconds after use of this word.
       g#:%  Ban  player  after  #  (max  999)  seconds for % (max 99999)
   minutes if he uses this word. 0 minutes is permanent.
       A valid line would look like this:
           amx_chatrespond ip "Ip to this place is 1.1.1.1:27016" "a"
           amx_chatrespond hello "Hello there &name!" "bc4d"
           amx_chatrespond brb "I can help you with that..." "df5ac1"
           amx_chatrespond  lag "&name needs to buy something faster than
   his 300 baud modem..." bc1d
           amx_chatrespond mapcycle "&file:mapcycle.txt"
           amx_chatrespond  bind "&name needs to learn that bind commands
   goes to console..." a
           amx_chatrespond help "&file:ourhelpfile.txt"
           amx_chatrespond test "This will be displayed in blue colour in
   the middle of the screen!" "c6-1.0:-1.0:0:0:250"
       Responses:
       ==========
       - Cvar (use like: &mp_c4timer or %mp_friendlyfire)
       You can have cvars in response, they will be replaced with
       current value. Preceed the cvar with a & (new in version 0.7).
       A  preceeding % before the cvar will exchange the value to "on" if
   the value is 1, and "off" if value is 0.
       - &name
       You can have &name in response, to exchange that for sayer's name.
       - &file:<textfile>
       Will display the file specified after &file: as response.
       This will display the file in a MOTD window.
       The     file     should     be     in    mod    root    directory.
   (valve/,tfc/,cstrike/,...)
       Examples:
       =========
       amx_chatrespond  hello  "Why  hello there &name, ready to get your
   socks rocked?"

       ...greets  anyone  saying "hello" with that response, and puts the
   sayer's
       real name instead of "&name".

       amx_chatrespond  ff "Friendly fire is set to: %mp_friendlyfire" "d
   b"
       ...would  display "Friendly fire is set to: on" to everyone (if ff
   is on)
       if a player says "ff", but not "off" or the like... If same player
   says
       this  again too soon he will only get private responses to all "b"
   flagged
       until 60 seconds has passed.
       If  you preceed the cvar with % character, the returned value will
   be
       exchanged to on (1) or off (0), but only if 1 or 0 is the value.
       Releases:
       2003-05-27: version 0.1:
                   First version
                   version 0.2:
                   Changed flags, so you need to update
                   if you ran 0.1. New flags are added:
                   Match only whole words, case sensitive
                   search. Also any cvar preceeded with
                   % in response, will be changed to
                   on or off if value returned is 1 or 0.
                   version 0.3:
                   flags changed again (dropped the -)
       2003-06-14: version 0.4:
                   Added kick and ban flags.
                   &name can be used in response to be
                   exchanged for sayer's name.
       2003-06-18: version 0.5
                   &file:filename.txt can be as response,
                   to display the contents of the file.
                   Files are always displayed in motd
                   window.
       2003-06-21: version 0.6
                   Minor tweaking. Now you can use
                   most flags even if you display file
                   as response.
                   Removed global/automated prefices.
                   Totally changed flag c to be a flag
                   that sets destination to different
                   places on screen, in console, to motd
                   or to a hud message where you must specify
                   position and text colour.
                   Update your configs according to this!
                   No check if you add too many words existed
                   until now :-).

       2004-01-27: version 0.7
                   Cvars  in  responses  must  now  be  preceeded  by a &
   character if they are to be replaced by that cvar's value.
                   Like  "C4 timer is set to &mp_c4timer". Still only use
   a  %  like  this: "Friendly fire is currently %mp_friendlyfire" and it
   will still
                   work  as  usual, ie replacing a cvar value of 1 for on
   and 0 for off.
       To do:
       ======
       -  Destination  types  to  add  to c flag: hud message, statustext
   etc...
       - A flag to add/remove given amount of money.
       -  Make  it  able  to  respond to several words, ie typing "ip ff"
   would display both ip
       and ff setting.
       -  Make a flag to have some words only be responded to if you have
   the access for it?
   */
   #include <amxmod>
   #define RESPONSELENGTH 512
   #define WORDSTOHEAR 64
   #define ARGLENGTH 32
   #define MUTETIME 60.0
   // Globals below
   new hearedWords[WORDSTOHEAR][64]
   new responses[WORDSTOHEAR][RESPONSELENGTH]
   new arguments[WORDSTOHEAR][ARGLENGTH]
   new wordsCount
   new muted[33]
   enum {enumMotd = 5,enumFile,enumHud}
   // Globals above
   public unmute(idArg[]) {
       muted[idArg[0]] = 0
   }
   checkA(responseSlot,&sendTo) {
       if (contain(arguments[responseSlot],"a") != -1)
           sendTo = 0
   }
   checkB(id,responseSlot,&sendTo) {
       if (contain(arguments[responseSlot],"b") != -1) {
           if (muted[id] == 1)
               sendTo = id
           else {
               sendTo = 0
               muted[id] = 1
               new idArg[1]
               idArg[0] = id
               set_task(MUTETIME,"unmute",0,idArg,1)
           }
       }
   }
   checkC(id,responseSlot,&sendTo,&destination,Float:hudXY[2],hudRGB[3])
   {
       if (contain(arguments[responseSlot],"c1") != -1) {
           destination = print_notify
       }
       else if (contain(arguments[responseSlot],"c2") != -1) {
           destination = print_console
       }
       else if (contain(arguments[responseSlot],"c4") != -1) {
           destination = print_center
       }
       else if (contain(arguments[responseSlot],"c5") != -1) {
           sendTo = id
           destination = enumMotd
       }
       else if (contain(arguments[responseSlot],"c6") != -1) {
           // Gives the pos of the 'c'
           new pos = contain(arguments[responseSlot],"c6") + 2
           //c6x:y:r:g:b = Hud message style
           //"c60.5:0.6:255:200:150"
           new paramString[10]
           new nextParam = pos, paramLen
           for (new i = 0;i < 4;i++) {
               copyc(paramString,9,arguments[responseSlot][nextParam],':'
   )
               if (i < 2) {
                   //  Only  numbers,  .  and  -  can exist here. If not,
   return...
                   paramLen = strlen(paramString)
                   if (paramLen == 0)
                       return 0
                   for (new j = 0;j < paramLen;j++) {
                       if  ((paramString[j]  >=  '0' && paramString[j] <=
   '9') || paramString[j] == '.' || paramString[j] == '-') {}
                       else {
                           //  Error,  some  odd  character  in parameter
   found
                           return 0
                       }
                   }
                   hudXY[i] = floatstr(paramString)
               }
               else {
                   //  Only  numbers  here, length can't be longer than 3
   either...
                   paramLen = strlen(paramString)
                   if (paramLen == 0 || paramLen > 3)
                       return 0
                   for (new j = 0;j < paramLen;j++) {
                       if  (paramString[j]  >=  '0'  && paramString[j] <=
   '9') {}
                       else {
                           //  Error,  some  odd  character  in parameter
   found
                           return 0
                       }
                   }

                   hudRGB[i - 2] = strtonum(paramString)
               }
               nextParam += strlen(paramString) + 1
               //console_print(0,"paramString:%s,nextParam:%d",paramStrin
   g,nextParam)
               //client_print(0,print_chat,"paramString:%s,nextParam:%d",
   paramString,nextParam)
           }
           new lastLen
           do {
               if (arguments[responseSlot][nextParam + lastLen] >= '0' &&
   arguments[responseSlot][nextParam + lastLen] <= '9')
                   lastLen++
               else
                   break
           }
           while (lastLen < 3)
           copy(paramString,lastLen,arguments[responseSlot][nextParam])
           hudRGB[2] = strtonum(paramString)
           //console_print(0,"Sista paramString:%s (lastLen:%d) Complete:
   %f %f %d %d
   %d",paramString,lastLen,hudXY[0],hudXY[1],hudRGB[0],hudRGB[1],hudRGB[2
   ])
           //client_print(0,print_chat,"Sista paramString:%s (lastLen:%d)
   Complete: %f %f %d %d
   %d",paramString,lastLen,hudXY[0],hudXY[1],hudRGB[0],hudRGB[1],hudRGB[2
   ])
           // If all parameters is set ok, set destination to hud.
           destination = enumHud
       }
       return 1
   }
   checkCvars(sendResponse[RESPONSELENGTH],responseSlot) {
       new word[RESPONSELENGTH], wordCopy[RESPONSELENGTH]
       new parsingResponse[RESPONSELENGTH]
       parsingResponse = responses[responseSlot]
       sendResponse = responses[responseSlot]
       new parsedParams
       new cvarValue[RESPONSELENGTH], cvarNumValue
       new bool:onOff = false, bool:couldBeCvar
       do {
           parsedParams  = parse(parsingResponse,word,RESPONSELENGTH - 1)
   // Get first parameter in line
           copy(wordCopy,RESPONSELENGTH - 1,word)
           if (parsedParams == 0)
               break
           replace(parsingResponse,RESPONSELENGTH  - 1,word,"") // Remove
   first parameter
           if (wordCopy[0] == '&') {
               copy(wordCopy, RESPONSELENGTH - 1, word[1])
               couldBeCvar = true
               onOff = false
           }
           else if (wordCopy[0] == '%') {
               // Strip % char
               copy(wordCopy, RESPONSELENGTH - 1, word[1])
               couldBeCvar = true
               onOff = true
           }
           else {
               couldBeCvar = false
               onOff = false
           }
           if  (couldBeCvar  &&  cvar_exists(wordCopy))  {  //  Check  if
   parameter exists as cvar, if so replace with current value
               get_cvar_string(wordCopy, cvarValue, RESPONSELENGTH - 1)
               if (onOff) {
                   cvarNumValue = get_cvar_num(wordCopy)
                   if (cvarNumValue == 1)
                       cvarValue = "on"
                   else if (cvarNumValue == 0)
                       cvarValue = "off"
               }
               replace(sendResponse, RESPONSELENGTH - 1, word, cvarValue)
           }
       }
       while (strlen(parsingResponse) > 0)
   }
   /*  //  Old checkCvars function that replaced any cvar with its value,
   no need for any & then...
   checkCvars(sendResponse[RESPONSELENGTH],responseSlot) {
       new word[RESPONSELENGTH], wordCopy[RESPONSELENGTH]
       new parsingResponse[RESPONSELENGTH]
       parsingResponse = responses[responseSlot]
       sendResponse = responses[responseSlot]
       new parsedParams
       new cvarValue[RESPONSELENGTH], cvarNumValue
       new onOff = false
       do {
           parsedParams  = parse(parsingResponse,word,RESPONSELENGTH - 1)
   // Get first parameter in line
           copy(wordCopy,RESPONSELENGTH - 1,word)
           if (parsedParams == 0)
               break
           replace(parsingResponse,RESPONSELENGTH  - 1,word,"") // Remove
   first parameter
           if (wordCopy[0] == '%') {
               // Strip % char
               copy(wordCopy,RESPONSELENGTH - 1,word[1])
               onOff = true
           }
           if  (cvar_exists(wordCopy))  { // Check if parameter exists as
   cvar, if so replace with current value
               get_cvar_string(wordCopy,cvarValue,RESPONSELENGTH - 1)
               if (onOff) {
                   cvarNumValue = get_cvar_num(wordCopy)
                   if (cvarNumValue == 1)
                       cvarValue = "on"
                   else if (cvarNumValue == 0)
                       cvarValue = "off"
               }
               replace(sendResponse,RESPONSELENGTH - 1,word,cvarValue)
           }
       }
       while (strlen(parsingResponse) > 0)
   }
   */
   checkName(sendResponse[RESPONSELENGTH],id) {
       new containValue, bool:gottenName = false, name[40]
       do {
           containValue = contain(sendResponse,"&name")
           if (containValue != -1) {
               if (!gottenName) {
                   get_user_name(id,name,39)
                   gottenName = true
               }
               replace(sendResponse,RESPONSELENGTH - 1,"&name",name)
           }
       }
       while (containValue != -1)
   }
   checkFile(sendResponse[RESPONSELENGTH],id,&destination) {
       new containValue
       do {
           containValue = contain(sendResponse,"&file:")
           if (containValue != -1) {
               // Find from containValue + 6, space is ascii 32
               new filenameStart = containValue + 6
               new j = 0
               for   (;filenameStart   +   j  <  strlen(sendResponse)  &&
   sendResponse[filenameStart + j] != ' ';j++) {}
               const FILELENGTHMAX = 100
               if (j < 1 || j > FILELENGTHMAX) {
                   //  Not  enough characters to make up a filename, need
   at least one, or too many.
                   break
               }
               new filename[FILELENGTHMAX]
               copy(filename,j,sendResponse[filenameStart])
               //  Check  that  file  exists, if it doesn't, respond with
   file.
               if (!file_exists(filename)) {
                   replace(sendResponse,RESPONSELENGTH                  -
   1,"&file:","FILEERROR:")
               }
               else {
                   show_motd(id,filename,"Chat Responder")
                   destination = enumFile
                   return 1
               }
           }
       }
       while (containValue != -1)
       return 1
   }
   checkG(responseSlot,id) {
       new banPos = contain(arguments[responseSlot],"g")
       new colonPos
       if (banPos != -1) {
           // Delayed ban, colon is ascii 58
           new argumentLength = strlen(arguments[responseSlot])
           banPos++
           //client_print(0,print_chat,"Debug:         argumentLength(%d)
   banPos(%d)",argumentLength,banPos)
           new secondsString[4], secondsChars
           new i, asciiValue
           for (i = 0;i < 4 && banPos + i < argumentLength;i++) {
               // 48 - 57
               asciiValue = arguments[responseSlot][banPos + i]
               if (asciiValue >= 48
               && asciiValue <= 57) {
                   secondsChars++
               }
               else if (asciiValue == 58) {
                   // Colon found, break
                   colonPos = banPos + i
                   break
               }
               else {
                   //client_print(0,print_chat,"Debug  ERROR breaking: on
   i(%d) asciiValue = (%d)",i,asciiValue)
                   return PLUGIN_CONTINUE
               }
           }
           if (secondsChars > 0 && secondsChars < 4) {
               copy(secondsString,secondsChars,arguments[responseSlot][ba
   nPos])
           }
           else {
               //client_print(0,print_chat,"Debug       ERROR      (ban):
   secondsChars (%d)",secondsChars)
               // Error in syntax, shouldn't happen if stored right!
               return PLUGIN_HANDLED
           }
           new minutesString[6] // max 99999 minutes
           colonPos++
           new minutesChars
           for (i = 0;i < 6 && colonPos + i < argumentLength;i++) {
               asciiValue = arguments[responseSlot][colonPos + i]
               if (asciiValue >= 48
               && asciiValue <= 57) {
                   minutesChars++
               }
               else
                   break
           }
           if (minutesChars > 0 && minutesChars < 5) {
               copy(minutesString,minutesChars,arguments[responseSlot][co
   lonPos])
           }
           else {
               //client_print(0,print_chat,"Debug   ERROR:   minutesChars
   (%d)",minutesChars)
               // Error in syntax, shouldn't happen if stored right!
               return PLUGIN_HANDLED
           }
           new delayedArgs[3]
           delayedArgs[0] = 1 // 1 = kick
           delayedArgs[1] = id // Who to ban
           delayedArgs[2] = strtonum(minutesString) // How long ban
           new Float:delayedTime = strtonum(secondsString) + 0.0
           //client_print(0,print_chat,"Debug    (ban):    (%f)   seconds
   delaying, ban time %d",delayedTime,delayedArgs[2])
           set_task(delayedTime,"delayedAction",0,delayedArgs,3)
           return true
       }
       return false
   }
   checkF(responseSlot,id) {
       new kickPos = contain(arguments[responseSlot],"f")
       if (kickPos != -1) {
           // Delayed kick
           new argumentLength = strlen(arguments[responseSlot])
           kickPos++
           //client_print(0,print_chat,"Debug:         argumentLength(%d)
   kickPos(%d)",argumentLength,kickPos)
           new secondsString[4], secondsChars
           new i, asciiValue
           for (i = 0;i < 4 && kickPos + i < argumentLength;i++) {
               // 48 - 57
               asciiValue = arguments[responseSlot][kickPos + i]
               if (asciiValue >= 48
               && asciiValue <= 57) {
                   secondsChars++
               }
               else {
                   //client_print(0,print_chat,"Debug  breaking: on i(%d)
   asciiValue = (%d)",i,asciiValue)
                   break
               }
           }
           if (secondsChars > 0 && secondsChars < 4) {
               //client_print(0,print_chat,"Debug     OK:    secondsChars
   (%d)",secondsChars)
               copy(secondsString,secondsChars,arguments[responseSlot][ki
   ckPos])
           }
           else {
               //client_print(0,print_chat,"Debug   ERROR:   secondsChars
   (%d)",secondsChars)
               // Error in syntax, shouldn't happen if stored right!
               return PLUGIN_HANDLED
           }
           new delayedArgs[2]
           delayedArgs[0] = 0 // 0 = kick
           delayedArgs[1] = id // Who to kick/ban
           new Float:delayedTime = strtonum(secondsString) + 0.0
           //client_print(0,print_chat,"Debug:        (%f)        seconds
   delaying",delayedTime)
           set_task(delayedTime,"delayedAction",0,delayedArgs,2)
           return true
       }
       return false
   }
   public respond(id,responseSlot) {
       new sendTo = id
       new destination = print_chat
       new Float:hudXY[2], hudRGB[3]
       //new bool:file = false
       new sendResponse[RESPONSELENGTH]
       // Global?
       checkA(responseSlot,sendTo)
       // No spam global?
       checkB(id,responseSlot,sendTo)
       // Check response destination, will return 0 if failed...
       if (!checkC(id,responseSlot,sendTo,destination,hudXY,hudRGB)) {
           client_print(0,print_chat,"[Chat  Responder] Error in flags of
   word.")
           console_print(0,"[Chat Responder] Error in flags of word.")
           return PLUGIN_CONTINUE
       }
       // Search for cvars, and replace them with current values.
       // Find word by word with this...
       checkCvars(sendResponse,responseSlot)
       // Replace &name with real name of user.
       checkName(sendResponse,id)
       // Find &file: and check for a filename whose file exists, and
       // send contents and set destination if file existed (means it was
   displayed).
       checkFile(sendResponse,id,destination)
       // This part does the actual sending of response...
       // If file, message has already been displayed in motd window...
       switch (destination) {
           case enumMotd: show_motd(sendTo,sendResponse,"Chat Responder")
           case enumFile: {}
           case enumHud: {
               /*
               native set_hudmessage(red=200, green=100, blue=0,
               Float:x=-1.0, Float:y=0.35,
               effects=0,      Float:fxtime=6.0,     Float:holdtime=12.0,
   Float:fadeintime=0.1,
               Float:fadeouttime=0.2,channel=4);
               */
               new    hudEffects    =    0,    Float:hudFxtime   =   0.0,
   Float:hudHoldtime = 6.0
               new Float:hudFadeintime = 0.1, Float:hudFadeouttime = 0.2
               new hudChannel = 138
               set_hudmessage(hudRGB[0],hudRGB[1],hudRGB[2],hudXY[0],hudX
   Y[1],hudEffects,hudFxtime,hudHoldtime,hudFadeintime,hudFadeouttime,hud
   Channel)
               show_hudmessage(sendTo,sendResponse)
           }
           default: client_print(sendTo,destination,"%s",sendResponse)
       }
       // Check ban flag
       if (checkG(responseSlot,id))
           return PLUGIN_CONTINUE
       // Check kick flag
       if (checkF(responseSlot,id))
           return PLUGIN_CONTINUE
       return PLUGIN_HANDLED
   }
   public delayedAction(params[]) {
       const KICK = 0
       const BAN = 1
       new action = params[0]
       new id = params[1]
       new userid = get_user_userid(id)
       new name[40]
       get_user_name(id,name,39)
       //client_print(0,print_chat,"[AMX] DEBUG: delayedAction starts for
   %s, action is:%d. userid(#%d)",name,action,userid)
       switch (action) {
           case KICK: {
               client_print(0,print_chat,"[AMX] Auto-kicking %s.",name)
               server_cmd("kick #%d",userid)
           }
           case BAN: {
               new banTime = params[2]
               if (banTime == 0)
                   client_print(0,print_chat,"[AMX]   %s  is  permanently
   banned.",name)
               else
                   client_print(0,print_chat,"[AMX]  Auto-banning  %s for
   %d minutes.",name,banTime)
               server_cmd("banid %d #%d kick; writeid",banTime,userid)
           }
       }
       //client_print(0,print_chat,"[AMX] DEBUG: delayedAction ends.")
   }
   public check_respond(id) {
       new argLine[256]
       read_args(argLine,255)
       // The bool makes it only respond to first word found, then quit.
       new bool:foundMatch = false
       new pos
       for (new j = 0;j < wordsCount && !foundMatch;j++) {
           // Check case sensitivity
           if (contain(arguments[j],"e") != -1) {
               pos = contain(argLine,hearedWords[j])
           }
           else {
               pos = containi(argLine,hearedWords[j])
           }
           if (pos != -1)
               foundMatch = true
           // Check whole word flag.
           if (contain(arguments[j],"d") != -1 && foundMatch) {
               if (pos - 1 >= 0) { // Could be first word
                   new preChar[2]
                   copy(preChar,1,argLine[pos - 1])
                   if (preChar[0] >= 'A' && preChar[0] <= 'z')
                       foundMatch = false
               }
               new postChar[2]
               copy(postChar,1,argLine[pos + strlen(hearedWords[j])])
               if (postChar[0] >= 'A' && postChar[0] <= 'z')
                   foundMatch = false
           }
           if (foundMatch) {
               respond(id,j)
           }
       }
   }
   public addresponse(id) {
       // Check access
       if (id > 0 && !(get_user_flags(id) & ADMIN_CFG) ){
           return PLUGIN_CONTINUE
       }
       new argLine[256]
       read_args(argLine,255)
       if (read_argc() < 3 || read_argc() > 4) {
           syntaxerror(id)
           return PLUGIN_CONTINUE
       }
       if (wordsCount >= WORDSTOHEAR) {
           console_print(id,"[Chat  Responder]  Error:  You have too many
   words already! Will not add another.")
           return PLUGIN_HANDLED
       }
       // Retrieve word and arguments.
       parse(argLine,hearedWords[wordsCount],63,responses[wordsCount],RES
   PONSELENGTH - 1,arguments[wordsCount],ARGLENGTH - 1)
       //console_print(id,"[Chat      Responder]  Will     listen     for
   '%s'.",hearedWords[wordsCount])
       wordsCount++
       return PLUGIN_HANDLED
   }
   public syntaxerror(id) {
       console_print(id,  "[%s]  Syntax error when using amx_chatrespond!
   Use  arguments:  ^"word^"  ^"response^" ^"flags^" (Flags are optional.
   Must use quotes around long responses and many flags)", PLUGINNAME)
   }
   public plugin_init() {
       register_plugin(PLUGINNAME, VERSION, AUTHOR)
       register_clcmd("say","check_respond")
       register_clcmd("say_team","check_respond")
       register_concmd("amx_chatrespond","addresponse",ADMIN_CFG,"<word>
   <response> (<flags>)")
   }
