unregister users that fail to log in to the upstream hub

This commit is contained in:
mappu 2018-06-04 19:45:08 +12:00
parent 8134143daa
commit 804691a476

View File

@ -328,6 +328,10 @@ func (this *NTFServer) HandleHubMessage(msg upstreamMessage) {
log.Printf("Delivering public message to group chat: %s", err.Error())
}
case libnmdc.EVENT_BAD_LOGIN_FAILURE:
this.DirectMessageTelegramUser(msg.telegramUserId, "The hub disconnected in a permanent way (login failure?). Consider re-registering with a different nick.")
this.kickAndDrop(msg.telegramUserId)
case libnmdc.EVENT_USER_JOINED, libnmdc.EVENT_USER_PART, libnmdc.EVENT_USER_UPDATED_INFO, libnmdc.EVENT_USERCOMMAND, libnmdc.EVENT_DEBUG_MESSAGE, libnmdc.EVENT_HUBNAME_CHANGED:
// ignore