Merge pull request #131 from Arkshine/fix-plugin-warning

Fix unreachable code warning (reported by kwpd)
This commit is contained in:
Vincent Herbet 2014-09-18 19:41:31 +02:00
commit bc5924a780

View File

@ -470,19 +470,16 @@ public CvarMenuSelection(id, menu, item)
{ {
DisplayPluginMenuDefault(id); DisplayPluginMenuDefault(id);
} }
return PLUGIN_HANDLED;
} }
else if (item==MENU_BACK) else if (item==MENU_BACK)
{ {
--CurrentPage[id]; --CurrentPage[id];
client_print(id,print_chat,"MENU_BACK"); client_print(id,print_chat,"MENU_BACK");
return PLUGIN_HANDLED;
} }
else if (item==MENU_MORE) else if (item==MENU_MORE)
{ {
++CurrentPage[id]; ++CurrentPage[id];
client_print(id,print_chat,"MENU_MORE"); client_print(id,print_chat,"MENU_MORE");
return PLUGIN_HANDLED;
} }
else else
{ {
@ -515,10 +512,9 @@ public CvarMenuSelection(id, menu, item)
client_cmd(id,"messagemode amx_changecvar"); client_cmd(id,"messagemode amx_changecvar");
menu_destroy(menu); menu_destroy(menu);
return PLUGIN_HANDLED;
} }
return 0; return PLUGIN_HANDLED;
} }
/** /**
* Displays the cvar menu to a client. * Displays the cvar menu to a client.
@ -785,7 +781,6 @@ public CommandExecuteCommand(id)
*/ */
public CommandMenuSelection(id, menu, item) public CommandMenuSelection(id, menu, item)
{ {
if (item==MENU_EXIT) if (item==MENU_EXIT)
{ {
menu_destroy(menu); menu_destroy(menu);
@ -797,19 +792,16 @@ public CommandMenuSelection(id, menu, item)
{ {
client_cmd(id,"amx_plugincmdmenu"); client_cmd(id,"amx_plugincmdmenu");
} }
return PLUGIN_HANDLED;
} }
else if (item==MENU_BACK) else if (item==MENU_BACK)
{ {
--CurrentPage[id]; --CurrentPage[id];
client_print(id,print_chat,"MENU_BACK"); client_print(id,print_chat,"MENU_BACK");
return PLUGIN_HANDLED;
} }
else if (item==MENU_MORE) else if (item==MENU_MORE)
{ {
++CurrentPage[id]; ++CurrentPage[id];
client_print(id,print_chat,"MENU_MORE"); client_print(id,print_chat,"MENU_MORE");
return PLUGIN_HANDLED;
} }
else else
{ {
@ -821,10 +813,9 @@ public CommandMenuSelection(id, menu, item)
menu_destroy(menu); menu_destroy(menu);
DisplaySpecificCommand(id,str_to_num(Command)); DisplaySpecificCommand(id,str_to_num(Command));
return PLUGIN_HANDLED;
} }
return 0; return PLUGIN_HANDLED;
} }
/** /**
* This blocks "say" and "say_team" commands. * This blocks "say" and "say_team" commands.