Page 4 of 4 FirstFirst ... 234
Results 31 to 34 of 34

Thread: [RELIABLE]Anti Bad Commands (overbright shit) Solution[REBORN ONLY]

  1. #31
    Developer RyBack's Avatar
    Join Date
    Apr 2014
    Location
    In Front of the screen
    Posts
    1,603

    Default

    So you want to allow picmip less than 2.8 or another value ?

  2. #32

    Default

    yes anything above 2.7 should be forbidden :P

    Im trying something on the server and therefor i need 2.8+ higher to be blocked :P

  3. #33
    Developer RyBack's Avatar
    Join Date
    Apr 2014
    Location
    In Front of the screen
    Posts
    1,603

    Default

    I've found another interesting fact about userinfo cvars that can dramatically improve this mod if I (or someone experienced enough) have time to modify it.
    Any cvar present in userinfo string sent by player every while can be removed from userinfo using this simple trick:
    stufftext "set test \\"

    On client side, mohaa prints to console:
    Code:
    Can't use keys or values with a \
    This is due to game behavior and network protocol and the nature of the userinfo string.
    The code responsible for it can be found at https://github.com/openmoh/openmohaa...shared.c#L1807
    I've tried ';' and '\"' but it wont pass to the client.
    so, instead of making all the cvars inside userinfo, we can check each cvar individually, then clear it.
    This will also overcome the userinfo max length reach issue as explained by Zappa.

    Simple example:

    $player stufftext "setu test test"
    wait 1
    iprintln ($player[1].userinfo);
    //userinfo:
    //\rate\30000\name\RyBack\dm_playergermanmodel\german_wehrmacht_officer\dm_playermodel\allied_sas\snaps\20\test\test
    wait 5
    $player stufftext "set test \\"
    wait 1
    iprintln ($player[1].userinfo);
    //userinfo:
    //\rate\30000\name\RyBack\dm_playergermanmodel\german_wehrmacht_officer\dm_playermodel\allied_sas\snaps\20

    So by tweaking above code, we can check for each cvar indvidually.

    Max userinfo length limit:
    To overcome this issue, we can scan player's current user info. If scanned userinfo doesn't contain wanted cvars, we try to remove cvars from player one by one until our wanted cvar is found.


    Note 1: The following cvars should NEVER be removed by the script:
    Code:
    \rate\30000\name\RyBack\dm_playergermanmodel\german_wehrmacht_officer\dm_playermodel\allied_sas\snaps\20
    Note 2:
    When player connects, user info is usually different (larger) at first, then it gets reduced to the cvars mentioned in note 1 + extra cvars set by "setu".
    example:
    Code:
    \ip\192.168.56.1:12204\challenge\1603275915\qport\19763\protocol\8\rate\30000\name\RyBack\dm_playergermanmodel\german_wehrmacht_officer\dm_playermodel\allied_sas\snaps\20
    basically it contains extra info that are not all cvars, which are marked bold-italic in above example.
    Last edited by RyBack; February 15th, 2019 at 03:52 PM.

  4. #34

    Default

    that's really useful info (for me at least)
    i've always wondered if there was a way to clean the .userinfo without restarting the game, and now we have one.
    this comes very handy to clean the mess some players get from the foresight mod


    I would also recommend that before sending any stufftext to change client cvars, you should change the client's config to use in your server first. so the unnamedsoldier.cfg will remain untouched if anything changes, like a bind for a third person mod or stuff like that

    $player[1] stufftext ("set config myServerName.cfg");

Posting Permissions

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