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

Gagged players (cmds allowed)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Magicher0ex
Member
Join Date: Dec 2019
Old 12-04-2021 , 06:18   Gagged players (cmds allowed)
Reply With Quote #1

Heyo, could anyone make else if message starts with "/"
I want gagged players to be albe of using commands which starts with / or if u able to make ignoregag.ini where in every row is a command which will be ignored. That's would be better

The whole code
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <regex>
#include <nvault>
#include <WPMGPrintChatColor>

#define LOG_GAGS

#define IP_PATTERN "([0-9]+.*[1-9][0-9]+.*[0-9]+.*[0-9])"
#define VERSION "1.1"

enum _:GagState
{
    
GAG_NOT,
    
GAG_YES,
    
GAG_EXPIRED
};

enum _:GagTimeData
{
    
DISPLAY[64],
    
MINUTES
};

new const 
g_GagTimes[][GagTimeData] =
{
    { 
"1 minute"},
    { 
"5 minutes"},
    { 
"10 minutes"10 },
    { 
"15 minutes"15 },
    { 
"20 minutes"20 },
    { 
"30 minutes"30 },
    { 
"1 hour"60 },
    { 
"2 hours"120 },
    { 
"6 hours"360 },
    { 
"1 day"1440 },
    { 
"1 week"10080 }
}

new const 
g_szVaultName[] = "gagsystem";
new const 
g_szChatPrefix[] = "[Gag]";
new const 
g_szGagSound[] = "buttons/blip1.wav";
new const 
g_szLineStyle[] = "======================================================";
#if defined LOG_GAGS
new const g_szLogFile[] = "addons/amxmodx/logs/gag_system.log";
#endif

new g_iNVaultHandleRegex:g_iRegexIPPatterng_iUnusedg_iHudChannelg_iThinkingEnt;
new 
g_iGagTimeIndex[33], g_iUserTarget[33], bool:g_blIsUserMuted[33];
new 
gp_blHudEnabledgp_blEnableGagExpireMsg;
new 
g_GagForwardg_UngagForward;

public 
plugin_init()
{
    
register_plugin("Gag System"VERSION"TheRedShoko @ AMXX-BG.info");
    
register_cvar("gagsystem_shoko"VERSIONFCVAR_SERVER|FCVAR_SPONLY|FCVAR_UNLOGGED);

    
register_clcmd("say""CommandSayExecuted");
    
register_clcmd("say_team""CommandSayExecuted");

    
g_GagForward CreateMultiForward("user_gagged"ET_IGNOREFP_CELL);
    
g_UngagForward CreateMultiForward("user_ungagged"ET_IGNOREFP_CELL);

    
gp_blHudEnabled register_cvar("gagsystem_showhud""0");
    
gp_blEnableGagExpireMsg register_cvar("gagsystem_printexpired""1");

    
#if AMXX_VERSION_NUM >= 183
    
hook_cvar_change(gp_blEnableGagExpireMsg"GagExpireCvarChanged");
    
#endif

    
register_forward(FM_Voice_SetClientListening"PlayerVoiceSpeak"0);
    
register_forward(FM_ClientUserInfoChanged"FwClientInfoChanged"0);
    
register_forward(FM_Think"FwEntityThink"1);

    
register_clcmd("amx_gag""CommandGag"ADMIN_SLAY"<name | #id | ip> <time> <reason>");
    
register_clcmd("amx_ungag""CommandUngag"ADMIN_SLAY"<name | #id | ip>");
    
register_clcmd("amx_gagmenu""CommandGagMenu"ADMIN_SLAY);
    
register_clcmd("amx_TYPE_GAGREASON""CommandGagReason"ADMIN_SLAY);
    
register_clcmd("amx_cleangags""CommandCleanDB"ADMIN_RCON);

    
#if AMXX_VERSION_NUM < 183
    
g_iRegexIPPattern regex_compile(IP_PATTERNg_iUnused""0);
    
#else
    
g_iRegexIPPattern regex_compile_ex(IP_PATTERN);
    
#endif

    
g_iNVaultHandle nvault_open(g_szVaultName);

    if (
g_iNVaultHandle == INVALID_HANDLE)
    {
        
set_fail_state("Failed to open NVault DB!");
    }

    
g_iHudChannel CreateHudSyncObj();
    
g_iThinkingEnt engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target"));
    
set_pev(g_iThinkingEntpev_nextthinkget_gametime() + 0.1);
}

public 
plugin_precache()
{
    
precache_sound(g_szGagSound);
}

public 
plugin_end()
{
    
nvault_close(g_iNVaultHandle);
    
regex_free(g_iRegexIPPattern);
}

public 
plugin_natives()
{
    
register_native("is_user_gagged""native_is_gagged");

    
register_native("gag_user""native_gag_user");
    
register_native("gag_user_byid""native_gag_id");

    
register_native("ungag_user""native_ungag_user");
    
register_native("ungag_user_byid""native_ungag_id");
}

public 
native_is_gagged()
{
    new 
id get_param(1);
    new 
bool:shouldPrint bool:get_param(2);

    if (!
is_user_connected(id))
    {
        
log_error(AMX_ERR_NATIVE"Invalid player ID %d"id);
        return 
false;
    }

    return 
IsUserGagged(idshouldPrint) == GAG_YES;
}

public 
native_gag_user()
{
    new 
szIP[16], szName[32], iDurationszReason[64], szAdmin[32];

    
get_string(1szNamecharsmax(szName));
    
get_string(2szIPcharsmax(szIP));
    
iDuration get_param(3);
    
get_string(4szReasoncharsmax(szReason));
    
get_string(5szAdmincharsmax(szAdmin));

    if (!
regex_match_c(szIPg_iRegexIPPatterng_iUnused))
    {
        
log_error(AMX_ERR_NATIVE"%s is not a valid IP Address!"szIP);
        return;
    }

    if (
iDuration 0
    {
        
log_error(AMX_ERR_NATIVE"Time cannot be negative!");
        return;
    }

    
GagUser(szNameszIPiDurationszReasonszAdmin);
}

public 
native_gag_id()
{
    new 
id;

    
id get_param(1);

    if (!
is_user_connected(id))
    {
        
log_error(AMX_ERR_NATIVE"Invalid player ID %d"id);
        return;
    }

    new 
szName[32], szIP[16], szReason[64], iDurationszAdmin[32];
    
iDuration get_param(2);

    if (
iDuration 0
    {
        
log_error(AMX_ERR_NATIVE"Time cannot be negative!");
        return;
    }

    
get_string(3szReasoncharsmax(szReason));
    
get_string(4szAdmincharsmax(szAdmin));

    
get_user_name(idszNamecharsmax(szName));
    
get_user_ip(idszIPcharsmax(szIP), 1);

    
GagUser(szNameszIPiDurationszReasonszAdmin);
}

public 
native_ungag_user()
{
    new 
szIP[16], szName[32], szAdmin[32];

    
get_string(1szNamecharsmax(szName));
    
get_string(2szIPcharsmax(szIP));
    
get_string(3szAdmincharsmax(szAdmin));

    if (!
regex_match_c(szIPg_iRegexIPPatterng_iUnused))
    {
        
log_error(AMX_ERR_NATIVE"%s is not a valid IP Address!"szIP);
        return;
    }

    
UngagUser(szNameszIPszAdmin);
}

public 
native_ungag_id()
{
    new 
id;

    
id get_param(1);

    if (!
is_user_connected(id))
    {
        
log_error(AMX_ERR_NATIVE"Invalid player ID %d"id);
        return;
    }

    new 
szAdmin[32], szName[32], szIP[16];

    
get_string(2szAdmincharsmax(szAdmin));

    
get_user_name(idszNamecharsmax(szName));
    
get_user_ip(idszIPcharsmax(szIP), 1);

    
UngagUser(szNameszIPszAdmin);
}

public 
client_putinserver(id)
{
    
g_blIsUserMuted[id] = IsUserGagged(idfalse) == GAG_YES;
}

#if AMXX_VERSION_NUM >= 183
public GagExpireCvarChanged(pcvarszOldValue[], szNewValue[])
{
    if (
str_to_num(szNewValue) == 1)
    {
        
set_pev(g_iThinkingEntpev_nextthinkget_gametime() + 1.0);
    }
}
#endif

public PlayerVoiceSpeak(receiverid)
{
    if (
receiver == id || !is_user_connected(id))
    {
        return 
FMRES_IGNORED;
    }

    if (
g_blIsUserMuted[id])
    {
        
engfunc(EngFunc_SetClientListeningreceiveridfalse);
        return 
FMRES_SUPERCEDE;
    }

    return 
FMRES_IGNORED;
}

public 
FwClientInfoChanged(id)
{
    if (!
is_user_connected(id))
    {
        return 
FMRES_IGNORED;
    }

    new 
szOldName[32], szNewName[32];
    
get_user_name(idszOldNamecharsmax(szOldName));
    
get_user_info(id"name"szNewNamecharsmax(szNewName));

    if (!
equal(szOldNameszNewName) && szOldName[0] != EOS && IsUserGagged(idfalse) == GAG_YES)
    {
        
set_user_info(id"name"szOldName);
        return 
FMRES_HANDLED;
    }

    return 
FMRES_IGNORED;
}

public 
FwEntityThink(iEnt)
{
    if (
iEnt != g_iThinkingEnt || !get_pcvar_num(gp_blEnableGagExpireMsg))
    {
        return;
    }

    static 
iPlayers[32], iPlayersNumid;
    
get_players(iPlayersiPlayersNum);

    for (new 
0iPlayersNumi++)
    {
        
id iPlayers[i];

        if (
IsUserGagged(idfalse) == GAG_EXPIRED)
        {
            static 
szName[32];
            
get_user_name(idszNamecharsmax(szName));

            
PrintChatColor(0PRINT_COLOR_PLAYERTEAM"!g%s!y !t%s!y is no longer gagged!"g_szChatPrefixszName);

            if (
get_pcvar_num(gp_blHudEnabled))
            {
                
set_hudmessage(255000.050.30);
                
ShowSyncHudMsg(0g_iHudChannel"%s^n%s gag has expired^n%s"g_szLineStyleszNameg_szLineStyle);
            }
        }
    }

    
set_pev(iEntpev_nextthinkget_gametime() + 10.0);
}

public 
CommandSayExecuted(id)
{
    if (
IsUserGagged(id) == GAG_YES)
    {
        return 
PLUGIN_HANDLED;
    }

    return 
PLUGIN_CONTINUE;
}

public 
CommandGag(idiLeveliCmdId)
{
    if (!
cmd_access(idiLeveliCmdId4))
    {
        return 
PLUGIN_HANDLED;
    }

    new 
szTarget[33], szTargetIP[16], szTime[8], szReason[64];
    
read_argv(1szTargetcharsmax(szTarget));

    if (!
regex_match_c(szTargetg_iRegexIPPatterng_iUnused))
    {
        new 
iTarget cmd_target(idszTarget);

        if (!
iTarget)
        {
            return 
PLUGIN_HANDLED;
        }

        
get_user_name(iTargetszTargetcharsmax(szTarget));
        
get_user_ip(iTargetszTargetIPcharsmax(szTargetIP), 1);
        
g_blIsUserMuted[iTarget] = true;
    }
    else
    {
        
copy(szTargetIPcharsmax(szTargetIP), szTarget);
    }

    
read_argv(2szTimecharsmax(szTime));
    
read_argv(3szReasoncharsmax(szReason));
    new 
iTime str_to_num(szTime);

    new 
szAdmin[32];
    
get_user_name(idszAdmincharsmax(szAdmin));

    
console_print(id"%s"GagUser(szTargetszTargetIPiTimeszReasonszAdmin));

    return 
PLUGIN_HANDLED;
}

public 
CommandUngag(idiLeveliCmdId)
{
    if (!
cmd_access(idiLeveliCmdId2))
    {
        return 
PLUGIN_HANDLED;
    }

    new 
szTarget[32], szTargetIP[16];
    
read_argv(1szTargetcharsmax(szTarget));

    if (!
regex_match_c(szTargetg_iRegexIPPatterng_iUnused))
    {
        new 
iTarget cmd_target(idszTargetCMDTARGET_ALLOW_SELF);

        if (!
iTarget)
        {
            return 
PLUGIN_HANDLED;
        }

        
get_user_name(iTargetszTargetcharsmax(szTarget));
        
get_user_ip(iTargetszTargetIPcharsmax(szTargetIP), 1);
    }
    else
    {
        
copy(szTargetIPcharsmax(szTargetIP), szTarget);
    }

    new 
szAdminName[32];
    
get_user_name(idszAdminNamecharsmax(szAdminName));

    
console_print(id"%s"UngagUser(szTargetszTargetIPszAdminName));

    return 
PLUGIN_HANDLED;
}

public 
CommandGagMenu(idiLeveliCmdId)
{
    if (!
cmd_access(idiLeveliCmdId1))
    {
        return 
PLUGIN_HANDLED;
    }

    
g_iGagTimeIndex[id] = 0;
    
g_iUserTarget[id] = 0;
    
ShowGagMenu(id);

    return 
PLUGIN_HANDLED;
}

ShowGagMenu(idpage 0)
{
    new 
iMenu menu_create("\rGag Menu""GagMenuHandler");

    new 
iPlayers[32], iPlayersNum;
    
get_players(iPlayersiPlayersNum);

    new 
szItem[64], szName[32], szIndex[8];
    new 
iPlayer;

    for (new 
0iPlayersNumi++)
    {
        
iPlayer iPlayers[i];

        if (
== 0)
        {
            
formatex(szItemcharsmax(szItem), "\yGag length \r[\w%s\r]^n"g_GagTimes[g_iGagTimeIndex[id]][DISPLAY]);
            
menu_additem(iMenuszItem"time");
        }

        
get_user_name(iPlayerszNamecharsmax(szName));
        
num_to_str(iPlayerszIndexcharsmax(szIndex));

        if (
IsUserGagged(iPlayerfalse))
        {
            
formatex(szItemcharsmax(szItem), "\y%s \r[Gagged]"szName);
        }
        else if (
get_user_flags(iPlayer) & ADMIN_IMMUNITY)
        {
            
formatex(szItemcharsmax(szItem), "\d%s \y[Immunity]"szName);
        }
        else
        {
            
copy(szItemcharsmax(szItem), szName);
        }

        
menu_additem(iMenuszItemszIndex);
    }

    
menu_display(idiMenupage);
}

public 
GagMenuHandler(idiMenuItem)
{
    if (
Item == MENU_EXIT)
    {
        
menu_destroy(iMenu);
        return;
    }

    new 
szInfo[8], iTemp;
    
menu_item_getinfo(iMenuItemiTempszInfocharsmax(szInfo), __iTemp);

    if (
equal(szInfo"time"))
    {
        ++
g_iGagTimeIndex[id];
        
g_iGagTimeIndex[id] %= sizeof g_GagTimes;
        
menu_destroy(iMenu);
        
ShowGagMenu(idItem 7);
        return;
    }

    new 
iTarget str_to_num(szInfo);

    if (
IsUserGagged(iTargetfalse) == GAG_YES)
    {
        new 
szName[32], szIP[16], szAdminName[32];
        
get_user_name(idszAdminNamecharsmax(szAdminName));
        
get_user_name(iTargetszNamecharsmax(szName));
        
get_user_ip(iTargetszIPcharsmax(szIP), 1);

        
UngagUser(szNameszIPszAdminName);

        
menu_destroy(iMenu);
        return;
    }

    if (
get_user_flags(iTarget) & ADMIN_IMMUNITY)
    {
        
menu_destroy(iMenu);
        return;
    }

    
g_iUserTarget[id] = iTarget;
    
client_cmd(id"messagemode amx_TYPE_GAGREASON");

    
menu_destroy(iMenu);
}

public 
CommandGagReason(idiLeveliCmdId)
{
    if (!
cmd_access(idiLeveliCmdId2) || !is_user_connected(g_iUserTarget[id]))
    {
        return 
PLUGIN_HANDLED;
    }

    new 
szReason[64], szName[32], szIP[16], szAdminName[32];
    
read_argv(1szReasoncharsmax(szReason));

    
get_user_name(idszAdminNamecharsmax(szAdminName));

    
get_user_name(g_iUserTarget[id], szNamecharsmax(szName));
    
get_user_ip(g_iUserTarget[id], szIPcharsmax(szIP), 1);

    
GagUser(szNameszIPg_GagTimes[g_iGagTimeIndex[id]][MINUTES], szReasonszAdminName);
    
g_blIsUserMuted[g_iUserTarget[id]] = true;

    
ShowGagMenu(id);

    return 
PLUGIN_HANDLED;
}

public 
CommandCleanDB(idiLeveliCmdId)
{
    if (!
cmd_access(idiLeveliCmdId1))
    {
        return 
PLUGIN_HANDLED;
    }

    
nvault_prune(g_iNVaultHandle0get_systime());

    
console_print(id"Database has been cleaned.");

    return 
PLUGIN_HANDLED;
}

UngagUser(szName[], szIP[], szAdmin[])
{
    new 
szResult[64], szTemp[3];

    if (!
nvault_get(g_iNVaultHandleszIPszTempcharsmax(szTemp)))
    {
        
formatex(szResultcharsmax(szResult), "User with IP %s not found."szIP);
        return 
szResult;
    }

    
nvault_remove(g_iNVaultHandleszIP);

    if (!
equal(szNameszIP))
    {
        new 
iTarget cmd_target(0szName0);

        
g_blIsUserMuted[iTarget] = false;

        
PrintChatColor(iTargetPRINT_COLOR_PLAYERTEAM"!g%s!y You have been ungagged by !t%s"g_szChatPrefixszAdmin);

        
PrintChatColor(0PRINT_COLOR_PLAYERTEAM"!g%s !t%s!y has been ungagged by !t%s"g_szChatPrefixszNameszAdmin);

        if (
get_pcvar_num(gp_blHudEnabled))
        {
            
set_hudmessage(255000.050.30);
            
ShowSyncHudMsg(0g_iHudChannel"%s^n%s has been ungagged by %s^n%s"g_szLineStyleszNameszAdming_szLineStyle);
        }
    }

    new 
id find_player("d"szIP);
    if (
id != 0)
    {
        
ExecuteForward(g_UngagForwardg_iUnusedid);
    }

    
#if defined LOG_GAGS
    
log_to_file(g_szLogFile"[UNGAG] ADMIN: %s | TARGET_NAME: %s [IP: %s]"szAdminszNameszIP);
    
#endif
    
copy(szResultcharsmax(szResult), "Player has been ungagged");
    return 
szResult;
}

GagUser(szName[], szIP[], iDurationszReason[], szAdminName[])
{
    new 
iExpireTime iDuration != get_systime() + (iDuration 60) : 0;

    new 
szResult[64];

    if (
nvault_get(g_iNVaultHandleszIPszResultcharsmax(szResult)))
    {
        
copy(szResultcharsmax(szResult), "Player is already gagged.");
        return 
szResult;
    }

    new 
szValue[512];
    
formatex(szValuecharsmax(szValue), "^"%s^"#^"%s^"#%d#^"%s^""szNameszReasoniExpireTimeszAdminName);

    
set_hudmessage(025500.050.30);

    if (
iExpireTime == 0)
    {
        
PrintChatColor(0PRINT_COLOR_PLAYERTEAM"!g%s !t%s!y has been gagged by !t%s!y | Reason: !t%s !y| Gag expires: !tNever"g_szChatPrefixszNameszAdminNameszReason);
        
        if (
get_pcvar_num(gp_blHudEnabled))
        {
            
ShowSyncHudMsg(0g_iHudChannel"%s^n%s has been gagged by %s^nExpires never^nReason: %s^n%s"g_szLineStyleszNameszAdminNameszReasong_szLineStyle);
        }
    }
    else
    {
        
PrintChatColor(0PRINT_COLOR_PLAYERTEAM"!g%s !t%s!y has been gagged by !t%s!y | Reason: !t%s !y| Gag expires: !t%s"g_szChatPrefixszNameszAdminNameszReasonGetTimeAsString(iDuration 60));

        if (
get_pcvar_num(gp_blHudEnabled))
        {
            
ShowSyncHudMsg(0g_iHudChannel"%s^n%s has been gagged by %s^nExpires in %s^nReason: %s^n%s"g_szLineStyleszNameszAdminNameGetTimeAsString(iDuration 60), szReasong_szLineStyle);
        }
    }

    
emit_sound(0CHAN_AUTOg_szGagSound1.0ATTN_NORMSND_SPAWNINGPITCH_NORM);

    
#if defined LOG_GAGS
    
log_to_file(g_szLogFile"ADMIN: %s | PLAYER: %s [IP: %s] | REASON: %s | TIME: %s"szAdminNameszNameszIPszReasonGetTimeAsString(iDuration 60));
    
#endif

    
new id find_player("d"szIP);

    if (
id != 0)
    {
        
ExecuteForward(g_GagForwardg_iUnusedid);
    }

    
nvault_set(g_iNVaultHandleszIPszValue);

    
copy(szResultcharsmax(szResult), "Player successfully gagged.");
    return 
szResult;
}

IsUserGagged(idbool:print = true)
{
    new 
szIP[16], szVaultData[512];
    
get_user_ip(idszIPcharsmax(szIP), 1);

    if (!
nvault_get(g_iNVaultHandleszIPszVaultDatacharsmax(szVaultData)))
    {
        
g_blIsUserMuted[id] = false;
        return 
GAG_NOT;
    }

    new 
szGaggedName[32], szReason[64], szExpireDate[32], szAdminName[32];
    
replace_all(szVaultDatacharsmax(szVaultData), "#"" ");
    
parse(szVaultDataszGaggedNamecharsmax(szGaggedName), szReasoncharsmax(szReason), szExpireDatecharsmax(szExpireDate), szAdminNamecharsmax(szAdminName));

    new 
iExpireTime str_to_num(szExpireDate);

    if (
get_systime() < iExpireTime || iExpireTime == 0)
    {
        if (print)
        {
            if (
iExpireTime == 0)
            {
                
PrintChatColor(idPRINT_COLOR_PLAYERTEAM"!g%s !yYou are gagged! | Expires: !tnever!y."g_szChatPrefix);
            }
            else
            {
                
PrintChatColor(idPRINT_COLOR_PLAYERTEAM"!g%s!y You are gagged! | Expires: !t%s"g_szChatPrefixGetTimeAsString(iExpireTime get_systime()));
            }

            
PrintChatColor(idPRINT_COLOR_PLAYERTEAM"!g%s!y !t%s!y gagged !t%s!y | Reason: !t%s"g_szChatPrefixszAdminNameszGaggedNameszReason);
        }

        
g_blIsUserMuted[id] = true;

        return 
GAG_YES;
    }

    
g_blIsUserMuted[id] = false;
    
ExecuteForward(g_UngagForwardg_iUnusedid);

    
nvault_remove(g_iNVaultHandleszIP);

    return 
GAG_EXPIRED;
}

GetTimeAsString(seconds)
{
    new 
iYears seconds 31536000;
    
seconds %= 31536000;

    new 
iMonths seconds 2592000;
    
seconds %= 2592000;

    new 
iWeeks seconds 604800;
    
seconds %= 604800;

    new 
iDays seconds 86400;
    
seconds %= 86400;

    new 
iHours seconds 3600;
    
seconds %= 3600;

    new 
iMinutes seconds 60;
    
seconds %= 60;

    new 
szResult[256];

    if (
iYears)
    {
        
format(szResultcharsmax(szResult), "%s%d Year%s "szResultiYearsiYears == "" "s");
    }

    if (
iMonths)
    {
        
format(szResultcharsmax(szResult), "%s%d Month%s "szResultiMonthsiMonths == "" "s");
    }

    if (
iWeeks)
    {
        
format(szResultcharsmax(szResult), "%s%d Week%s "szResultiWeeksiWeeks == "" "s");
    }

    if (
iDays)
    {
        
format(szResultcharsmax(szResult), "%s%d Day%s "szResultiDaysiDays == "" "s");
    }

    if (
iHours)
    {
        
format(szResultcharsmax(szResult), "%s%d Hour%s "szResultiHoursiHours == "" "s");
    }

    if (
iMinutes)
    {
        
format(szResultcharsmax(szResult), "%s%d Minute%s "szResultiMinutesiMinutes == "" "s");
    }

    if (
seconds)
    {
        
format(szResultcharsmax(szResult), "%s%d Second%s"szResultsecondsseconds == "" "s");
    }

    return 
szResult;

The part which I think need to be edited:
PHP Code:
public CommandSayExecuted(id)
{
    if (
IsUserGagged(id) == GAG_YES)
    {
        return 
PLUGIN_HANDLED;
    }

    return 
PLUGIN_CONTINUE;

Magicher0ex is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 12-04-2021 , 07:34   Re: Gagged players (cmds allowed)
Reply With Quote #2

What is stopping your spammers from prefacing all the spam with, " / ", ?
__________________
DJEarthQuake is offline
Magicher0ex
Member
Join Date: Dec 2019
Old 12-04-2021 , 09:07   Re: Gagged players (cmds allowed)
Reply With Quote #3

Quote:
Originally Posted by DJEarthQuake View Post
What is stopping your spammers from prefacing all the spam with, " / ", ?
"/" is invisible sign in the chat when it's in the beginning.
So players can't see player message if the message starts with "/"
I want to define the first sign
Magicher0ex is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 12-04-2021 , 09:21   Re: Gagged players (cmds allowed)
Reply With Quote #4

just move the gag plugin to the bottom of the plugins.ini list
jimaway is offline
Magicher0ex
Member
Join Date: Dec 2019
Old 12-04-2021 , 09:30   Re: Gagged players (cmds allowed)
Reply With Quote #5

Quote:
Originally Posted by jimaway View Post
just move the gag plugin to the bottom of the plugins.ini list
Damn, your total right, but warning messages still will reply on your cmds messages. But works well
Magicher0ex is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 12-04-2021 , 09:32   Re: Gagged players (cmds allowed)
Reply With Quote #6

They can exploit it though. That is what I was getting at as an admin to admin not snippet donor. All things programming. This script you re-displayed from other thread further promotes non-steam code by redistributing it. What good is validating IP address and not basing this on steamid please? That can take out an entire cyber cafe of innocents with many steamids yet 1 IP. A plugin disabling itself over a damn near impossible for human to manually edit vault file over an ini file? A plugin that does not fail but instead makes a new ini file if one is not found. The stock from Brad I used puts the information into many languages without putting people out having to do work on the translation threads. What good is a menu when user is not online, the vault is corrupted and plugin is in a failed state and won't even open the menu at all? Before I double the size of my gag plugin on a menu there is a way to add them faster if willing to work with me and talk on other thread. I also need help. That leakage could be a bug. I need advice as well.
__________________

Last edited by DJEarthQuake; 12-05-2021 at 05:47. Reason: typo
DJEarthQuake is offline
Reply



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 01:59.


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