OpenArena Message Boards

OpenArena => Multiplayer => Topic started by: cowberrian on November 18, 2015, 10:57:14 PM



Title: vote kick allbots problem
Post by: cowberrian on November 18, 2015, 10:57:14 PM
Hi!
Vote "kick allbots" does not work neither from console \callvote kick allbots nor from custom vote menu
Code:
{
votecommand "Kick_all_bots"
displayname "kickbots"
command "kick allbots"
}
resulting in "Command could not be found" message.

It works fine with \rcon kick allbots though.


Title: Re: vote kick allbots problem
Post by: Gig on November 19, 2015, 08:15:26 AM
Just done a few tests...
"/callvote kick allbots" results in "Cannot find the playername. Try clientkick instead." (bots are not kicked).
It looks like this may be an OpenArena bug: I just tested it in the original Quake 3 1.32c and it works as expected, there.
Update: bug now added to the "bug recap" list: (DO NOT LINK) h t t p s : / / openarena . wikia . com/wiki/Bugs
Further update: after reading Sago's reply below, entry moved to "wishlist recap" list instead: (DO NOT LINK) h t t p s : / / openarena . wikia . com/wiki/Wishlist


I also tried to set up it using custom votes, and in that way it works instead. Maybe you missed something in setting up custom votes?
- I created a votecustom.cfg file (with the same content of the "quote" part of your post just above this one), and placed it into my "baseoa" folder.
- I launched the game, loaded a map, added a bot.
- I checked g_votecustomfile value corresponds to the filename I used (votecustom.cfg)
- I modified g_voteNames from "/map_restart/nextmap/map/g_gametype/kick/clientkick/g_doWarmup/timelimit/fraglimit/shuffle/" to "/map_restart/nextmap/map/g_gametype/kick/clientkick/g_doWarmup/timelimit/fraglimit/shuffle/custom/" (to enable custom votes). Please notice that the final "/" is important.
- I typed "/callvote custom kick_all_bots". Vote passed and the bot was kicked.


Title: Re: vote kick allbots problem
Post by: sago007 on November 19, 2015, 04:33:55 PM
I believe that the "kick allbots" died along with "kick all" and "kick some-other-special-command".

This command died because someone reported the following exploit:

  * Give yourself the name "All"
  * Act like an idiot
  * Someone calls "callvote kick all"
  * Leave the game
  * Vote passes
  * Everyone gets kicked

Repeat the same exploit for "allbots". Although less serious, it is still an exploit.
As the vote code had other issues the whole system was hardened. The vote commands are now handled differently from the console commands. It is not just a filter. The vote system does not just check the vote command and pass it on if it looks OK. It interprets it and generate a matching internal command. Example: In OpenArena "kick" is always converted internally to "clientkick".

The command "callvote kick allbots" will not return. Allowing the "kick" command to use player names and command interchangeable was a mistake.
A replacement command like "callvote kick_allbots" could be added instead.


Title: Re: vote kick allbots problem
Post by: cowberrian on November 19, 2015, 09:50:01 PM
Gig, Yes everything is in place. My version though is iq3+oa 1.36_SVN1910M so i think sago007 is right.
On a developers place i would rather restrict some nicknames than useful commands.

Thank you for valuable info guys!


Title: Re: vote kick allbots problem
Post by: Gig on November 20, 2015, 02:49:43 AM
Gig, Yes everything is in place. My version though is iq3+oa 1.36_SVN1910M so i think sago007 is right.
I have not understood a thing: does your custom vote for kick allbots work, now? I got to make it work... you should be able, too.

I just got the "command could not be found" error when it did not find my custom vote file (due to Windows option to hide known file extensions, my file was erroneusly named "callvote.cfg.txt" -the .txt was not shown-... I set Windows to show all extensions, removed the .txt, and then it worked as expected)....

If you just type "/callvote custom", what does it show you?

UPDATE: Considering it's not a bug, entry moved from DO NOT LINK[/b]) h t t p s : / / openarena . wikia . com/wiki/Bugs]Bugs recap page (http://([b) to DO NOT LINK[/b]) h t t p s : / / openarena . wikia . com/wiki/Wishlist]Wishlist recap page (http://([b).


