diff --git a/lib.lua b/lib.lua index a3d8911..8349a53 100644 --- a/lib.lua +++ b/lib.lua @@ -242,7 +242,7 @@ Sends a Text as playername to the IRC function lib.send_2_irc(playername, text) if(not lib.irc_on) then return end -- IRC isn't on - + if(lib.player[playername] ~= nil) then return end -- Player is in channel if(lib.irc_message ~= text) then @@ -320,7 +320,7 @@ function lib.chat(playername, text) minetest.chat_send_player(pname, "<" .. playername .. "> " .. text) end - if(lib.irc_on ~= nil) then + if(lib.irc_on) then lib.send_2_irc(playername, text) end -- if(lib.client @@ -332,7 +332,7 @@ function lib.chat(playername, text) minetest.log("action", "[MOD] " .. lib.modname .. " : Module lib: chat: <" .. playername .. "> " .. text) - elseif(lib.check_channel(pname, channel)) then + elseif(lib.check_channel(pname, channel)) then minetest.chat_send_player(pname, lib.yellow .. "<" .. lib.orange .. playername .. "@" .. channel .. lib.yellow .. "> " .. text) minetest.log("action", "[MOD] " .. lib.modname .. " : Module lib: chat: <" @@ -341,9 +341,9 @@ function lib.chat(playername, text) end -- if(channel == nil end -- for _,players - + return true - + end -- function chat --[[ diff --git a/matterbridge.lua b/matterbridge.lua index fb6b1ae..baf0fa2 100644 --- a/matterbridge.lua +++ b/matterbridge.lua @@ -10,8 +10,8 @@ local sc = smart_chat -local matterbridge -local mattersbridge_irc +local matterbridge = "" +local mattersbridge_irc = "" if(sc.mattersbridge) then mattersbridge = "on" @@ -28,7 +28,7 @@ end minetest.log("action","[MOD] " .. sc.modname .. ": Modul mattersbridge :yl_mattersbridge = " .. mattersbridge) minetest.log("action","[MOD] " .. sc.modname .. ": Modul mattersbridge :yl_mattersbridge_irc = " .. mattersbridge_irc) -if( sc.matterbridge == true) then +if( sc.matterbridge) then if ( minetest.get_modpath("yl_matterbridge")) then @@ -41,8 +41,8 @@ if( sc.matterbridge == true) then because smart_chat has register his own event ]]-- - function yl_matterbridge.chat_message(username, message_text) - end + yl_matterbridge.chat_message = function() end + yl_matterbridge.register_chat = function() end --[[ **************************************************************** @@ -59,7 +59,7 @@ if( sc.matterbridge == true) then for _,player in pairs(all_player) do local pname = player:get_player_name() if(sc.check_global(pname) or sc.public[pname]) then -- Player is in Pub-Channel - sc.chat(pname, line) + sc.print(pname, line) end -- if(lib.check_global diff --git a/mod.conf b/mod.conf index 215c734..5aaaf73 100644 --- a/mod.conf +++ b/mod.conf @@ -1 +1,3 @@ name = smart_chat +optional_depends = yl_matterbridge +description = Gives the Ingame-Chat more functionality.