Fix logout command
This commit is contained in:
parent
4d5e43a039
commit
cf358a572c
|
@ -278,6 +278,7 @@ func (handler *CommandHandler) CommandLogout(ce *CommandEvent) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ce.Reply("Logged out successfully.")
|
ce.Reply("Logged out successfully.")
|
||||||
|
ce.User.Conn.LoginInfo = nil
|
||||||
if ce.User.Conn.Refresh != nil {
|
if ce.User.Conn.Refresh != nil {
|
||||||
ce.User.Conn.Refresh <- -1
|
ce.User.Conn.Refresh <- -1
|
||||||
} else {
|
} else {
|
||||||
|
|
1
user.go
1
user.go
|
@ -432,7 +432,6 @@ func (user *User) monitorSession(ce *CommandEvent) {
|
||||||
leavePortals(ce)
|
leavePortals(ce)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ce.Reply("Session expired\nStore your password into database with command `save-password` to resolve this issue.")
|
|
||||||
close(user.Conn.Refresh)
|
close(user.Conn.Refresh)
|
||||||
leavePortals(ce)
|
leavePortals(ce)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue