ULX

Author Topic: votekick bug  (Read 1375 times)

0 Members and 1 Guest are viewing this topic.

Offline Nipah

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
votekick bug
« on: November 25, 2012, 10:47:35 AM »
I can't votekick players off the server.

I can start the vote but when it hits "admin approval." it messes up (im superadmin)
Code: [Select]
local function voteKickDone( t, target, time, ply, reason )
local results = t.results
local winner
local winnernum = 0
for id, numvotes in pairs( results ) do
if numvotes > winnernum then
winner = id
winnernum = numvotes
end
end

local ratioNeeded = GetConVarNumber( "ulx_votekickSuccessratio" )
local minVotes = GetConVarNumber( "ulx_votekickMinvotes" )
local str
if winner ~= 1 or winnernum < minVotes or winnernum / t.voters < ratioNeeded then
str = "Vote results: User will not be kicked. (" .. (results[ 1 ] or "0") .. "/" .. t.voters .. ")"
else
str = "Vote results: User will now be kicked, pending admin approval. (" .. winnernum .. "/" .. t.voters .. ")"
ulx.doVote( "Accept result and kick " .. target:Nick() .. "?", { "Yes", "No" }, voteKickDone2, 30000, { ply }, true, target, time, ply, reason )
end

EDIT by Megiddo: Language, remember we have all age ranges here. Don't say something you wouldn't to a stranger's child in person.
« Last Edit: November 25, 2012, 12:04:30 PM by Megiddo »

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: votekick bug
« Reply #1 on: November 25, 2012, 12:57:37 PM »
Got a bug report up for it, we'll check it out when we get a chance: https://github.com/Nayruden/Ulysses/issues/82
Experiencing God's grace one day at a time.