mirror of
https://github.com/minetest-mods/irc_commands.git
synced 2025-07-04 15:50:20 +02:00
Notify when using !logout and not logged in
This commit is contained in:
8
init.lua
8
init.lua
@ -34,8 +34,12 @@ end})
|
||||
mt_irc.register_bot_command("logout", {
|
||||
description = "Logout",
|
||||
func = function (from, args)
|
||||
irc_users[from] = nil
|
||||
mt_irc.say(from, "You are now logged off")
|
||||
if irc_users[from] then
|
||||
irc_users[from] = nil
|
||||
mt_irc.say(from, "You are now logged off")
|
||||
else
|
||||
mt_irc.say(from, "You are not logged in")
|
||||
end
|
||||
end})
|
||||
|
||||
mt_irc.register_bot_command("cmd", {
|
||||
|
Reference in New Issue
Block a user