unity-src
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Unity-irc3] Banning from the entire network, part two


From: David Westley
Subject: Re: [Unity-irc3] Banning from the entire network, part two
Date: Wed, 09 Apr 2003 22:59:42 +0100

Nope you didn't get me wrong... I was being an idiot because as I was writing 
the first part of my reply I realised what you were doing :)

What about if we do it like this...

ServerA adds a ban for *.some.l33t.h0st.net for 5d at level 3
ServerB adds a ban for *.some.l33t.h0st.net for 12h at level 5
ServerC adds a ban for *.l33t.h0st.net for 2d at level 9

now obviously following the levels system the level 9 for 2d will take 
priority but... when it expires in 2d the level 3 ban for 5d should still be 
in effect as it was a valid ban in the first place if it isn't then we might 
as well just replace the ban instead of leaving it there, like the way G-lines 
are done... it looks to see if the gline already exists, if it does it simply 
resets its expiry time, obviously we should do that as well as change the 
level number so long as it is higher than the existing one and the same with 
the expiry time... but they should be exclusive... so that if a level 3 ban 
for 5d exists and someone places a level 9 ban for 2d then it should change 
the level 3 ban to a level 9 ban but still for 5d not 2d.

Hope that makes sense? (I've been at work for 13 hours today and kinda still 
running on adrenaline!)

-----Original Message-----
From: Jan Krueger <address@hidden>
To: "irc3 (Unity) public discussion" <address@hidden>
Date: Wed, 09 Apr 2003 22:46:56 +0200
Subject: Re: [Unity-irc3] Banning from the entire network, part two

> David Westley <address@hidden> wrote on 2003-04-09 20:56:
> > Are you sure the levels should add together? If you add the levels
> together,
> > suppose several servers add level 1 and level 2 bans for the same mask... 
> > ummm... scratch that I see what you are doing... I'm being an idiot :)
> No need for any further explanations then, or did I get you wrong this time?
> ;)
> 
> > Different note... I assume a higher level ban will over-rule a lower level
> > ban, like... a level 1 server adds a ban... then a level 4 server adds the
> > same ban as it wasn't from a trusted source originally but then the level 1
> > server tries to remove it... that should fail shouldn't it?
> After both servers have set the ban there will be two bans for the same mask.
> Now if one of the servers withdraws their version of the ban, it gets removed
> and the other one remains. What we get by this is:
> 
> - ban durations are preserved. If a low-level server adds a long-timed ban
> and
>   a high-level server adds the same ban with a short duration, thus
> activating
>   the ban on most servers, the higher-level ban will go away when it expires,
>   leaving only the low-level ban. Most servers will now deactivate the ban
>   locally since the level is too low now.
>   Example (same groups as earlier):
> 
>   snoke adds a ban that lasts 7d, tiscali adds the same ban with a duration
> of
>   2h. The ban will now most likely get active on most of the servers in the
>   QuakeNet group. After two hours, the tiscali ban vanishes, leaving only the
>   level 1 ban set by snoke. The ban won't be powerful enough now so it will
> be
>   deactivated on most servers.
> 
> When I come to think about it, the "score" (i.e. sum of all the levels of all
> bans on the same mask) is enough to let servers decide whether to pick up a
> ban.
> 
> A little bit of pseudo code on the blacklist server:
> 
> int GetGlobalBanScore(char* mask, int groupid) {
>   int i;
>   int score = 0;
>   GlobalBan bans[MAXBANSPERMASK] = FindBansByMask(mask);
> 
>   for (i=0; i < MAXBANSPERMASK; i++) {
>     if (bans[i].mask == NULL) break;
>     if (!IsGroupMember(bans[i].setby, groupid)) continue;
>     score += bans[i].score;
>   }
> 
>   return score;
> }
> 
> void OnReceiveNewBan(Server* server, char* mask, int level) {
>   int i;
>   int groups[MAXGROUPS] = GetServerGroups(server);
> 
>   for (i=0; i < MAXGROUPS; i++) {
>     int oldlevel = GetGlobalBanScore(mask, groups[i]);
>     int newlevel = oldlevel + max(GetServerLevel(server, groups[i]), level);
> 
>     SendBanToGroup(groups[i], mask, newlevel);
>   }
> }
> 
> (and so on)
> 
> What do you think?
> 
> Jan
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]