From 9d48eee70155560c7b6d85162cfec52e7413aa2b Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Sun, 26 Jan 2003 15:20:06 +0000 Subject: [PATCH] Tweaked fix for 2-bans-needed-trick a bit. I was checking against last virthost, now always checking against cloaked host... Just feels better :P. --- Changes | 1 + src/s_user.c | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) 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