Doesn't matter if the players spam the map number. Script will take only the last message (vote) from each player. But yeah sometimes when ppl are spamming its hard to tell visually which map should win.
It will be hard to detect whats wrong. I would need to enable some logging and i would need the exact time when this did happen.
but yeah i saw few weird behaviors. But it was more about map selection. The same map which was payed appeared again in votes. But this could be caused by a rotation reset which happens when there are less than 4 maps available from the list of unplayed maps.
When the player votes it appears in log file like this:
"Fl^14^7k say: 1"
what script does is at the end of map it places a timestamp into the q3 log file. Then ppl vote. After 20 seconds it takes all the text after the timestamp and searches following:
"say: " - this will grab all the chat (ignores items respawn messages and other bullshit)
": 1" to ": 6" - this is the actual vote.
Then it will apply unique command so all same messages will be removed.
Then it will go through all players slots (dumpuser 1-15) and grab their name (skip empty slots) and search the last message for that name.
If the players say 1 it will increase the counter for map 1 etc.
At the end counters are compared and the first map with most votes win and gets loaded.
If any of you see something that can be bugged in this let me know
Or if you know something else how could this be done or improved. I am open to any suggestions
PS: maybe if a player uses some weird name (some russian character) his vote doesn't count. Also as i'm looking at this now when two players have the same name and they have voted differently the player who posted as the latest will increase the count of his map by two and vote of the other one won't be counted. hmm.