summaryrefslogtreecommitdiff
path: root/src/irc/core/channel-events.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/irc/core/channel-events.c')
-rw-r--r--src/irc/core/channel-events.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/irc/core/channel-events.c b/src/irc/core/channel-events.c
index e6c1839c..ff53d9b0 100644
--- a/src/irc/core/channel-events.c
+++ b/src/irc/core/channel-events.c
@@ -67,8 +67,9 @@ static void event_duplicate_channel(IRC_SERVER_REC *server, const char *data)
p = strchr(channel, ' ');
if (p != NULL) *p = '\0';
- if (channel[0] == '!' && channel[1] == '!') {
- chanrec = channel_find(SERVER(server), channel+1);
+ if (channel[0] == '!') {
+ chanrec = channel_find(SERVER(server),
+ channel+(channel[1] == '!'));
if (chanrec != NULL && !chanrec->names_got) {
chanrec->left = TRUE;
channel_destroy(chanrec);