Public paste
Undefined
By: Guest | Date: Nov 2 2009 14:48 | Format: None | Expires: never | Size: 752 B | Hits: 663

  1. #define CALL_PLUGINS(name,params)
  2.         for(unsigned int i = 0;i<Plugins.Plugins.size();i++)
  3.         if(Plugins.Plugins[i].gFunctionTable.##name)
  4.         Plugins.Plugins[i].gFunctionTable.##name(##params)
  5.  
  6. //Hooked pfnClientConnect() (handle player adds)
  7. qboolean ta_pfnClientConnect( edict_t *pEntity, const char *pszName, const char *pszAddress, char szRejectReason[ 128 ] )
  8. {
  9.  
  10.         for(unsigned int i = 0;i<Plugins.Plugins.size();i++)
  11.                 if(Plugins.Plugins[i].gFunctionTable.pfnClientConnect)
  12.                         Plugins.Plugins[i].gFunctionTable.pfnClientConnect(pEntity,pszName,pszAddress,szRejectReason);
  13.  
  14.         CALL_PLUGINS(pfnClientConnect,pEntity,pszName,pszAddress,szRejectReason);
  15.  
  16.         return gFunctionTable.pfnClientConnect(pEntity,pszName,pszAddress,szRejectReason);
  17. }