Raised This Month: $ Target: $400
 0% 

Changing szRejectReason in FM_ClientConnect


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
PRoSToTeM@
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 07-01-2014 , 12:46   Re: Changing szRejectReason in FM_ClientConnect
Reply With Quote #3

Arkshine ClientConnect is gamedll function, if it returns false (but fakemeta change "true" to "false") engine will reject client with szRejectReason (it isn't const string):
fakemeta code:
PHP Code:
#define SIMPLE_BOOL_HOOK_EDICT_CONSTSTRING_CONSTSTRING_STRING128(call) \
    
qboolean call (edict_t *e, const char *sza, const char *szbchar blah[128]) \
    { \
        
FM_ENG_HANDLE(FM_##call, (Engine[FM_##call].at(i),  (cell)ENTINDEX(e), sza, szb, blah)); \
        
RETURN_META_VALUE(mswi(lastFmRes),(int)mlCellResult 1); \
    } \ 
engine decompiled code:
PHP Code:
      snprintf(*(char **)arg0x80u"Connection rejected by game\n"v22);
      
v18 = *(_DWORD *)arg;
      
v17 v25;
      
v16 s;
      
v15 = (int)v26;
      if ( (
gEntityInterface.pfnClientConnect)(
             
v26,
             
s,
             
v25,
             *(
_DWORD *)arg) )
      {
        
MSG_WriteByte(&a19);
        
v7 Info_Serverinfo();
        
v14 v7;
        
v8 va("fullserverinfo \"%s\"\n"v7);
        
MSG_WriteString(&a1v8);
        
v9 svs.m_pClients;
        for ( 
0svs.m_iMaxClients; ++v9 )
        {
          if ( 
v9 == host_client || v9->m_fActive || v9->m_fConnected || v9->m_fSpawned )
            
SV_FullClientUpdate(v9, (int)&a1);
          ++
i;
        }
        
Netchan_CreateFragments(1, &host_client->m_netchan, &a1);
        
Netchan_FragSend(&host_client->m_netchan);
      }
      else
      {
        
MSG_WriteByte(&host_client->m_netchan.msg9);
        
v14 = *(_DWORD *)arg;
        
v6 va("echo %s\n", *(_DWORD *)arg);
        
MSG_WriteString(&host_client->m_netchan.msgv6);
        
v22 = *(char **)arg;
        
SV_DropClient(host_client0"Server refused connection because:  %s", *(_DWORD *)arg);
      } 
__________________
PRoSToTeM@ is offline
Send a message via ICQ to PRoSToTeM@ Send a message via Skype™ to PRoSToTeM@
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:11.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode