summaryrefslogtreecommitdiff
path: root/src/irc/core/irc-servers.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/irc/core/irc-servers.c')
-rw-r--r--src/irc/core/irc-servers.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/irc/core/irc-servers.c b/src/irc/core/irc-servers.c
index d7122eae..335c88ef 100644
--- a/src/irc/core/irc-servers.c
+++ b/src/irc/core/irc-servers.c
@@ -32,6 +32,7 @@
#include "irc-queries.h"
#include "irc-servers-setup.h"
#include "irc-servers.h"
+#include "irc-cap.h"
#include "channel-rejoin.h"
#include "servers-idle.h"
#include "servers-reconnect.h"
@@ -201,6 +202,8 @@ static void server_init(IRC_SERVER_REC *server)
conn = server->connrec;
+ irc_send_cmd_now(server, "CAP LS");
+
if (conn->proxy != NULL && conn->proxy_password != NULL &&
*conn->proxy_password != '\0') {
cmd = g_strdup_printf("PASS %s", conn->proxy_password);
@@ -409,7 +412,16 @@ static void sig_disconnected(IRC_SERVER_REC *server)
server_redirect_destroy(tmp->next->data);
}
g_slist_free(server->cmdqueue);
- server->cmdqueue = NULL;
+ server->cmdqueue = NULL;
+
+ gslist_free_full(server->cap_active, (GDestroyNotify) g_free);
+ server->cap_active = NULL;
+
+ gslist_free_full(server->cap_supported, (GDestroyNotify) g_free);
+ server->cap_supported = NULL;
+
+ gslist_free_full(server->cap_queue, (GDestroyNotify) g_free);
+ server->cap_queue = NULL;
/* these are dynamically allocated only if isupport was sent */
g_hash_table_foreach(server->isupport,