From 844fad263ae5a78a064467c80c60b653f22add2b Mon Sep 17 00:00:00 2001 From: Ross Bemrose Date: Tue, 16 Dec 2014 16:06:20 -0500 Subject: [PATCH] Add new-style API compatibility for VoteHandler. --- plugins/include/menus.inc | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/plugins/include/menus.inc b/plugins/include/menus.inc index 22ba0a09..c85b07f2 100644 --- a/plugins/include/menus.inc +++ b/plugins/include/menus.inc @@ -810,14 +810,28 @@ stock bool VoteMenuToAll(Handle menu, int time, int flags=0) * @param item_info Array of items, sorted by count. Use VOTEINFO_ITEM * defines. */ -typedef VoteHandler = function void ( - Menu menu, - int num_votes, - int num_clients, - const int client_info[][2], - int num_items, - const int item_info[][2] -); +typeset VoteHandler +{ + // old style + function void( + Menu menu, + int num_votes, + int num_clients, + const int client_info[][2], + int num_items, + const int item_info[][2] + ); + + // new style + function void( + Menu menu, + int num_votes, + int num_clients, + const int[][] client_info, + int num_items, + const int[][] item_info + ); +}; /** * Sets an advanced vote handling callback. If this callback is set,