Results 1 to 6 of 6

Thread: Libcod "hide" functions??

  1. #1
    Sergeant maxdamage99's Avatar
    Join Date
    Aug 2014
    Location
    Russia
    Posts
    458
    Thanks
    79
    Thanked 122 Times in 101 Posts

    Libcod "hide" functions??

    I use it on my server libcod players and periodically produces errors: Unknown command (getinfo), Unknown command (getstatus), Unknown command (userinfo).
    What is this shit???!!
    if players use command "userinfo", players rename for Unnamed Player. !??!?!?!?!?!?!?!??
    Last edited by maxdamage99; 26th September 2015 at 15:23.

  2. #2
    Corporal voron00's Avatar
    Join Date
    Nov 2014
    Posts
    248
    Thanks
    64
    Thanked 216 Times in 116 Posts
    getinfo, getstatus are a "requests", and they have nothing to do with libcod. Maybe someone is trying some sort of ddos on your server? And /userinfo player command is a cod2 bug, present without libcod too.

  3. #3
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    just dont clientcommand() when you detect a userinfo command...
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  4. #4
    Sergeant maxdamage99's Avatar
    Join Date
    Aug 2014
    Location
    Russia
    Posts
    458
    Thanks
    79
    Thanked 122 Times in 101 Posts
    Iznogod, how to fix it?
    i make in CallbackPlayercomand:
    PHP Code:
    if(args[0]=="getstatus" || args[0]=="getinfo" || args[0]=="userinfo")
    {
    return;

    but it did not help(
    Last edited by maxdamage99; 30th September 2015 at 13:54.

  5. #5
    Sergeant maxdamage99's Avatar
    Join Date
    Aug 2014
    Location
    Russia
    Posts
    458
    Thanks
    79
    Thanked 122 Times in 101 Posts
    Voron00, KAPITAN O4EVIDNOST'

  6. #6
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    You could try if adding the following code to libcod works.

    functions.hpp (after SV_BeginDownload_f)
    PHP Code:
    typedef int (*SV_UserinfoChanged_f)(int a1);
    static 
    SV_UserinfoChanged_f_t SV_UserinfoChanged_f = (SV_UserinfoChanged_f_t)NULL
    libcod.cpp (after hook_SV_BeginDownload_f)
    PHP Code:
    void hook_SV_UserinfoChanged_fint a1 ) {
        
    char userinfo Cmd_Argv(1);
        if(
    strlen(userinfo) > 0) {
            
    SV_UserinfoChanged_f(a1);
        }

    (after addressToDownloadPointer)
    PHP Code:
            #if COD_VERSION == COD2_1_0
                
    int addressToUserInfoPointer = (int *)0x0817D9E4;
            
    #elif COD_VERSION == COD2_1_2
                
    int addressToUserInfoPointer = (int *)0x0817C9C4;
            
    #elif COD_VERSION == COD2_1_3
                
    int addressToUserInfoPointer = (int *)0x0815D564;
            
    #else
                #warning int *addressToUserInfoPointer = NULL;
                
    int *addressToUserInfoPointer NULL;
            
    #endif

            #if COD_VERSION == COD2_1_0 || COD_VERSION == COD2_1_2 || COD_VERSION == COD2_1_3
                
    SV_UserinfoChanged_f = (SV_UserinfoChanged_f_t)*addressToUserInfoPointer;
                *
    addressToUserInfoPointer = (int)hook_SV_UserinfoChanged_f;
            
    #endif 

  7. The Following 2 Users Say Thank You to Mitch For This Useful Post:

    kung foo man (21st October 2015),voron00 (20th October 2015)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •