mirror of
https://github.com/minetest-mods/irc_commands.git
synced 2025-01-09 23:30:19 +01:00
Notify when using !logout and not logged in
This commit is contained in:
parent
607f3a02ad
commit
05d1c81f1f
4
init.lua
4
init.lua
@ -34,8 +34,12 @@ end})
|
|||||||
mt_irc.register_bot_command("logout", {
|
mt_irc.register_bot_command("logout", {
|
||||||
description = "Logout",
|
description = "Logout",
|
||||||
func = function (from, args)
|
func = function (from, args)
|
||||||
|
if irc_users[from] then
|
||||||
irc_users[from] = nil
|
irc_users[from] = nil
|
||||||
mt_irc.say(from, "You are now logged off")
|
mt_irc.say(from, "You are now logged off")
|
||||||
|
else
|
||||||
|
mt_irc.say(from, "You are not logged in")
|
||||||
|
end
|
||||||
end})
|
end})
|
||||||
|
|
||||||
mt_irc.register_bot_command("cmd", {
|
mt_irc.register_bot_command("cmd", {
|
||||||
|
Loading…
Reference in New Issue
Block a user