Throttling easterners

If you run multiple blogs in more than one timezone with one installation of MT 2.66x, you (or, worse yet, your visitors) may have noticed that commenting on a blog that’s farther east will prevent you from commenting on a blog farther west from that same IP address until the local time catches up. Comment on a blog in EST at 5pm PST, and you then have to wait until 8pm PST to comment on a blog in PST on that same installation of MT.

The reason it works that way isn’t especially interesting, and I don’t see any reasonable way to fix it so that you can still throttle across all the blogs in an installation, but luckily it’s simple to fix it so that it only throttles based on how long ago someone at the same IP address commented on the same blog.

However, you’ll have to go to the extended entry to see the actual fix, since just thinking about the idea of IP address based throttling and banning, ignoring dialup, and DHCP, and dozens or hundreds of people behind one NAT router, and open proxies, and ISP caches, and, and, and, makes me ranty enough that I don’t want to leave any more of it than I have to out here where I’ll see it. So if you need to not ban people who comment on one of the blogs on your installation for several hours, see you over yonder…

In whichever file is doing your actual throttling ({MTdir}/lib/MT/App/Comments.pm or {MTdir}/extlib/jayallen/MTBlPost.pm if you are using MT-Blacklist 1.63), look for two lines:

    if (MT::Comment->count({ ip => $user_ip,
       created_on => [$from] },
     {range => {created_on => 1} }))

and

    my $count =  MT::Comment->count({ ip => $user_ip,
         created_on => [$from] },
       { range => {created_on => 1}});

and in both cases add blog_id => $entry->blog_id, after the ip => $user_ip,, so that you have

    if (MT::Comment->count({ ip => $user_ip,
       blog_id => $entry->blog_id,
       created_on => [$from] },
     {range => {created_on => 1} }))

and

    my $count =  MT::Comment->count({ ip => $user_ip,
         blog_id => $entry->blog_id,
         created_on => [$from] },
       { range => {created_on => 1}});

6 Comments

Trackback by www.takegawa.net #
2004-02-06 16:49:29

if you are using two different time zones

i publish multiple blog from one mt system…like everyone else. one of which is running based on japanese time zone while the rest of them uses est. i run into the problem of not being able to comment on my…

 
Trackback by WWW.TAKEGAWA.NET #
2004-02-07 09:05:54

MT上??時差

昨日英語?サイト?コメント?返事を書??込も????ら何回や??も「THROTTLE COMMENT?扱??コメント?更新?れ?ん。MT2.661???IPアドレス?ら?PINGをディフォル…

 
2004-03-22 13:45:39

MT上??時差

昨日英語?サイト?コメント?返事を書??込も????ら何回や??も「THROTTLE COMMENT?扱??コメント?更新?れ?ん。MT2.661???IPアドレス?ら?PINGをディフォル…

 
Trackback by adot's notblog* #
2004-04-19 17:59:33

comment problems

I know that we’re still experiencing problems with comments here (and at other mozillazine-hosted weblogs) and kerz says he’s going to look into it as soon as he has some free time. I apologize for the problem but it’s not my fault. It’s not kerz’ prob…

 
2004-09-24 13:08:34

Comment spam throttling

I’ve found another way to limit comment spam on my site, with the ThrottleSeconds variable and some modifications sugested by Phil Ringnalda and Jacques Distler. And then I extended it some more.

 
Trackback by babbage.tv #
2004-12-23 16:52:04

technical announcement: comments broken

Greetings esteemed readers. It has been brought to my attention this morning that the babbage.tv comment system appears to be broken. Even on the first attempt to post a comment the system initiates flood controls, and tells the commenter that…

 
Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <del datetime="" cite=""> <dd> <dl> <dt> <em> <i> <ins datetime="" cite=""> <kbd> <li> <ol> <p> <pre> <q cite=""> <samp> <strong> <sub> <sup> <ul> in your comment.