Shorter Usernames.
This commit is contained in:
parent
14c6bd2523
commit
f13d14fbbb
@ -62,7 +62,7 @@ sc.registered_commands[cname] = function(player, parameter)
|
||||
|
||||
minetest.chat_send_all(line)
|
||||
|
||||
line = "[" .. player .. "@" .. sc.servername .. "] " .. message
|
||||
line = "[" .. player .. "] " .. message
|
||||
if(sc.irc_on) then
|
||||
all_send_to_irc(line)
|
||||
minetest.log("action","[MOD] " .. sc.modname .. " :Module cmd_all: [IRC] " .. line)
|
||||
@ -80,7 +80,7 @@ sc.registered_commands[cname] = function(player, parameter)
|
||||
.. sc.yellow .. "] " .. sc.green .. message
|
||||
minetest.chat_send_all(line)
|
||||
|
||||
line = "[" .. player .. "@" .. sc.servername .. "] " .. message
|
||||
line = "[" .. player .. "] " .. message
|
||||
if(sc.irc_on) then
|
||||
all_send_to_irc(line)
|
||||
minetest.log("action", "[MOD] " .. sc.modname .. " : Module cmd_all: [IRC] " .. line)
|
||||
|
@ -64,7 +64,7 @@ sc.registered_commands[cname] = function(player, parameter)
|
||||
end -- for (_,player
|
||||
|
||||
sc.chat(player, sc.green .. message) -- send to own channel
|
||||
line = "[" .. player .. "@" .. sc.servername .. "]" .. message
|
||||
line = "[" .. player .. "]" .. message
|
||||
if(sc.irc_on) then
|
||||
all_send_to_irc(line)
|
||||
minetest.log("action", "[MOD] .. " .. sc.modname .. " : Module cmd_talk2public : " .. line)
|
||||
|
10
lib.lua
10
lib.lua
@ -207,10 +207,10 @@ function lib.receive_from_irc(line)
|
||||
local a, e = string.find(msg, "ACTION") -- was /ME-Command from irc
|
||||
if( (a) and (a >= 1) ) then
|
||||
msg = string.sub(msg, e + 1)
|
||||
line = lib.orange .. playername .. "@IRC " .. msg
|
||||
line = lib.orange .. "* " .. playername .. "@IRC " .. msg
|
||||
|
||||
else
|
||||
line = lib.white .. "<" .. playername .. "@IRC> " .. msg -- <player@IRC> Message
|
||||
line = lib.white .. "<" .. playername .. "> " .. msg -- <player@IRC> Message
|
||||
|
||||
end -- if(a >= 1
|
||||
|
||||
@ -249,8 +249,7 @@ function lib.send_2_irc(playername, text)
|
||||
if(not lib.irc_running) then return end
|
||||
|
||||
local line = string.gsub(text, "\27%([^()]*%)", "")
|
||||
line = "PRIVMSG " .. lib.irc_channel .. " :<" .. playername
|
||||
.. "@" .. lib.servername .. "> " .. line .. lib.crlf
|
||||
line = "PRIVMSG " .. lib.irc_channel .. " :<" .. playername .. "> " .. line .. lib.crlf
|
||||
lib.client:send(line)
|
||||
lib.irc_message_count = 0 -- This prevents for IRC-Echos of multiple player
|
||||
lib.irc_message = text -- and remembers the last message
|
||||
@ -258,8 +257,7 @@ function lib.send_2_irc(playername, text)
|
||||
|
||||
else
|
||||
local line = string.gsub(text, "\27%([^()]*%)", "")
|
||||
line = "PRIVMSG " .. lib.irc_channel .. " :<" .. playername
|
||||
.. "@" .. lib.servername .. "> " .. line .. lib.crlf
|
||||
line = "PRIVMSG " .. lib.irc_channel .. " :<" .. playername .. "> " .. line .. lib.crlf
|
||||
lib.irc_message_count = lib.irc_message_count + 1 -- IRC-Message was the same
|
||||
if( (lib.irc_message.count == 1) and
|
||||
(lib.irc.message == line) ) then -- clear counter after second
|
||||
|
Loading…
x
Reference in New Issue
Block a user