forked from minetest-mods/irc
Testing
This commit is contained in:
parent
026ca11b10
commit
587a3865bd
@ -62,6 +62,7 @@ irc.register_callback("private_msg", function ( from, message )
|
||||
return;
|
||||
else
|
||||
irc.say(from, 'Message not sent! Please use "!help" to see possible commands.');
|
||||
irc.say(from, ' Or use the ">playername Message" syntax to send a private message.');
|
||||
return;
|
||||
end
|
||||
if (not mt_irc.connected_players[player_to]) then
|
||||
|
@ -108,7 +108,7 @@ mt_irc.join = function ( name )
|
||||
end
|
||||
|
||||
mt_irc.connect = function ( )
|
||||
mt_irc.connect_ok = pcall(irc.connect, {
|
||||
mt_irc.connect_ok = irc.connect({
|
||||
network = mt_irc.server;
|
||||
port = mt_irc.port;
|
||||
nick = mt_irc.server_nick;
|
||||
|
@ -705,7 +705,9 @@ function connect(args)
|
||||
serverinfo.connecting = true
|
||||
if OUTFILE then irc_debug.set_output(OUTFILE) end
|
||||
if DEBUG then irc_debug.enable() end
|
||||
irc_sock = base.assert(socket.connect(network, port))
|
||||
--irc_sock = base.assert(socket.connect(network, port))
|
||||
irc_sock = socket.connect(network, port);
|
||||
if (not irc_sock) then return false; end
|
||||
irc_sock:settimeout(timeout)
|
||||
_register_socket(irc_sock, 'r', incoming_message)
|
||||
_register_socket(irc_sock, 'w', outgoing_message)
|
||||
@ -713,6 +715,7 @@ function connect(args)
|
||||
send("NICK", nick)
|
||||
send("USER", username, get_ip(), network, realname)
|
||||
--begin_main_loop()
|
||||
return true, irc_sock;
|
||||
end
|
||||
-- }}}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user