Skip to content
Snippets Groups Projects
Commit 78fbe26a authored by Diego Martínez's avatar Diego Martínez
Browse files

Fix error if `@` with no name is used.

parent 33542b07
No related branches found
No related tags found
No related merge requests found
......@@ -41,7 +41,9 @@ function irc:bot_command(msg, text)
text = text:match("^%s*(.*)")
if text:sub(1, 1) == "@" then
local _, _, player_to, message = text:find("^.([^%s]+)%s(.+)$")
if not minetest.get_player_by_name(player_to) then
if not player_to then
return
elseif not minetest.get_player_by_name(player_to) then
irc:reply("User '"..player_to.."' is not in the game.")
return
elseif not irc.joined_players[player_to] then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment