1
0
mirror of https://github.com/minetest-mods/irc.git synced 2025-06-30 07:00:33 +02:00

Major cleanup.

- Use `irc.foo` notation instead of `irc:foo`. It still
  supports the `irc:foo` usage, but will helpfully issue
  a warning with the location of the offending code.
- Remove unused arguments from functions.
This commit is contained in:
Diego Martínez
2017-03-15 21:33:47 -03:00
parent 5f8850bc15
commit 6bf4e111c2
9 changed files with 180 additions and 149 deletions

View File

@ -5,7 +5,7 @@
minetest.register_on_joinplayer(function(player)
local name = player:get_player_name()
if irc.connected and irc.config.send_join_part then
irc:say("*** "..name.." joined the game")
irc.say("*** "..name.." joined the game")
end
end)
@ -13,7 +13,7 @@ end)
minetest.register_on_leaveplayer(function(player, timed_out)
local name = player:get_player_name()
if irc.connected and irc.config.send_join_part then
irc:say("*** "..name.." left the game"..
irc.say("*** "..name.." left the game"..
(timed_out and " (Timed out)" or ""))
end
end)
@ -31,11 +31,11 @@ minetest.register_on_chat_message(function(name, message)
if nl then
message = message:sub(1, nl - 1)
end
irc:say(irc:playerMessage(name, message))
irc.say(irc.playerMessage(name, message))
end)
minetest.register_on_shutdown(function()
irc:disconnect("Game shutting down.")
irc.disconnect("Game shutting down.")
end)