Raised This Month: $12 Target: $400
 3% 

Increased the cvar name size from 23 to 31


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 01-04-2017 , 14:43   Increased the cvar name size from 23 to 31
Reply With Quote #1

Increased the cvar name size from 23 to 31

Originally posted on: https://github.com/alliedmodders/amxmodx/pull/396

The current column size for the cvars names used when you do the `amxx cvars` commands is 23.
I propose some alternatives as increase it 8 chars and add a after list within the cut values, for cvars name and values bigger than 23.
Code:
         [ 93] gal_vote_minplayers_mapfile      addons
         [ 94] gal_vote_midplayers_mapfile      addons
         [ 95] gal_whitelist_minplayers         1
         [ 96] gal_whitelist_nom_block          1
         [ 97] gal_whitelist_block_out          0
         [ 98] gal_vote_whitelist_mapfile       addons
         [ 99] gal_vote_uniqueprefixes          0
         [100] gal_nom_playerallowance          2
         [101] gal_nom_cleaning                 0
         [102] gal_nom_mapfile                  *
         [103] gal_nom_prefixes                 1
         [104] gal_nom_qtyused                  0
         [105] gal_unnominate_disconnected      0
         [106] gal_vote_announcechoice          1
         [107] gal_emptyserver_wait             0
         [108] gal_emptyserver_change           0
         [109] gal_emptyserver_mapfile          addons
         [110] gal_sounds_mute                  0
vs
Code:
         [ 93] gal_nom_minplayers_cont  0
         [ 94] gal_vote_minplayers_map  addons
         [ 95] gal_vote_midplayers_map  addons
         [ 96] gal_whitelist_minplayer  1
         [ 97] gal_whitelist_nom_block  1
         [ 98] gal_whitelist_block_out  0
         [ 99] gal_vote_whitelist_mapf  addons
         [100] gal_vote_uniqueprefixes  0
         [101] gal_nom_playerallowance  2
         [102] gal_nom_cleaning         0
         [103] gal_nom_mapfile          *
         [104] gal_nom_prefixes         1
         [105] gal_nom_qtyused          0
         [106] gal_unnominate_disconne  0
         [107] gal_vote_announcechoice  1
         [108] gal_emptyserver_wait     0
         [109] gal_emptyserver_change   0
         [110] gal_emptyserver_mapfile  addons
It did it because the command `amxx cvars` are cutting my cvars names too much.
At the firs moment I tough the cvars max name allowed were 31 chars, as the maximum
variable name length in pawn. However after a simple test I noticed it was not true and the
maximum size is well bigger than this.

Therefore increasing the size from 23 to 31 (+8 chars) just because there is a plugins using
cvars named about 25 chars does not seems the path to go to fix the real output put problem.
Moreover I tough about creating another list (not table), after complete table, only within those
extraordinary plugin's cvars.

On it would be just put all the information cut from the first table. For example, if the cvar A1, was
cut on its name or value's contents, we just output it fully with no cuts after the table.

Code:
      Managed cvars:
             NAME                     VALUE                    PLUGIN             BOUND    HOOKED   BOUNDED 
       - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
       [  1] Aaaaaaaaaaaaaaaaaaaaaaa  valueeeeeeeeeeeeeeeeeee  pluinnnnnnnnnnnnn  no       no       no      
       [  2] Aaaaaaaaaaa2             valueeeeeeeeeeeeeeeeeee  pluinnnnnnnnnnnnn  no       no       no      
       [  2] Aaaaaaaaaaaaaaaaaaa3     valueeeeeeeeeeeeeeeeeee  pluinnnnnnnnnnnnn  no       no       no      
      ...
Code:
      Cutted values:
            NAME - VALUE - PLUGIN
      [  1] Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1 - valueeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee - pluinnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn1
      [  2] Aaaaaaaaaaa2 - valueeeeeeeeeeeeeeeeeeeeeeee - pluinnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn2
      [  3] Aaaaaaaaaaaaaaaaaaa3 - valueeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee - pluinnnnnnnnnnnnnnnnnnnnnn3
What do you think? Is plausible increase the cvars name size from 23 to 31?
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective

Last edited by addons_zz; 01-04-2017 at 14:46.
addons_zz is offline
Reply


Thread Tools
Display Modes

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 10:49.


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