Title: Re: vote kick allbots problem
Post by: cowberrian on November 20, 2015, 04:07:53 PM
I also tried to set up it using custom votes, and in that way it works instead. Maybe you missed something in setting up custom votes?
- I created a votecustom.cfg file (with the same content of the "quote" part of your post just above this one), and placed it into my "baseoa" folder.
- I launched the game, loaded a map, added a bot.
- I checked g_votecustomfile value corresponds to the filename I used (votecustom.cfg)
- I modified g_voteNames from "/map_restart/nextmap/map/g_gametype/kick/clientkick/g_doWarmup/timelimit/fraglimit/shuffle/" to "/map_restart/nextmap/map/g_gametype/kick/clientkick/g_doWarmup/timelimit/fraglimit/shuffle/custom/" (to enable custom votes). Please notice that the final "/" is important.
- I typed "/callvote custom kick_all_bots". Vote passed and the bot was kicked.

Everything that you described here is the same on my server. All the variables and a votecustom.cfg are in place and working(all the way). But one last entry in votecustom.cfg does not work.
This one:
Code:
{
votecommand "Kickbots"
displayname "kickbots"
command "kick allbots"
}

Please take a look at configs attached and visit a14.polmira.ru server to see it in action

OpenArena 0.8.8  iq3+oa 1.36_SVN1910M on Debian Jessie


Title: Re: vote kick allbots problem
Post by: Gig on November 20, 2015, 04:14:46 PM
There is an error in line 31 of your votecustom.cfg:  there is one } instead of {.


Title: Re: vote kick allbots problem
Post by: cowberrian on November 20, 2015, 05:37:16 PM
Well that is embarrassing! My sincere apologies.
Problem solved. dayum...


Title: Re: vote kick allbots problem
Post by: Gig on November 24, 2015, 05:16:32 AM
Hi!
I prepared a wiki page about custom voting, to help server admins with this feature.
(DO NOT LINK) h t t p s : / / openarena . wikia . com/wiki/Custom_votes

Is it okay?
I would like to have confirm by Sago that custom votes cannot be used to have players pass further parameters to variables (there would be no way to prevent entering "insane" values).

Doing the tests, I noticed something (can we call them "small list update bugs"?):
- In case g_votenamesfile is changed during a match, Custom vote list in ESC menu still shows the old (cached?) list until the client reconnects or the map restarts. Trying to vote for such outdated items does not work (fortunately?). Console "/Callvote custom" list instead is immediately updated (of course, typing again the command! :P).
- In case g_votenamesfile is changed to a non-existent filename (maybe also with an existent filename but with major errors?), Custom vote list in ESC menu still shows the old (cached?) list, and this time console "/Callvote custom" list does the same. Trying to vote for such outdated items does not work (fortunately?). Reconnecting the client or restarting the map fixes the console command output (blank list), but not the ESC menu list. Not even loading a different map fixes the ESC menu list: it still shows the old list istead of an empty one.
The second case looks worst than the first one, but it happens only in case server admin made some kind of mistake.
Maybe they are not worth spending time and energy, however you know that when I find something, I point it out!  :)

PS: When I will have some time, I will try to also try to write a wiki page about voting in general. I don't know when.

PPS: This is not a bug, but it's for wishlist and voting in general: what about adding "vote yes/vote no" to ESC menu when a vote is going?
Example: phones do not have F1/F2 keys: Pelya's Android version added "vote yes/vote no" items at the bottom of the "call vote" menu.


Title: Re: vote kick allbots problem
Post by: sago007 on November 24, 2015, 03:12:39 PM
PPS: This is not a bug, but it's for wishlist and voting in general: what about adding "vote yes/vote no" to ESC menu when a vote is going?
Example: phones do not have F1/F2 keys: Pelya's Android version added "vote yes/vote no" items at the bottom of the "call vote" menu.
I believe this was added. https://github.com/OpenArena/gamecode/commit/c21dfe4be4d81e626df1519146f96e3d35b14717

Quote
In case g_votenamesfile is changed during a match
I know that the client caches all values aggressively to reduce network traffic. I did think about it while writing the code because it made it annoying to test. However I do believe that it is best to keep the cache.
I believe that the problem is entirely client side and that the server cannot be tricked to actually make them pass (because all commands are validated by the server).


Title: Re: vote kick allbots problem
Post by: Gig on November 25, 2015, 02:57:46 AM
Thank you, Sago.  :)

Added the "vote yes/vote no" thing to (DO NOT LINK) h t t p s : / / openarena . wikia . com/wiki/Wishlist#Already_implemented.

I hope sometimes you will make us a new DO NOT LINK[/b]) h t t p s : / / openarena . wikia . com/wiki/OAX]OAX (http://([b) B version to try (http://openarena.ws/board/index.php?topic=1908.300) new features (although I don't have a lot of time for testing in these days)... :-)