mirror of
https://github.com/etlegacy/wolfadmin.git
synced 2024-11-10 06:41:53 +00:00
Fixed poll results on legacy (refs #46)
This commit is contained in:
parent
291b109c06
commit
416b3bbbfc
1 changed files with 8 additions and 1 deletions
|
@ -172,7 +172,14 @@ end
|
|||
-- no callbacks defined for these things, so had to invent some special regexes
|
||||
-- note for etlegacy team: please take a look at this, might come in handy :-)
|
||||
function et_Print(consoleText)
|
||||
local result, poll = string.match(consoleText, "^Vote (%w+): %[poll%] ([%w%s]+)\n$")
|
||||
local result, poll
|
||||
|
||||
if et.trap_Cvar_Get("fs_game") == "legacy" then
|
||||
result, poll = string.match(consoleText, "^Vote (%w+): %(Y:%d+-N:%d+%) %[poll%] ([%w%s]+)\n$")
|
||||
else
|
||||
result, poll = string.match(consoleText, "^Vote (%w+): %[poll%] ([%w%s]+)\n$")
|
||||
end
|
||||
|
||||
if result then
|
||||
events.trigger("onPollFinish", (result == "Passed"), poll)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue