From 07e35b82c6d9ba075d42f8b0401d0616fbfc929c Mon Sep 17 00:00:00 2001 From: Treeki Date: Thu, 23 Jan 2014 02:10:53 +0100 Subject: force user to leave channels when disconnected from server --- ircserver.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ircserver.cpp') diff --git a/ircserver.cpp b/ircserver.cpp index 7e20310..31cbd6d 100644 --- a/ircserver.cpp +++ b/ircserver.cpp @@ -73,6 +73,9 @@ void IRCServer::connectedEvent() { void IRCServer::disconnectedEvent() { printf("[IRCServer:%p] disconnectedEvent\n", this); status.pushMessage("Disconnected."); + + for (auto &i : channels) + i.second->disconnected(); } void IRCServer::lineReceivedEvent(char *line, int size) { printf("[%d] { %s }\n", size, line); -- cgit v1.2.3