Notify when using !logout and not logged in

This commit is contained in:
ShadowNinja 2013-03-27 22:26:29 -04:00
parent 607f3a02ad
commit 05d1c81f1f
1 changed files with 6 additions and 2 deletions

View File

@ -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)
irc_users[from] = nil if irc_users[from] then
mt_irc.say(from, "You are now logged off") 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}) end})
mt_irc.register_bot_command("cmd", { mt_irc.register_bot_command("cmd", {