Add missing return values in plugins
This commit is contained in:
parent
4fb57dc4e3
commit
f4ff2ad45a
@ -371,18 +371,22 @@ void ParseConfigs()
|
||||
|
||||
public SMCResult NewSection(SMCParser smc, const char[] name, bool opt_quotes)
|
||||
{
|
||||
|
||||
return SMCParse_Continue;
|
||||
}
|
||||
|
||||
public SMCResult KeyValue(SMCParser smc, const char[] key, const char[] value, bool key_quotes, bool value_quotes)
|
||||
{
|
||||
g_groupList.groupListName.PushString(key);
|
||||
g_groupList.groupListCommand.PushString(value);
|
||||
|
||||
return SMCParse_Continue;
|
||||
}
|
||||
|
||||
public SMCResult EndSection(SMCParser smc)
|
||||
{
|
||||
g_groupCount = g_groupList.groupListName.Length;
|
||||
|
||||
return SMCParse_Continue;
|
||||
}
|
||||
|
||||
public void DynamicMenuCategoryHandler(TopMenu topmenu,
|
||||
|
@ -205,6 +205,8 @@ public int MenuHandler_BanReasonList(Menu menu, MenuAction action, int param1, i
|
||||
PrepareBan(param1, playerinfo[param1].banTarget, playerinfo[param1].banTime, info);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int MenuHandler_BanPlayerList(Menu menu, MenuAction action, int param1, int param2)
|
||||
@ -243,6 +245,8 @@ public int MenuHandler_BanPlayerList(Menu menu, MenuAction action, int param1, i
|
||||
DisplayBanTimeMenu(param1);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int MenuHandler_BanTimeList(Menu menu, MenuAction action, int param1, int param2)
|
||||
@ -267,6 +271,8 @@ public int MenuHandler_BanTimeList(Menu menu, MenuAction action, int param1, int
|
||||
|
||||
DisplayBanReasonMenu(param1);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public Action Command_Ban(int client, int args)
|
||||
|
@ -435,4 +435,5 @@ void SendPanelToAll(int from, char[] message)
|
||||
public int Handler_DoNothing(Menu menu, MenuAction action, int param1, int param2)
|
||||
{
|
||||
/* Do nothing */
|
||||
return 0;
|
||||
}
|
||||
|
@ -172,6 +172,8 @@ public int MenuHandler_GagPlayer(Menu menu, MenuAction action, int param1, int p
|
||||
DisplayGagTypesMenu(param1);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int MenuHandler_GagTypes(Menu menu, MenuAction action, int param1, int param2)
|
||||
@ -246,6 +248,8 @@ public int MenuHandler_GagTypes(Menu menu, MenuAction action, int param1, int pa
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void PerformMute(int client, int target, bool silent=false)
|
||||
|
@ -90,6 +90,8 @@ public int MenuHandler_ExecCFG(Menu menu, MenuAction action, int param1, int par
|
||||
Panel panel = view_as<Panel>(param2);
|
||||
panel.SetTitle(title);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public Action Command_ExecCfg(int client, int args)
|
||||
@ -152,15 +154,17 @@ void ParseConfigs()
|
||||
|
||||
public SMCResult NewSection(SMCParser smc, const char[] name, bool opt_quotes)
|
||||
{
|
||||
|
||||
return SMCParse_Continue;
|
||||
}
|
||||
|
||||
public SMCResult KeyValue(SMCParser smc, const char[] key, const char[] value, bool key_quotes, bool value_quotes)
|
||||
{
|
||||
g_ConfigMenu.AddItem(key, value);
|
||||
|
||||
return SMCParse_Continue;
|
||||
}
|
||||
|
||||
public SMCResult EndSection(SMCParser smc)
|
||||
{
|
||||
|
||||
return SMCParse_Continue;
|
||||
}
|
||||
|
@ -119,6 +119,8 @@ public int MenuHandler_Kick(Menu menu, MenuAction action, int param1, int param2
|
||||
DisplayKickMenu(param1);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public Action Command_Kick(int client, int args)
|
||||
|
@ -62,6 +62,8 @@ public int MenuHandler_ChangeMap(Menu menu, MenuAction action, int param1, int p
|
||||
Panel panel = view_as<Panel>(param2);
|
||||
panel.SetTitle(title);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void AdminMenu_Map(TopMenu topmenu,
|
||||
|
@ -161,7 +161,10 @@ public int MenuHandler_Who(Menu menu, MenuAction action, int param1, int param2)
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public Action Command_Who(int client, int args)
|
||||
{
|
||||
bool is_admin = false;
|
||||
|
@ -189,6 +189,8 @@ public void ConVarChange_TimeleftInterval(ConVar convar, const char[] oldValue,
|
||||
public Action Timer_DisplayTimeleft(Handle timer)
|
||||
{
|
||||
ShowTimeLeft(0, PRINT_TO_ALL_ALWAYS);
|
||||
|
||||
return Plugin_Continue;
|
||||
}
|
||||
|
||||
public Action Command_Timeleft(int client, int args)
|
||||
|
@ -123,6 +123,8 @@ public int MenuHandler_Ban(Menu menu, MenuAction action, int param1, int param2)
|
||||
DisplayVoteBanMenu(param1, target);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public Action Command_Voteban(int client, int args)
|
||||
|
@ -121,6 +121,8 @@ public int MenuHandler_Kick(Menu menu, MenuAction action, int param1, int param2
|
||||
DisplayVoteKickMenu(param1, target);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public Action Command_Votekick(int client, int args)
|
||||
|
@ -132,6 +132,8 @@ public int MenuHandler_Confirm(Menu menu, MenuAction action, int param1, int par
|
||||
|
||||
ResetMenu();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int MenuHandler_Map(Menu menu, MenuAction action, int param1, int param2)
|
||||
|
@ -293,6 +293,8 @@ public Action Event_RoundEnd(Event event, const char[] name, bool dontBroadcast)
|
||||
KillAllFireBombs();
|
||||
KillAllFreezes();
|
||||
KillAllDrugs();
|
||||
|
||||
return Plugin_Continue;
|
||||
}
|
||||
|
||||
public void OnAdminMenuReady(Handle aTopMenu)
|
||||
|
@ -194,6 +194,8 @@ public int MenuHandler_Beacon(Menu menu, MenuAction action, int param1, int para
|
||||
DisplayBeaconMenu(param1);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public Action Command_Beacon(int client, int args)
|
||||
|
@ -164,7 +164,7 @@ public int MenuHandler_Blind(Menu menu, MenuAction action, int param1, int param
|
||||
{
|
||||
g_BlindTarget[param1] = userid;
|
||||
DisplayAmountMenu(param1);
|
||||
return; // Return, because we went to a new menu and don't want the re-draw to occur.
|
||||
return 0; // Return, because we went to a new menu and don't want the re-draw to occur.
|
||||
}
|
||||
|
||||
/* Re-draw the menu if they're still valid */
|
||||
@ -174,7 +174,7 @@ public int MenuHandler_Blind(Menu menu, MenuAction action, int param1, int param
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int MenuHandler_Amount(Menu menu, MenuAction action, int param1, int param2)
|
||||
@ -221,6 +221,8 @@ public int MenuHandler_Amount(Menu menu, MenuAction action, int param1, int para
|
||||
DisplayBlindMenu(param1);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public Action Command_Blind(int client, int args)
|
||||
|
@ -278,6 +278,8 @@ public int MenuHandler_Drug(Menu menu, MenuAction action, int param1, int param2
|
||||
DisplayDrugMenu(param1);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public Action Command_Drug(int client, int args)
|
||||
|
@ -316,6 +316,8 @@ public int MenuHandler_Burn(Menu menu, MenuAction action, int param1, int param2
|
||||
DisplayBurnMenu(param1);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int MenuHandler_FireBomb(Menu menu, MenuAction action, int param1, int param2)
|
||||
@ -362,6 +364,8 @@ public int MenuHandler_FireBomb(Menu menu, MenuAction action, int param1, int pa
|
||||
DisplayFireBombMenu(param1);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public Action Command_Burn(int client, int args)
|
||||
|
@ -121,7 +121,7 @@ public int MenuHandler_Gravity(Menu menu, MenuAction action, int param1, int par
|
||||
{
|
||||
g_GravityTarget[param1] = userid;
|
||||
DisplayGravityAmountMenu(param1);
|
||||
return; // Return, because we went to a new menu and don't want the re-draw to occur.
|
||||
return 0; // Return, because we went to a new menu and don't want the re-draw to occur.
|
||||
}
|
||||
|
||||
/* Re-draw the menu if they're still valid */
|
||||
@ -130,8 +130,8 @@ public int MenuHandler_Gravity(Menu menu, MenuAction action, int param1, int par
|
||||
DisplayGravityMenu(param1);
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int MenuHandler_GravityAmount(Menu menu, MenuAction action, int param1, int param2)
|
||||
@ -179,6 +179,8 @@ public int MenuHandler_GravityAmount(Menu menu, MenuAction action, int param1, i
|
||||
DisplayGravityMenu(param1);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public Action Command_Gravity(int client, int args)
|
||||
|
@ -431,6 +431,8 @@ public int MenuHandler_Freeze(Menu menu, MenuAction action, int param1, int para
|
||||
DisplayFreezeMenu(param1);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int MenuHandler_FreezeBomb(Menu menu, MenuAction action, int param1, int param2)
|
||||
@ -477,6 +479,8 @@ public int MenuHandler_FreezeBomb(Menu menu, MenuAction action, int param1, int
|
||||
DisplayFreezeBombMenu(param1);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public Action Command_Freeze(int client, int args)
|
||||
|
@ -122,6 +122,8 @@ public int MenuHandler_NoClip(Menu menu, MenuAction action, int param1, int para
|
||||
DisplayNoClipMenu(param1);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public Action Command_NoClip(int client, int args)
|
||||
|
@ -288,6 +288,8 @@ public int MenuHandler_TimeBomb(Menu menu, MenuAction action, int param1, int pa
|
||||
DisplayTimeBombMenu(param1);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public Action Command_TimeBomb(int client, int args)
|
||||
|
@ -130,6 +130,8 @@ public int MenuHandler_Burn(Menu menu, MenuAction action, int param1, int param2
|
||||
DisplayVoteBurnMenu(param1, target, name);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public Action Command_VoteBurn(int client, int args)
|
||||
|
@ -130,6 +130,8 @@ public int MenuHandler_Slay(Menu menu, MenuAction action, int param1, int param2
|
||||
DisplayVoteSlayMenu(param1, target, name);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public Action Command_VoteSlay(int client, int args)
|
||||
|
@ -1175,6 +1175,8 @@ public int Native_InitiateVote(Handle plugin, int numParams)
|
||||
|
||||
LogAction(-1, -1, "Starting map vote because outside request");
|
||||
InitiateVote(when, inputarray);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* native bool CanMapChooserStartVote(); */
|
||||
@ -1202,7 +1204,7 @@ public int Native_GetExcludeMapList(Handle plugin, int numParams)
|
||||
|
||||
if (array == null)
|
||||
{
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
int size = g_OldMapList.Length;
|
||||
char map[PLATFORM_MAX_PATH];
|
||||
@ -1213,7 +1215,7 @@ public int Native_GetExcludeMapList(Handle plugin, int numParams)
|
||||
array.PushString(map);
|
||||
}
|
||||
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* native void GetNominatedMapList(ArrayList maparray, ArrayList ownerarray = null); */
|
||||
@ -1223,7 +1225,7 @@ public int Native_GetNominatedMapList(Handle plugin, int numParams)
|
||||
ArrayList ownerarray = view_as<ArrayList>(GetNativeCell(2));
|
||||
|
||||
if (maparray == null)
|
||||
return;
|
||||
return 0;
|
||||
|
||||
char map[PLATFORM_MAX_PATH];
|
||||
|
||||
@ -1240,7 +1242,7 @@ public int Native_GetNominatedMapList(Handle plugin, int numParams)
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Add functions for persistent previous map storage */
|
||||
|
@ -113,6 +113,8 @@ public int MenuHandler_Rename(Menu menu, MenuAction action, int param1, int para
|
||||
}
|
||||
DisplayRenameTargetMenu(param1);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void RandomizeName(int client)
|
||||
|
@ -112,6 +112,8 @@ public int MenuHandler_SlapDamage(Menu menu, MenuAction action, int param1, int
|
||||
|
||||
DisplaySlapTargetMenu(param1);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int MenuHandler_Slap(Menu menu, MenuAction action, int param1, int param2)
|
||||
@ -157,6 +159,8 @@ public int MenuHandler_Slap(Menu menu, MenuAction action, int param1, int param2
|
||||
|
||||
DisplaySlapTargetMenu(param1);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public Action Command_Slap(int client, int args)
|
||||
|
@ -111,6 +111,8 @@ public int MenuHandler_Slay(Menu menu, MenuAction action, int param1, int param2
|
||||
|
||||
DisplaySlayMenu(param1);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public Action Command_Slay(int client, int args)
|
||||
|
@ -213,6 +213,8 @@ void AttemptRTV(int client)
|
||||
public Action Timer_DelayRTV(Handle timer)
|
||||
{
|
||||
g_RTVAllowed = true;
|
||||
|
||||
return Plugin_Continue;
|
||||
}
|
||||
|
||||
void StartRTV()
|
||||
|
Loading…
Reference in New Issue
Block a user