View Issue Details

IDProjectCategoryView StatusLast Update
0002678unrealircdpublic2006-04-16 18:33
ReporterNazzy Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
OSlinuxOS Version2.6 
Product Version3.2.4 
Fixed in Version3.2.5 
Summary0002678: A curiousity in is_banned()
DescriptionI've not quite figured out why this is there ... but I'm sure it can be removed ... I'll patch it tomorrow, unless someone can point out why it is in there?

        if (sptr->user->virthost)
                if (strcmp(sptr->user->realhost, sptr->user->virthost))
                {
                        dovirt = 1; // Here we set the flag...
                }

        s = make_nick_user_host(sptr->name, sptr->user->username,
            sptr->user->realhost);
        strlcpy(realhost, s, sizeof realhost);

        if (dovirt) // Here we use it, but why is it seperate?
        {
                s = make_nick_user_host(sptr->name, sptr->user->username,
                    sptr->user->virthost);
                strlcpy(virthost, s, sizeof virthost);
                ban_virthost = virthost;
        }
TagsNo tags attached.
3rd party modules

Activities

syzop

2005-11-08 09:50

administrator   ~0010665

Last edited: 2005-11-08 09:56

Uhm, you will see dovirt being used later again near the match() stuff ;).
Oh ok, I guess you were only talking about merging these blocks, keeping the flag.

But anyway, dovirt will always be 1 so the code can be simplified; 2 years ago or so I made it so user->virthost will ALWAYS be present (upon -x the cloaked host gets still stored in user->virthost so it can be used for ban checking).

syzop

2005-11-08 09:56

administrator   ~0010666

On an unrelated sidenote, I'm not so sure all of these (future) cleanups will be in the 3.2* cvs... Pretty much all of them fix no bugs, only introduce the possible chance of adding a bug.
That said, feel free to submit them, it's not useless, they will be used in 3.3* cvs [*] (later), which will be a major source cleanup anyway ;).

[*] not anything substantional atm

syzop

2006-04-16 18:33

administrator   ~0011562

indirectly this change got in when recoding part of is_banned :)

Issue History

Date Modified Username Field Change
2005-11-07 21:20 Nazzy New Issue
2005-11-08 09:50 syzop Note Added: 0010665
2005-11-08 09:56 syzop Note Added: 0010666
2005-11-08 09:56 syzop Note Edited: 0010665
2006-04-16 18:33 syzop Status new => closed
2006-04-16 18:33 syzop Note Added: 0011562
2006-04-16 18:33 syzop Resolution open => fixed
2006-04-16 18:33 syzop Fixed in Version => 3.2.5