
/* AMX Mod script. 
* 
* (c) Copyright 2002, Gymer
* This file is provided as is (no warranties). 
* 
*/ 


#include <amxmod> /* read this file to learn the functions */ 

public client_connect(id) 
{ 
   new filename[128] 
   get_cvar_string("amx_conmotd_file",filename,128) 

   if (file_exists(filename)) { 
      new line = 0 
      new message[192] 
      new txtsize = 0 

      while((line=read_file(filename,line,message,192,txtsize))!=0) 
         client_cmd(id,"echo %s",message) 
   } 

   return PLUGIN_CONTINUE 
} 

public plugin_init() 
{ 
   register_plugin("Console Motd","0.4","Gymer") 
   register_cvar("amx_conmotd_file","addons/amx/conmotd.txt") 

   return PLUGIN_CONTINUE 
}

