Add !say command

This commit is contained in:
ShadowNinja 2013-03-27 22:22:28 -04:00
parent 230d9aad72
commit 607f3a02ad

View File

@ -64,3 +64,21 @@ mt_irc.register_bot_command("cmd", {
mt_irc.say(from, "Command run successfuly") mt_irc.say(from, "Command run successfuly")
end end
end}) end})
mt_irc.register_bot_command("say", {
params = "message",
description = "Say something",
func = function (from, args)
if args == "" then
mt_irc.say(from, "You need a message")
return
end
if not irc_users[from] then
mt_irc.say(from, "You are not loged in")
return
end
if minetest.check_player_privs(irc_users[from], {shout=true}) then
minetest.chat_send_all("<"..irc_users[from].."@IRC> "..args)
mt_irc.say(from, "Message sent successfuly")
end
end})