summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/channels.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/channels.cpp b/src/channels.cpp
index dc42ea651..f07ad01bd 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -426,6 +426,17 @@ chanrec* add_channel(userrec *user, const char* cn, const char* key, bool overri
}
}
}
+ else
+ {
+ for (unsigned int index =0; index < user->chans.size(); index++)
+ {
+ if (user->chans[index]->channel == Ptr)
+ {
+ user->chans[index]->channel = NULL;
+ user->chans[index]->uc_modes = 0;
+ }
+ }
+ }
return NULL;
}