diff --git a/mods/irc/init.lua b/mods/irc/init.lua
old mode 100755
new mode 100644
index c93bcf9f..8a6ab85f
--- a/mods/irc/init.lua
+++ b/mods/irc/init.lua
@@ -13,13 +13,12 @@ package.path =
-- The build of Lua that Minetest comes with only looks for libraries under
-- /usr/local/share and /usr/local/lib but LuaSocket is often installed under
-- /usr/share and /usr/lib.
-if not rawget(_G,"jit") and package.config:sub(1, 1) == "/" then
+if not jit and package.config:sub(1, 1) == "/" then
package.path = package.path..
";/usr/share/lua/5.1/?.lua"..
";/usr/share/lua/5.1/?/init.lua"
- package.cpath = package.cpath..
- -- ";/usr/lib/lua/5.1/?.so"
- ";/usr/lib/x86_64-linux-gnu/lua/5.1/?.so"
+ package.cpath = package.cpath..
+ ";/usr/lib/lua/5.1/?.so"
end
irc = {
@@ -104,9 +103,6 @@ function irc:connect()
return
end
- print("== This is a debug line, please check for it ==")
- print(self.config.NSPass)
- print("=== DEBUG FINISHED ===")
if self.config.NSPass then
self:say("NickServ", "IDENTIFY "..self.config.NSPass)
end
diff --git a/mods/irc/irc/.travis.yml b/mods/irc/irc/.travis.yml
new file mode 100644
index 00000000..f0720708
--- /dev/null
+++ b/mods/irc/irc/.travis.yml
@@ -0,0 +1,15 @@
+language: lua
+
+notifications:
+ email: false
+
+env:
+ global:
+ - secure: "kFhU+DZjhq/KbDt0DIDWnlskXMa12miNelmhhy30fQGgVIdiibDGKMNGyLahWp8CnPu1DARb5AZWK2TDfARdnURT2pgcsG83M7bYIY6cR647BWjL7oAhJ6CYEzTWJTBjeUjpN/o4vIgfXSDR0c7vboDi7Xz8ilfrBujPL2Oi/og="
+
+install:
+ - sudo apt-get -y update
+ - sudo apt-get -y install lua5.1 luadoc
+
+script:
+ - ./push-luadoc.sh
diff --git a/mods/irc/irc/doc/irc.luadoc b/mods/irc/irc/doc/irc.luadoc
old mode 100755
new mode 100644
index 7bf638e6..c33a0b19
--- a/mods/irc/irc/doc/irc.luadoc
+++ b/mods/irc/irc/doc/irc.luadoc
@@ -1,7 +1,7 @@
--- LuaIRC is a low-level IRC library for Lua.
-- All functions raise Lua exceptions on error.
--
--- Use new
to create a new IRC object.
+-- Use new
to create a new Connection object.
-- Example:
--
--require "irc"
@@ -24,11 +24,12 @@
module "irc"
---- Create a new IRC object. Use irc:connect
to connect to a server.
+--- Create a new Connection object. Use irc:connect
to connect to a server.
-- @param user Table with fields nick
, username
and realname
.
-- The nick
field is required.
--
--- @return Returns a new irc
object.
+-- @return Returns a new Connection object.
+-- @see Connection
function new(user)
--- Hook a function to an event.
@@ -46,10 +47,10 @@ function irc:unhook(name, id)
--- Connect irc
to an IRC server.
-- @param host Host address.
-- @param port Server port. [default 6667]
-function irc:connect(server, port)
+function irc:connect(host, port)
-- @param table Table of connection details
--- @see Connection
+-- @see ConnectOptions
function irc:connect(table)
--- Disconnect irc
from the server.
@@ -116,16 +117,26 @@ function irc:handle(msg)
function irc:shutdown()
--- Table with connection information.
---
--- host
- Server host name.
--- port
- Server port. [defaults to 6667
]
--- timeout
- Connect timeout. [defaults to 30
]
--- password
- Server password.
--- secure
- Boolean to enable TLS connection, pass a params table (described, [luasec]) to control
---
+-- @name ConnectOptions
+-- @class table
+-- @field host Server host name.
+-- @field port Server port. [defaults to 6667
]
+-- @field timeout Connect timeout. [defaults to 30
]
+-- @field password Server password.
+-- @field secure Boolean to enable TLS connection, pass a params table (described, [luasec]) to control
-- [luasec]: http://www.inf.puc-rio.br/~brunoos/luasec/reference.html
+
+--- Class representing a connection.
-- @name Connection
-- @class table
+-- @field authed Boolean indicating whether the connection has completed registration.
+-- @field connected Whether the connection is currently connected.
+-- @field motd The server's message of the day. Can be nil.
+-- @field nick The current nickname.
+-- @field realname The real name sent to the server.
+-- @field username The username/ident sent to the server.
+-- @field socket Raw socket used by the library.
+-- @field supports What the server claims to support in it's ISUPPORT message.
--- Class representing an IRC message.
-- @name Message
@@ -145,8 +156,8 @@ function irc:shutdown()
--- List of hooks you can use with irc:hook.
-- The parameter list describes the parameters passed to the callback function.
--
--- PreRegister(connection)
Useful for CAP commands and SASL.
--- OnRaw(line) - (any non false/nil return value assumes line handled and will not be further processed)
+-- PreRegister()
- Usefull for requesting capabilities.
+-- OnRaw(line)
- Any non false/nil return value assumes line handled and will not be further processed.
-- OnSend(line)
-- OnDisconnect(message, errorOccurred)
-- OnChat(user, channel, message)
@@ -162,7 +173,10 @@ function irc:shutdown()
-- OnUserMode(modes)
-- OnChannelMode(user, channel, modes)
-- OnModeChange(user, target, modes, ...)
* ('...' contains mode options such as banmasks)
--- DoX(msg)
'X' is any IRC command or numeric with the first letter capitalized (eg, DoPing and Do001)
+-- OnCapabilityList(caps)
+-- OnCapabilityAvailable(cap, value)
Called only when a capability becomes available or changes.
+-- OnCapabilitySet(cap, enabled)
*
+-- DoX(msg)
* - 'X' is any IRC command or numeric with the first letter capitalized (eg, DoPing and Do001)
--
-- * Event also invoked for yourself.
-- † Channel passed only when user tracking is enabled