2013-01-08 16:50:47 +01:00
|
|
|
-- IRC Mod for Minetest
|
|
|
|
-- By Diego Martínez <kaeza@users.sf.net>
|
|
|
|
--
|
|
|
|
-- This mod allows to tie a Minetest server to an IRC channel.
|
|
|
|
--
|
|
|
|
-- This program is free software. It comes without any warranty, to
|
|
|
|
-- the extent permitted by applicable law. You can redistribute it
|
|
|
|
-- and/or modify it under the terms of the Do What The Fuck You Want
|
|
|
|
-- To Public License, Version 2, as published by Sam Hocevar. See
|
|
|
|
-- http://sam.zoy.org/wtfpl/COPYING for more details.
|
|
|
|
--
|
|
|
|
|
2012-12-14 23:33:44 +01:00
|
|
|
-- *************************
|
|
|
|
-- ** BASIC USER SETTINGS **
|
|
|
|
-- *************************
|
|
|
|
|
|
|
|
-- Server to connect on joinplayer (string, default "irc.freenode.net")
|
2013-03-29 06:18:14 +01:00
|
|
|
mt_irc.server = minetest.setting_get("mt_irc.server");
|
2012-12-14 23:33:44 +01:00
|
|
|
|
|
|
|
-- Port to connect on joinplayer (number, default 6667)
|
2013-03-29 06:18:14 +01:00
|
|
|
mt_irc.port = tonumber(minetest.setting_get("mt_irc.port"));
|
2012-12-14 23:33:44 +01:00
|
|
|
|
2013-01-08 16:50:47 +01:00
|
|
|
-- Channel to connect on joinplayer (string, default "##mt-irc-mod")
|
2013-03-29 06:18:14 +01:00
|
|
|
mt_irc.channel = minetest.setting_get("mt_irc.channel");
|
2012-12-14 23:33:44 +01:00
|
|
|
|
|
|
|
-- ***********************
|
|
|
|
-- ** ADVANCED SETTINGS **
|
|
|
|
-- ***********************
|
|
|
|
|
|
|
|
-- Time between chat updates in seconds (number, default 0.2).
|
2013-03-29 06:18:14 +01:00
|
|
|
mt_irc.dtime = tonumber(minetest.setting_get("mt_irc.dtime"));
|
2012-12-14 23:33:44 +01:00
|
|
|
|
|
|
|
-- Underlying socket timeout in seconds (number, default 1.0).
|
2013-03-29 06:18:14 +01:00
|
|
|
mt_irc.timeout = tonumber(minetest.setting_get("mt_irc.timeout"));
|
2012-12-14 23:33:44 +01:00
|
|
|
|
|
|
|
-- Nickname when using single conection (string, default "minetest-"..<server-id>);
|
|
|
|
-- (<server-id> is the server IP address packed as a 32 bit integer).
|
2013-03-29 06:18:14 +01:00
|
|
|
mt_irc.server_nick = minetest.setting_get("mt_irc.server_nick");
|
2012-12-14 23:33:44 +01:00
|
|
|
|
|
|
|
-- Password to use when using single connection (string, default "")
|
2013-03-29 06:18:14 +01:00
|
|
|
mt_irc.password = minetest.setting_get("mt_irc.password");
|
2012-12-14 23:33:44 +01:00
|
|
|
|
|
|
|
-- The format of messages sent to IRC server (string, default "<$(name)> $(message)")
|
|
|
|
-- See `README.txt' for the macros supported here.
|
2013-03-29 06:18:14 +01:00
|
|
|
mt_irc.message_format_out = minetest.setting_get("mt_irc.message_format_out") or "<$(name)> $(message)";
|
2012-12-14 23:33:44 +01:00
|
|
|
|
|
|
|
-- The format of messages sent to IRC server (string, default "<$(name)@IRC> $(message)")
|
|
|
|
-- See `README.txt' for the macros supported here.
|
2013-03-29 06:18:14 +01:00
|
|
|
mt_irc.message_format_in = minetest.setting_get("mt_irc.message_format_in") or "<$(name)@IRC> $(message)";
|
2012-12-14 23:33:44 +01:00
|
|
|
|
|
|
|
-- Enable debug output (boolean, default false)
|
2013-03-29 06:39:41 +01:00
|
|
|
mt_irc.debug = not minetest.setting_getbool("mt_irc.disable_debug");
|
2012-12-16 16:56:02 +01:00
|
|
|
|
|
|
|
-- Whether to automatically join the channed when player joins
|
2013-01-02 00:15:45 +01:00
|
|
|
-- (boolean, default true)
|
2013-03-29 06:39:41 +01:00
|
|
|
mt_irc.auto_join = not minetest.setting_getbool("mt_irc.disable_auto_join");
|
2012-12-16 16:56:02 +01:00
|
|
|
|
|
|
|
-- Whether to automatically connect to the server on mod load
|
2013-01-02 00:15:45 +01:00
|
|
|
-- (boolean, default true)
|
2013-03-29 06:39:41 +01:00
|
|
|
mt_irc.auto_connect = not minetest.setting_getbool("mt_irc.disable_auto_connect");
|