Results 1 to 3 of 3

Thread: [callback] RCON

  1. #1
    Sergeant maxdamage99's Avatar
    Join Date
    Aug 2014
    Location
    Russia
    Posts
    374
    Thanks
    74
    Thanked 86 Times in 72 Posts

    [callback] RCON

    example:
    PHP Code:
    codecallback_remoteCommand(fromcommandpointerMsg)
    {
        
    parseCMD strtok(command" ");
        
    command parseCMD[2];
        
    value parseCMD[3];
        
        
    sfrom strtok(from":");
        
    ip sfrom[0];
        
    port sfrom[1];
        
        if (
    command == "rcon_password" || command == "killserver" || command == "quit")
            return;
        
        if ((
    command == "clientkick" || command == "banclient") && isDefined(value))
        {
            
    value int(value);
            if (
    value || value 63)
                return;
            
            
    /* some */
            
    player getPlayerByEntityID(value);
            if (
    isDefined(player))
                
    player iprintlnbold("bye bye :(");
        }
        
        
    doRcon(frompointerMsg);

    https://github.com/damage99/libcod/c...93138508d1ead9

    thank you very much to Voron00 for help!
    Last edited by maxdamage99; 13th January 2019 at 09:48.
    write shit code's

  2. The Following User Says Thank You to maxdamage99 For This Useful Post:

    kung foo man (13th January 2019)

  3. #2
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    1,955
    Thanks
    1,851
    Thanked 1,055 Times in 732 Posts
    Nice, is this rcon flood protected?
    timescale 0.01

  4. #3
    Sergeant maxdamage99's Avatar
    Join Date
    Aug 2014
    Location
    Russia
    Posts
    374
    Thanks
    74
    Thanked 86 Times in 72 Posts
    Quote Originally Posted by kung foo man View Post
    Nice, is this rcon flood protected?
    yeah
    https://github.com/damage99/libcod/b...ibcod.cpp#L971

    callback is after rateLimit()
    https://github.com/damage99/libcod/b...ibcod.cpp#L991
    write shit code's

  5. The Following User Says Thank You to maxdamage99 For This Useful Post:

    kung foo man (13th January 2019)

Posting Permissions

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