mirror of
https://github.com/minetest-mods/irc_commands.git
synced 2025-01-09 15:20:19 +01:00
Reply when you have insufficient privileges for a command
This commit is contained in:
parent
55ea96e88e
commit
e2ff55d70f
10
init.lua
10
init.lua
@ -86,11 +86,13 @@ mt_irc:register_bot_command("cmd", {
|
|||||||
mt_irc:reply("Not a valid command")
|
mt_irc:reply("Not a valid command")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if minetest.check_player_privs(irc_users[user.nick], command.privs) then
|
if not minetest.check_player_privs(irc_users[user.nick], command.privs) then
|
||||||
minetest.log("action", user.nick.."@IRC runs "
|
mt_irc:reply("Your privileges are insufficient")
|
||||||
..args.." as "..irc_users[user.nick])
|
return
|
||||||
command.func(irc_users[user.nick], (params or ""))
|
|
||||||
end
|
end
|
||||||
|
minetest.log("action", user.nick.."@IRC runs "
|
||||||
|
..args.." as "..irc_users[user.nick])
|
||||||
|
command.func(irc_users[user.nick], (params or ""))
|
||||||
end})
|
end})
|
||||||
|
|
||||||
mt_irc:register_bot_command("say", {
|
mt_irc:register_bot_command("say", {
|
||||||
|
Loading…
Reference in New Issue
Block a user