mirror of
https://github.com/etlegacy/wolfadmin.git
synced 2025-02-16 17:01:48 +00:00
Fixed version info not available in !finger
This commit is contained in:
parent
0c0392b3c5
commit
1a3b91fb06
1 changed files with 10 additions and 1 deletions
|
@ -47,6 +47,10 @@ function players.getIP(clientId)
|
||||||
return data[clientId]["ip"]
|
return data[clientId]["ip"]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function players.getProtocol(clientId)
|
||||||
|
return data[clientId]["protocol"]
|
||||||
|
end
|
||||||
|
|
||||||
function players.getVersion(clientId)
|
function players.getVersion(clientId)
|
||||||
return data[clientId]["version"]
|
return data[clientId]["version"]
|
||||||
end
|
end
|
||||||
|
@ -118,7 +122,7 @@ function players.onClientConnect(clientId, firstTime, isBot)
|
||||||
data[clientId]["name"] = et.Info_ValueForKey(clientInfo, "name")
|
data[clientId]["name"] = et.Info_ValueForKey(clientInfo, "name")
|
||||||
data[clientId]["guid"] = et.Info_ValueForKey(clientInfo, "cl_guid")
|
data[clientId]["guid"] = et.Info_ValueForKey(clientInfo, "cl_guid")
|
||||||
data[clientId]["ip"] = string.gsub(et.Info_ValueForKey(clientInfo, "ip"), ":%d*", "")
|
data[clientId]["ip"] = string.gsub(et.Info_ValueForKey(clientInfo, "ip"), ":%d*", "")
|
||||||
data[clientId]["version"] = et.Info_ValueForKey(clientInfo, "cg_etVersion")
|
data[clientId]["protocol"] = tonumber(et.Info_ValueForKey(clientInfo, "protocol"))
|
||||||
data[clientId]["bot"] = isBot
|
data[clientId]["bot"] = isBot
|
||||||
data[clientId]["team"] = tonumber(et.gentity_get(clientId, "sess.sessionTeam"))
|
data[clientId]["team"] = tonumber(et.gentity_get(clientId, "sess.sessionTeam"))
|
||||||
|
|
||||||
|
@ -153,6 +157,11 @@ function players.onClientBegin(clientId)
|
||||||
events.trigger("onPlayerReady", clientId, data[clientId]["new"])
|
events.trigger("onPlayerReady", clientId, data[clientId]["new"])
|
||||||
|
|
||||||
data[clientId]["new"] = false
|
data[clientId]["new"] = false
|
||||||
|
|
||||||
|
-- this is now available
|
||||||
|
local clientInfo = et.trap_GetUserinfo(clientId)
|
||||||
|
|
||||||
|
data[clientId]["version"] = et.Info_ValueForKey(clientInfo, "cg_etVersion")
|
||||||
end
|
end
|
||||||
events.handle("onClientBegin", players.onClientBegin)
|
events.handle("onClientBegin", players.onClientBegin)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue