mirror of
https://github.com/MinetestForFun/irc_modpack.git
synced 2025-06-28 14:16:04 +02:00
Remove whitespaces
This commit is contained in:
@ -46,13 +46,13 @@ function irc:bot_command(msg, text)
|
||||
cmd = text
|
||||
args = ""
|
||||
end
|
||||
|
||||
|
||||
if not self.bot_commands[cmd] then
|
||||
self:reply("Unknown command '"..cmd.."'. Try 'list'."
|
||||
.." Or use @playername <message> to send a private message")
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
local success, message = self.bot_commands[cmd].func(msg.user, args)
|
||||
if message then
|
||||
self:reply(message)
|
||||
|
@ -13,7 +13,7 @@ end
|
||||
function set:add(connection)
|
||||
local socket = connection.socket
|
||||
insert(self.sockets, socket)
|
||||
|
||||
|
||||
self.connections[socket] = connection
|
||||
insert(self.connections, connection)
|
||||
end
|
||||
@ -32,13 +32,13 @@ end
|
||||
|
||||
function set:select()
|
||||
local read, write, err = select(self.sockets, nil, self.timeout)
|
||||
|
||||
|
||||
if read then
|
||||
for k, socket in ipairs(read) do
|
||||
read[k] = self.connections[socket]
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
return read, err
|
||||
end
|
||||
|
||||
|
@ -10,7 +10,7 @@ function irc:player_part(name)
|
||||
self.joined_players[name] = nil
|
||||
minetest.chat_send_player(name, "IRC: You are now out of the channel.")
|
||||
end
|
||||
|
||||
|
||||
function irc:player_join(name)
|
||||
if self.joined_players[name] then
|
||||
minetest.chat_send_player(name, "IRC: You are already in the channel.")
|
||||
@ -28,7 +28,7 @@ minetest.register_chatcommand("join", {
|
||||
irc:player_join(name)
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
minetest.register_chatcommand("part", {
|
||||
description = "Part the IRC channel",
|
||||
privs = {shout=true},
|
||||
@ -36,7 +36,7 @@ minetest.register_chatcommand("part", {
|
||||
irc:player_part(name)
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
minetest.register_chatcommand("who", {
|
||||
description = "Tell who is currently on the channel",
|
||||
privs = {},
|
||||
@ -49,13 +49,13 @@ minetest.register_chatcommand("who", {
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
local name = player:get_player_name()
|
||||
irc.joined_players[name] = irc.config.auto_join
|
||||
end)
|
||||
|
||||
|
||||
|
||||
|
||||
minetest.register_on_leaveplayer(function(player)
|
||||
local name = player:get_player_name()
|
||||
irc.joined_players[name] = nil
|
||||
|
Reference in New Issue
Block a user