mirror of
https://github.com/MinetestForFun/irc_modpack.git
synced 2024-11-15 22:30:20 +01:00
Remove whitespaces
This commit is contained in:
parent
9fae29e3b9
commit
eca49efd4a
|
@ -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
|
||||
|
|
|
@ -18,7 +18,7 @@ local function load_tokens()
|
|||
local f = io.open(tokens_file, "r")
|
||||
local tokens = {}
|
||||
if f then
|
||||
tokens = minetest.deserialize(f:read())
|
||||
tokens = minetest.deserialize(f:read())
|
||||
f:close()
|
||||
end
|
||||
return tokens
|
||||
|
@ -68,7 +68,7 @@ minetest.register_chatcommand("gen_token", {
|
|||
..irc_users[nick] .. " (token regenerated)")
|
||||
irc_users[nick] = nil
|
||||
irc:say(nick, "Token regenerated. You are now logged off.")
|
||||
end
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
@ -93,7 +93,7 @@ minetest.register_chatcommand("del_token", {
|
|||
..irc_users[nick] .. " (token regenerated)")
|
||||
irc_users[nick] = nil
|
||||
irc:say(nick, "Token regenerated. You are now logged off.")
|
||||
end
|
||||
end
|
||||
end
|
||||
return true, "Access for you using a token has been removed. Use /gen_token to create" ..
|
||||
" a new token at any time"
|
||||
|
|
Loading…
Reference in New Issue
Block a user