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
6
init.lua
6
init.lua
@ -86,11 +86,13 @@ mt_irc:register_bot_command("cmd", {
|
||||
mt_irc:reply("Not a valid command")
|
||||
return
|
||||
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
|
||||
mt_irc:reply("Your privileges are insufficient")
|
||||
return
|
||||
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", {
|
||||
|
Loading…
Reference in New Issue
Block a user