GM-x Banning

Сообщения
27
Реакции
6
Dear all,

When I'm banning someone I'm getting

PHP:
[GMX] 19:34:37: Request 3 finished with 400 status
When banning from aps_plmenu the user does not see info in console after the ban, yet the ban exists in the web part.

Is there any resolution on this?
 
Сообщения
2,491
Реакции
2,794
Помог
61 раз(а)
djbosma, GM-X punishments system is not finished yet. 400 error code says that bad request params. I will take a look on it on free time
 
Сообщения
27
Реакции
6
Nice to hear, It does ban from the web part and restricts server access, only again no console info shows up.

PS: Do you want me to report issues here or on github, since I'm testing it heavily my self.
 
Сообщения
27
Реакции
6
PS: Could you consider this in your notes?

https://dev-cs.ru/threads/10287/

Basically structuring the privileges on the menu as well cmd commands carried oud by admins.
Admins with fewer flags not being able to take action or two groups of governing admins.
 
Сообщения
27
Реакции
6
Update: The 400 status issue seems only when banning from the console (could be because IP is local).

The primary issue is not that it does not show the aps_ban_console.txt, checked the permissions, all 777, tried to run server as root, and did chmod -R 777 ./ still no change.

PS: In aps_log it add's time to player, and when banning for 1 min, after several bans it shows the total ammount including the previous ones, same applies for chat
 
Сообщения
2,491
Реакции
2,794
Помог
61 раз(а)
In aps_log it add's time to player, and when banning for 1 min, after several bans it shows the total ammount including the previous ones, same applies for chat
It is partially fixed on my local machine. I haven't a such more free time to finish it at this week. It seems it will be fixed at weekend. Not earlier.

The primary issue is not that it does not show the aps_ban_console.txt, checked the permissions, all 777, tried to run server as root, and did chmod -R 777 ./ still no change.
It needs only read permissions mutter. In most of cases is that client isn't finally connected and can't show console text. Try to increase timeout here.

The 400 status issue seems only when banning from the console (could be because IP is local).
Can you explain more details?

Admins with fewer flags not being able to take action or two groups of governing admins
The same. Provide more details pls.
 
Сообщения
27
Реакции
6
It needs only read permissions mutter. In most of cases is that client isn't finally connected and can't show console text. Try to increase timeout here.
Magically solved after making it 0.4 - which does not make sense in any way

Can you explain more details?
This happens when using aps_ban, aps_kick , aps_slay in the server console, using the console from the client game seems fine.

The same. Provide more details pls.
I've divided administrators into groups
Administrators with Flags:
PHP:
ADMIN_CVAR & ADMIN_CFG
are the ones overseeing, governing positions so to say.

PHP:
; g - Creator (ADMIN_CVAR)        - abcdefgklnopqrstuy
; h - CHIEF (ADMIN_CFG)            - abcdefhkly
; i - MEMBER (ADMIN_CHAT)        - bcdefikly
; j - SUPPORT (ADMIN_VOTE)        - bcefjkly
What I need is that no admins should be able to use commands against the group's Creator and Chief.

As well that only administrators with
PHP:
ADMIN_IMMUNITY
can take actions on other administrators with
PHP:
ADMIN_IMMUNITY
in findPlayersForMenu
9 Апр 2020
authemu.amxx
;Causses issues with Steam clients when "cid_Steam = 1" in reunion.cfg (with = 3 seams fine, except not loading admins from gmx)

When and if you have time, could you include this in gmx; Basically adding flags after playing a certain time on which extras could be mapped.

PHP:
#include <amxmodx>
#include <nvault>

new const Version[] = "0.4";

const DaySeconds = 86400;

enum VeteranLevels
{
    Player,
    Veteran,
    Pro
}
enum VeteranLevelData
{
    SecondsNeeded,
    VeteranFlags[ 26 ],
    VeteranBits
}
new VeteranInfo[ VeteranLevels ][ VeteranLevelData ] =
{
    { 0 , "" , 0 },
    { 60 , "l" , 0 },
    { 120 , "bklm" , 0 }
};

enum VeteranData
{
    SteamID[ 34 ],
    bool:IsAdmin,
    SecondsPlayed,
    VeteranLevels:VeteranLevel
}
new PlayerData[ MAX_PLAYERS + 1 ][ VeteranData ];

new g_Vault;

public plugin_init()
{
    register_plugin( "Veterans" , Version , "bugsy" );

    register_event( "HLTV" , "NewRound" , "a" , "1=0" , "2=0" );
   
    register_clcmd( "say !veteran" , "VeteranSay" );
    register_clcmd( "say_team !veteran" , "VeteranSay" );
   
    register_clcmd( "say !pro" , "ProSay" );
    register_clcmd( "say_team !pro" , "ProSay" );

    register_clcmd( "say !skill" , "SkillSay" );
    register_clcmd( "say_team !skill" , "SkillSay" );
}

