diff --git a/Changes b/Changes index 89489ec80..56c653434 100644 --- a/Changes +++ b/Changes @@ -1823,3 +1823,4 @@ seen. gmtime warning still there - Optimization: channel msg routine now 10-30% faster. - Fixed 2-bans-needed-trick. (#0000626) - Minor documentation update for SVSNLINE. (#0000651) +- Tweaked fix for 2-bans-needed-trick a bit. diff --git a/src/s_user.c b/src/s_user.c index 92cb244e8..326ce72c0 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -2479,8 +2479,6 @@ CMD_FUNC(m_umode) MSG_SETHOST, TOK_SETHOST, "%s", sptr->user->virthost); } -/* Disabled because we use this for checking bans against virthosts -- Syzop */ -#if 0 if (!IsHidden(sptr) && (setflags & UMODE_HIDE)) { if (sptr->user->virthost) @@ -2488,8 +2486,12 @@ CMD_FUNC(m_umode) MyFree(sptr->user->virthost); sptr->user->virthost = NULL; } + /* (Re)create the cloaked virthost, because it will be used + * for ban-checking... free+recreate here because it could have + * been a vhost for example. -- Syzop + */ + sptr->user->virthost = (char *)make_virthost(sptr->user->realhost, sptr->user->virthost, 1); } -#endif /* * If I understand what this code is doing correctly... * If the user WAS an operator and has now set themselves -o/-O