Es klappt.

This commit is contained in:
acmgit 2022-02-28 04:24:58 +01:00
parent 92bcda22ff
commit b7f7672aff
3 changed files with 13 additions and 11 deletions

10
lib.lua
View File

@ -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
--[[

View File

@ -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

View File

@ -1 +1,3 @@
name = smart_chat
optional_depends = yl_matterbridge
description = Gives the Ingame-Chat more functionality.