Skip to content
This repository has been archived by the owner on Aug 20, 2020. It is now read-only.

Commit

Permalink
Remove whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
Lymkwi committed Sep 23, 2015
1 parent 9fae29e commit eca49ef
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions irc/botcmds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions irc/irc/set.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
12 changes: 6 additions & 6 deletions irc/player_part.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand All @@ -28,15 +28,15 @@ minetest.register_chatcommand("join", {
irc:player_join(name)
end
})

minetest.register_chatcommand("part", {
description = "Part the IRC channel",
privs = {shout=true},
func = function(name, param)
irc:player_part(name)
end
})

minetest.register_chatcommand("who", {
description = "Tell who is currently on the channel",
privs = {},
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions irc_commands/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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"
Expand Down

0 comments on commit eca49ef

Please sign in to comment.