mirror of
https://github.com/etlegacy/etlegacy-lua-scripts.git
synced 2024-11-22 20:41:12 +00:00
IRC announcer cleanup
This commit is contained in:
parent
f2b2cbad20
commit
35689ebe0d
1 changed files with 2 additions and 9 deletions
|
@ -4,7 +4,7 @@
|
|||
]]--
|
||||
|
||||
modname = "IRC announcer"
|
||||
version = "0.3"
|
||||
version = "1.0"
|
||||
|
||||
function et_InitGame()
|
||||
et.RegisterModname(modname.." "..version)
|
||||
|
@ -71,7 +71,6 @@ function et_ClientConnect(_clientNum, _firstTime, _isBot)
|
|||
local clientname
|
||||
-- note pers.netname is empty on first connect
|
||||
clientname = ircColorStr(et.Info_ValueForKey(et.trap_GetUserinfo(_clientNum), "name"))
|
||||
-- clientname = et.Q_CleanStr(et.Info_ValueForKey(et.trap_GetUserinfo(_clientNum), "name"))
|
||||
|
||||
-- get player type and team count
|
||||
local free, axis, allies, spec = 0, 0, 0, 0
|
||||
|
@ -95,10 +94,8 @@ function et_ClientConnect(_clientNum, _firstTime, _isBot)
|
|||
humans = humans + 1
|
||||
|
||||
-- send message
|
||||
local msg = "irc_say \"" .. clientname .. " connected to server. Playing now:^7 " .. humans .. "^9(+" .. bots .. ")\""
|
||||
local msg = "irc_say \"" .. clientname .. " connected to server. Now online:^7 " .. humans .. "^9(+" .. bots .. ")\""
|
||||
et.trap_SendConsoleCommand(et.EXEC_NOW , ircColorStr(msg))
|
||||
-- local msg = "irc_say \"" .. clientname .. " connected to server. Playing now: " .. humans .. "(+" .. bots .. ")\""
|
||||
-- et.trap_SendConsoleCommand(et.EXEC_NOW , msg)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -106,8 +103,4 @@ end
|
|||
-- local clientname = ircColorStr(et.gentity_get(_clientNum ,"pers.netname"))
|
||||
-- local msg = "irc_say \"" .. clientname .. " disconnected from server\""
|
||||
-- et.trap_SendConsoleCommand(et.EXEC_NOW , ircColorStr(msg))
|
||||
--
|
||||
-- local clientname = et.Q_CleanStr(et.gentity_get(_clientNum ,"pers.netname"))
|
||||
-- local msg = "irc_say \"" .. clientname .. " disconnected from server\""
|
||||
-- et.trap_SendConsoleCommand(et.EXEC_NOW , msg)
|
||||
-- end
|
||||
|
|
Loading…
Reference in a new issue