Quoting Sofie Van Tendeloo <[EMAIL PROTECTED]>:

> Hey Andrew,
> (mind if I call you Andrew? *grin* :P )
> 
> I can see you know a lot about X and the coder stuff so I thought ....
> let me direct this silly question right to himself as I'm a bit =
> embarresed to send my questions always directly to the entire list.
This looks like a genuine bug, so I am replying to the list.
> 
> It's about X and it's usermode +x.
> A friend of me cloned herself.
> One loged in, the other one not.
> She setted a domain ban on her actual ip (not the hidden host) and X
> banned bot of them.
It depends on whether you just got banned and are in the channel then, or if you
were banned and then joined the channel.

Below is the function that does the checking, when a user joins:

sqlBan* cservice::isBannedOnChan(sqlChannel* theChan, iClient* theClient)
{
vector< sqlBan* >::iterator ptr = theChan->banList.begin();

while (ptr != theChan->banList.end())
        {
        sqlBan* theBan = *ptr;

        if( match(theBan->getBanMask(),
                theClient->getNickUserHost()) == 0)
                        {
                        return theBan;
                        }
        ++ptr;
        } /* while() */

return NULL;
}

Note that it calls getNickUserHost() only, so it only checks the hidden host.

But in BANCommand.cc, when someone tries to ban a user:
for(Channel::userIterator chanUsers = theChannel->userList_begin();
        chanUsers != theChannel->userList_end(); ++chanUsers)
        {
        ChannelUser* tmpUser = chanUsers->second;
        /*
         *  Iterate over channel members, find a match and boot them..
         */

        if( (match(banTarget, tmpUser->getClient()->getNickUserHost()) == 0) ||
                (match(banTarget, tmpUser->getClient()->getRealNickUserHost())
== 0) )
                {
                /* Don't kick +k things */
                if( !tmpUser->getClient()->getMode(iClient::MODE_SERVICES) )
                        {
                        clientsToKick.push_back(tmpUser->getClient());
                        }
                }
        } // for()

note that it checks getRealNickUserHost() and also getNickUserHost(), so it
checks both the real and fake hosts.
> 
> Another friend found that this sounded quiet weired and tryed the same
> with herself.
> X didn't kicked the hidden host of her.
I am guessing she was the join the channel after the ban is set case, while the
first friend was in the channel while the ban was set.
> 
> What is now actually the point. When does X kicks for it? (if you know
> what i'm trying to say).
It does(but shouldn't) depend on whether you are in the channel already. This is
a bug.
>
>
> Hugs
> Sofie aka Kermit-




Reply via email to