mirror of
https://github.com/etlegacy/wolfadmin.git
synced 2025-04-25 02:20:58 +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
|
-- 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 :-)
|
-- note for etlegacy team: please take a look at this, might come in handy :-)
|
||||||
function et_Print(consoleText)
|
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
|
if result then
|
||||||
events.trigger("onPollFinish", (result == "Passed"), poll)
|
events.trigger("onPollFinish", (result == "Passed"), poll)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue