diff --git a/NTFServer.go b/NTFServer.go index c56062a..5963ded 100644 --- a/NTFServer.go +++ b/NTFServer.go @@ -287,9 +287,14 @@ func (this *NTFServer) HandleHubMessage(msg upstreamMessage) { switch msg.evt.EventType { - case libnmdc.EVENT_SYSTEM_MESSAGE_FROM_CONN, libnmdc.EVENT_CONNECTION_STATE_CHANGED: + case libnmdc.EVENT_SYSTEM_MESSAGE_FROM_CONN, libnmdc.EVENT_SYSTEM_MESSAGE_FROM_HUB: + // This includes "want to register your nick?" and chat-catchup messages + // Don't mirror them into telegram log.Printf("Hub(%s): * %s", msg.hubNick, msg.evt.Message) + case libnmdc.EVENT_CONNECTION_STATE_CHANGED: + log.Printf("Hub(%s): * Connection %s", msg.evt.StateChange.String()) + case libnmdc.EVENT_PRIVATE: err := this.DirectMessageTelegramUser(msg.telegramUserId, fmt.Sprintf("PM from user '%s': %s", msg.evt.Nick, msg.evt.Message)) if err != nil {