| 2562 | ~voteinfo() { delete action; } |
| 2563 | |
| 2564 | void end(int result) |
| 2565 | { |
| 2566 | if(action && !action->isvalid()) result = VOTE_NO; // don't perform() invalid votes |
| 2567 | sendf(-1, 1, "ri2", SV_VOTERESULT, result); |
| 2568 | this->result = result; |
| 2569 | if(result == VOTE_YES) |
| 2570 | { |
| 2571 | if(valid_client(owner)) clients[owner]->lastvotecall = 0; |
| 2572 | if(action) action->perform(); |
| 2573 | } |
| 2574 | loopv(clients) clients[i]->vote = VOTE_NEUTRAL; |
| 2575 | } |
| 2576 | |
| 2577 | bool isvalid() { return valid_client(owner) && action != NULL && action->isvalid(); } |
| 2578 | bool isalive() { return servmillis - callmillis < 30*1000; } |
nothing calls this directly
no test coverage detected