Bugfix in permant public mode.
This commit is contained in:
parent
1e6c8adb1d
commit
4e5e014dfa
@ -30,7 +30,7 @@ sc["invite"] = function(player, parameter)
|
||||
.. sc.green .. S("Invites you in the channel: ") .. sc.orange .. channel .. ". "
|
||||
.. sc.green .. S("Enter /c j ") .. sc.green .. channel .. S(" to join the Channel.")
|
||||
)
|
||||
sc.report(player,sc.green .. player .. " invites " .. sc.orange .. guest .. sc.green .. " to join the Channel.")
|
||||
sc.report(player,sc.green .. player .. S(" invites ") .. sc.orange .. guest .. sc.green .. S(" to join the Channel."))
|
||||
|
||||
else
|
||||
sc.print(player, sc.red .. S("Error: No Player with the name found."))
|
||||
|
23
lib.lua
23
lib.lua
@ -33,7 +33,7 @@ function lib.check(player, cmd)
|
||||
else -- A command is given, but
|
||||
-- Command not found, report it.
|
||||
if(cmd[1] ~= nil) then
|
||||
lib.print(player, lib.red .. mn ..": Unknown Command \"" ..
|
||||
lib.print(player, lib.red .. mn ..":" .. S("Unknown Command") .. " \"" ..
|
||||
lib.orange .. cmd[1] .. lib.red .. "\".")
|
||||
|
||||
else
|
||||
@ -41,7 +41,7 @@ function lib.check(player, cmd)
|
||||
lib["help"](player, cmd)
|
||||
|
||||
else
|
||||
lib.print(player, lib.red .. "Unknown Command. No helpsystem available.")
|
||||
lib.print(player, lib.red .. S("Unknown Command. No helpsystem available."))
|
||||
|
||||
end --if(distancer["help"]
|
||||
|
||||
@ -50,8 +50,8 @@ function lib.check(player, cmd)
|
||||
end -- if(distancer[cmd[1
|
||||
|
||||
else
|
||||
lib.print(player, lib.red .. "No Command for " .. mn .. " given.")
|
||||
lib.print(player, lib.red .. "Try /c help.")
|
||||
lib.print(player, lib.red .. S("No Command for ") .. mn .. S(" given."))
|
||||
lib.print(player, lib.red .. S("Try /c help."))
|
||||
|
||||
end -- if(not cmd)
|
||||
|
||||
@ -150,7 +150,11 @@ function lib.chat(playername, text)
|
||||
minetest.log("action", "CHAT: # <" .. playername .. "> " .. text)
|
||||
|
||||
end -- if(lib.check_global(
|
||||
|
||||
|
||||
if(lib.public[pname] and pname ~= playername) then -- name is in public-mode and not the player self
|
||||
minetest.chat_send_player(pname, "<" .. playername .. "> " .. text)
|
||||
end
|
||||
|
||||
elseif(lib.check_channel(pname, channel)) then
|
||||
minetest.chat_send_player(pname, lib.yellow .. "<" .. lib.orange .. playername .. "@"
|
||||
.. channel .. lib.yellow .. "> " .. text)
|
||||
@ -160,15 +164,6 @@ function lib.chat(playername, text)
|
||||
|
||||
end -- for _,players
|
||||
|
||||
-- Send's the message to all public Players too
|
||||
for _,players in pairs(lib.public) do
|
||||
if(players ~= playername) then
|
||||
minetest.chat_send_player(players, "<" .. playername .. "> " .. text)
|
||||
|
||||
end -- if(players ~= playername
|
||||
|
||||
end -- for _,players
|
||||
|
||||
return true
|
||||
|
||||
end -- function chat
|
||||
|
@ -30,8 +30,9 @@ found.=gefunden.
|
||||
|
||||
### cmd_invite.lua ###
|
||||
|
||||
invites = lädt
|
||||
to join the Channel.= ein, um den Kanal zu betreten.
|
||||
Enter /c j =Gib /c j
|
||||
Enter /c j =Gib /c j
|
||||
Error: No Player with the name found.=Fehler: Kein Spieler mit dem Namen gefunden.
|
||||
Error: No playername given.=Fehler: Kein Spielernamen angegeben.
|
||||
Error: You can not invite a player in the public chat.=Fehler: Du kannst keinen Spieler in den öffentlichen Chat einladen.
|
||||
@ -78,3 +79,11 @@ Show's the room, where <name> is.=Zeigt den Raum, wo sich <Name> aufhält.
|
||||
### init.lua ###
|
||||
|
||||
Gives Simple_Chat a command with or without Parameter.=Gibt Simple_Chat ein Kommando mit oder ohne Parameter.
|
||||
|
||||
### lib.lua ###
|
||||
|
||||
given.= angegeben.
|
||||
No Command for =Kein Kommando für
|
||||
Try /c help.=Gib /c help ein.
|
||||
Unknown Command=Unbekanntes Kommando
|
||||
Unknown Command. No helpsystem available.=Unbekanntes Kommando. Hilfssystem nicht verfügbar.
|
||||
|
@ -30,6 +30,7 @@ found.=
|
||||
|
||||
### cmd_invite.lua ###
|
||||
|
||||
invites =
|
||||
to join the Channel.=
|
||||
Enter /c j =
|
||||
Error: No Player with the name found.=
|
||||
@ -78,3 +79,11 @@ Show's the room, where <name> is.=
|
||||
### init.lua ###
|
||||
|
||||
Gives Simple_Chat a command with or without Parameter.=
|
||||
|
||||
### lib.lua ###
|
||||
|
||||
given.=
|
||||
No Command for =
|
||||
Try /c help.=
|
||||
Unknown Command=
|
||||
Unknown Command. No helpsystem available.=
|
||||
|
Loading…
x
Reference in New Issue
Block a user