public plugin_cfg()
{
    nvault_prune( ( g_Vault = nvault_open( "veteran_data" ) ) , 0 , get_systime() - ( DaySeconds * 2 ) );
   
    for ( new VeteranLevels:i = Veteran ; i < VeteranLevels ; i++ )
    {
        VeteranInfo[ i ][ VeteranBits ] = read_flags( VeteranInfo[ i ][ VeteranFlags ] );
    }
}

public plugin_end()
{
    nvault_close( g_Vault );
}

public client_authorized( id )
{
    new szData[ 11 ] , iTS;
   
    if ( !( PlayerData[ id ][ IsAdmin ] = bool:( !( get_user_flags( id ) & ADMIN_USER ) ) ) )
    {
        get_user_authid( id , PlayerData[ id ][ SteamID ] , charsmax( PlayerData[][ SteamID ] ) );
       
        if ( nvault_lookup( g_Vault , PlayerData[ id ][ SteamID ] , szData , charsmax( szData ) , iTS ) )
        {
            PlayerData[ id ][ SecondsPlayed ] = str_to_num( szData );
            SetVeteranLevel( id );
        }
    }
}

public client_disconnected( id )
{
    new szSeconds[ 11 ];
   
    if ( !PlayerData[ id ][ IsAdmin ] )
    {
        num_to_str( PlayerData[ id ][ SecondsPlayed ] + get_user_time( id ) , szSeconds , charsmax( szSeconds ) )
        nvault_set( g_Vault , PlayerData[ id ][ SteamID ] , szSeconds );
       
        PlayerData[ id ][ SecondsPlayed ] = 0;
        PlayerData[ id ][ VeteranLevel ] = Player;
    }
}

public VeteranSay( id )
{
    show_motd( id , "veteran_motd.txt" );
}

public ProSay( id )
{
    show_motd( id , "pro_motd.txt" );
}

public SkillSay( id )
{
    if ( PlayerData[ id ][ IsAdmin ] )
    {
        client_print( id  , print_chat , "* You are an admin" );
    }
    else
    {
        if ( PlayerData[ id  ][ VeteranLevel ] < Pro )
        {
            set_dhudmessage( 235, 151, 78, 0.38, 0.01, 0, 0.1, 4.0, 0.4, 0.8 );
           
            switch ( PlayerData[ id  ][ VeteranLevel ] )
            {
                case Player:
                {
                    show_dhudmessage( id  , "To become veteran play %d minutes. Type !veteran" , VeteranInfo[ Veteran ][ SecondsNeeded ] / 60 );
                }
                case Veteran:
                {
                    show_dhudmessage( id  , "You are a Veteran. To become Pro play for %d minutes. Type !pro" , VeteranInfo[ Pro ][ SecondsNeeded ] / 60 );
                }
            }
        }
        else
        {
            client_print( id  , print_chat , "* You are a Pro player" );
        }
    }
}

public NewRound()
{
    new iPlayers[ 32 ] , iNum , iPlayer;
   
    get_players( iPlayers , iNum , "ch" );
   
    for ( new i = 0 ; i < iNum ; i++ )
    {
        iPlayer = iPlayers[ i ];
       
        if ( !PlayerData[ iPlayer ][ IsAdmin ] )
        {
            SetVeteranLevel( iPlayer );
            SkillSay( iPlayer );
        }
    }
}

SetVeteranLevel( id )
{
    new VeteranLevels:vlLevel = Player;
   
    if ( PlayerData[ id ][ VeteranLevel ] < Pro )
    {
        for ( new VeteranLevels:i = Pro ; i >= Veteran ; i-- )
        {
            if ( PlayerData[ id ][ SecondsPlayed ] >= VeteranInfo[ i ][ SecondsNeeded ] )
            {
                vlLevel = i;
                remove_user_flags( id , ADMIN_USER );
                set_user_flags( id , ( get_user_flags( id ) | VeteranInfo[ i ][ VeteranBits ] ) );
                break;
            }
        }
       
        PlayerData[ id ][ VeteranLevel ] = vlLevel;
    }
}
 
Сообщения
27
Реакции
6
PS: Players online do not show up on web part "#online-1"
Some note to put all the way underneath everything on your To-Do: Paypal Integration for players to request unban, as well as purchasing flags.
 
Сообщения
27
Реакции
6
PS2: src/Core/Auth/Permissions.php
PHP:
on $flashMessage->addMessage('error', $lang->format('labels', 'login_redirect'));
Outputs directly {labels.login_redirect} onto user screen.
9 Апр 2020
PS3: Can't logout from the web part, does not redirect to the guest page, and I still have access.. logically I deleted the cache - no success. Tried login from other browser and got 403 error. I am using SSL, same issue with http
 
Сообщения
2,491
Реакции
2,794
Помог
61 раз(а)
djbosma, ohh. A lot bugreports. Thanks. As I said before I will try to fix them all but not today. Sorry for that
 
Сообщения
27
Реакции
6
Instead of opening a new thread, I am hereby making a paid request of integrating the Veteran & Pro code in UAC of GM-x
 
Сообщения
27
Реакции
6
When configuring the .htaccess to use https only it shows an 403 error log when I try to login.

This is the code used.
PHP:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]

RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
 

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу