use Plugin_Stop instead of Plugin_Handled in command-listener

This commit is contained in:
rtldg 2022-01-21 10:30:39 +00:00
parent 0000000fbb
commit 0000000868
3 changed files with 11 additions and 11 deletions

View File

@ -123,7 +123,7 @@ public Action Command_Cheats(int client, const char[] command, int args)
if (!(GetUserFlagBits(client) & ADMFLAG_ROOT)) if (!(GetUserFlagBits(client) & ADMFLAG_ROOT))
{ {
return Plugin_Handled; return Plugin_Stop;
} }
return Plugin_Continue; return Plugin_Continue;

View File

@ -726,7 +726,7 @@ public Action Command_Spectate(int client, const char[] command, int args)
} }
Command_Spec(client, 0); Command_Spec(client, 0);
return Plugin_Handled; return Plugin_Stop;
} }
public int ScoreboardSort(int index1, int index2, Handle array, Handle hndl) public int ScoreboardSort(int index1, int index2, Handle array, Handle hndl)
@ -811,7 +811,7 @@ public Action Command_SpecNextPrev(int client, const char[] command, int args)
{ {
SetEntPropEnt(client, Prop_Send, "m_hObserverTarget", players.Get(0)); SetEntPropEnt(client, Prop_Send, "m_hObserverTarget", players.Get(0));
delete players; delete players;
return Plugin_Handled; return Plugin_Stop;
} }
int pos = players.FindValue(current_target); int pos = players.FindValue(current_target);
@ -835,7 +835,7 @@ public Action Command_SpecNextPrev(int client, const char[] command, int args)
SetEntPropEnt(client, Prop_Send, "m_hObserverTarget", players.Get(pos)); SetEntPropEnt(client, Prop_Send, "m_hObserverTarget", players.Get(pos));
delete players; delete players;
return Plugin_Handled; return Plugin_Stop;
} }
public Action Command_Jointeam(int client, const char[] command, int args) public Action Command_Jointeam(int client, const char[] command, int args)
@ -875,7 +875,7 @@ public Action Command_Jointeam(int client, const char[] command, int args)
CS_RespawnPlayer(client); CS_RespawnPlayer(client);
} }
return Plugin_Handled; return Plugin_Stop;
} }
return Plugin_Continue; return Plugin_Continue;
@ -919,7 +919,7 @@ public Action Command_Radio(int client, const char[] command, int args)
{ {
if(gCV_DisableRadio.BoolValue) if(gCV_DisableRadio.BoolValue)
{ {
return Plugin_Handled; return Plugin_Stop;
} }
return Plugin_Continue; return Plugin_Continue;
@ -1969,12 +1969,12 @@ public Action CommandListener_Noclip(int client, const char[] command, int args)
{ {
if(!IsValidClient(client, true)) if(!IsValidClient(client, true))
{ {
return Plugin_Handled; return Plugin_Stop;
} }
if (gI_LastNoclipTick[client] == GetGameTickCount()) if (gI_LastNoclipTick[client] == GetGameTickCount())
{ {
return Plugin_Handled; return Plugin_Stop;
} }
gI_LastNoclipTick[client] = GetGameTickCount(); gI_LastNoclipTick[client] = GetGameTickCount();
@ -1996,7 +1996,7 @@ public Action CommandListener_Noclip(int client, const char[] command, int args)
SetEntityMoveType(client, MOVETYPE_WALK); SetEntityMoveType(client, MOVETYPE_WALK);
} }
return Plugin_Handled; return Plugin_Stop;
} }
public Action CommandListener_funcommands_Noclip(int client, const char[] command, int args) public Action CommandListener_funcommands_Noclip(int client, const char[] command, int args)
@ -2641,7 +2641,7 @@ public Action Command_Drop(int client, const char[] command, int argc)
CS_DropWeapon(client, iWeapon, true); CS_DropWeapon(client, iWeapon, true);
} }
return Plugin_Handled; return Plugin_Stop;
} }
public int Native_IsClientUsingHide(Handle plugin, int numParams) public int Native_IsClientUsingHide(Handle plugin, int numParams)

View File

@ -820,7 +820,7 @@ void Command_Toggler_Internal(int client, const char[] asdfcommand, int x)
public Action CommandListener_Toggler(int client, const char[] command, int args) public Action CommandListener_Toggler(int client, const char[] command, int args)
{ {
Command_Toggler_Internal(client, command[1], (command[0] == '+') ? 1 : 0); Command_Toggler_Internal(client, command[1], (command[0] == '+') ? 1 : 0);
return Plugin_Handled; return Plugin_Stop;
} }
public Action Command_Toggler(int client, int args) public Action Command_Toggler(int client, int args)