core/smn_menus.cpp
changeset 2737 eb7713d87fa1
parent 2289 44045ead61cd
child 2928 1f7626e1a49d
     1.1 --- a/core/smn_menus.cpp	Mon May 25 18:12:26 2009 -0700
     1.2 +++ b/core/smn_menus.cpp	Sat May 30 19:59:55 2009 -0400
     1.3 @@ -676,7 +676,13 @@
     1.4  	cell_t *addr;
     1.5  	pContext->LocalToPhysAddr(params[2], &addr);
     1.6  
     1.7 -	if (!g_Menus.StartVote(menu, params[3], addr, params[4]))
     1.8 +	cell_t flags = 0;
     1.9 +	if (params[0] >= 5)
    1.10 +	{
    1.11 +		flags = params[5];
    1.12 +	}
    1.13 +
    1.14 +	if (!g_Menus.StartVote(menu, params[3], addr, params[4], flags))
    1.15  	{
    1.16  		return 0;
    1.17  	}
    1.18 @@ -1445,7 +1451,13 @@
    1.19  		return pContext->ThrowNativeError("Client is not in the voting pool");
    1.20  	}
    1.21  
    1.22 -	return g_Menus.RedrawClientVoteMenu(client) ? 1 : 0;
    1.23 +	bool revote = true;
    1.24 +	if (params[0] >= 2 && !params[2])
    1.25 +	{
    1.26 +		revote = false;
    1.27 +	}
    1.28 +
    1.29 +	return g_Menus.RedrawClientVoteMenu2(client, revote) ? 1 : 0;
    1.30  }
    1.31  
    1.32  class EmptyMenuHandler : public IMenuHandler
    1.33 @@ -1567,3 +1579,4 @@
    1.34  	{"VoteMenu",				VoteMenu},
    1.35  	{NULL,						NULL},
    1.36  };
    1.37 +