From 9b32682c8a15f7979cf1adeb80b9cef9b293226a Mon Sep 17 00:00:00 2001 From: mappu Date: Mon, 4 Apr 2016 19:01:55 +1200 Subject: [PATCH] libnmdc: support hub-redirects --- src/libnmdc/libnmdc.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/libnmdc/libnmdc.go b/src/libnmdc/libnmdc.go index fd94341..e9b22a7 100644 --- a/src/libnmdc/libnmdc.go +++ b/src/libnmdc/libnmdc.go @@ -315,15 +315,13 @@ func (this *HubConnection) processProtocolMessage(message string) { this.State = CONNECTIONSTATE_CONNECTED } - case "$UserCommand": - // $UserCommand 1 1 Group chat\New group chat$<%[mynick]> !groupchat_new|| - // TODO - case "$ForceMove": - // TODO + this.Hco.Address = HubAddress(commandParts[1]) + this.conn.Close() // we'll reconnect onto the new address // IGNORABLE COMMANDS case "$Supports": + case "$UserCommand": // TODO $UserCommand 1 1 Group chat\New group chat$<%[mynick]> !groupchat_new|| case "$UserList": case "$OpList": case "$HubTopic":