From 187ef2996dc092c7dfcf45c9418f7d325b22e3bc Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Thu, 22 May 2003 18:52:11 +0000 Subject: [PATCH] - Fixed bug in HOOKTYPE_LOCAL_JOIN which could cause 0-member-channels if a hook returned 1 and the channel was new. --- Changes | 2 ++ src/channel.c | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/Changes b/Changes index d28784ed6..5e7d33dd9 100644 --- a/Changes +++ b/Changes @@ -2188,3 +2188,5 @@ seen. gmtime warning still there reported by _loco_ (#0000991). - Fixed a bug in the win32 editor reported by ChAoS^TiGeR - Fixed /map bug that permitted trivial finding of U-lined servers +- Fixed bug in HOOKTYPE_LOCAL_JOIN which could cause 0-member-channels if a hook returned + 1 and the channel was new. diff --git a/src/channel.c b/src/channel.c index 61bfbb7a0..92274aa04 100644 --- a/src/channel.c +++ b/src/channel.c @@ -2896,7 +2896,12 @@ CMD_FUNC(do_join) } } if (breakit) + { + /* Rejected... if we just created a new chan we should destroy it too. -- Syzop */ + if (!chptr->users) + sub1_from_channel(chptr); continue; + } } /*