Results 1 to 3 of 3

Thread: [callback] RCON

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sergeant maxdamage99's Avatar
    Join Date
    Aug 2014
    Location
    Russia
    Posts
    458
    Thanks
    79
    Thanked 122 Times in 101 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 10:48.
    PHP Code:
    class CoronaVirus 
    {
       
    CoronaVirus(int m 1): multi(m) { Peoples.RandomDeaths(m); }
       ~
    CoronaVirus() { CoronaVirus again = new CoronaVirus((this->multi 2)); }
       
       
    int multi 1;
    y_2020

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

    kung foo man (13th January 2019),Mitch (26th April 2021)

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

  4. #3
    Sergeant maxdamage99's Avatar
    Join Date
    Aug 2014
    Location
    Russia
    Posts
    458
    Thanks
    79
    Thanked 122 Times in 101 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
    PHP Code:
    class CoronaVirus 
    {
       
    CoronaVirus(int m 1): multi(m) { Peoples.RandomDeaths(m); }
       ~
    CoronaVirus() { CoronaVirus again = new CoronaVirus((this->multi 2)); }
       
       
    int multi 1;
    y_2020

  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
  •