User Control Panel
Advertisements

HELP US, HELP YOU!

Too many new conversations requested.

 
Post new topic   Reply to topic    Bot Depot Forum Index -> Code Help
View unanswered posts
Author Message
lenthamen
Newbie
Newbie


Joined: 15 Jul 2006
Posts: 4
Location: NL

PostPosted: Wed Jul 19, 2006 6:19 am    Post subject: Too many new conversations requested. Reply with quote

I'm working on a bot that send out news highlights.

Messages are sended out like this:

Code:

if ($news) {
   foreach my $email ($msn->getContactList('AL')) {
      $msn->call($email, $news);
      sleep 5;
   }
}


A lot of messages never get there, because I get "800" errors: "Display Name/Status Changed too Rapidly / Too many new conversations requested."

Currently there are only 20 test users on the list. I'm using a "sleep 5" between each send. What am I doing wrong Confused I'm not changing my status / display name...

Len
Back to top
darkmonkey
The Merovingian
The Merovingian


Joined: 18 Apr 2004
Posts: 2557
Location: London, England
Reputation: 39.3Reputation: 39.3Reputation: 39.3Reputation: 39.3
votes: 7

PostPosted: Wed Jul 19, 2006 9:50 am    Post subject: Reply with quote

You've requested "too many new conversations". I'm not sure exactly how to get around this, but you could try doing something inbetween so you're not JUST making new conversations (calling) ...that could get around the MSNP's "spam" protection:

$msn-call($email, $news);
$self->sendMessage("$email has been notified...");

Although this is in fact putting extra load on the servers, it may get around this particular problem.

Other than that, you could give the contacts their news in a less intrusive form - using the PSM, a !news command or even the bot's display name.

I for one would certainly get tired of "bot updates" messaged every day or w/eva. It's ok if you give an option to "opt out" though :]

_________________
~ Josh
[ Need bot hosting on a dedicated server? PM me. ]
Back to top
lenthamen
Newbie
Newbie


Joined: 15 Jul 2006
Posts: 4
Location: NL

PostPosted: Wed Jul 19, 2006 11:50 am    Post subject: Reply with quote

The msn->call() function checks if a conversation still exist, and use that instead of creating a new one:

Code:

In MSN/Notification.pm, sub call:

       # see if we already have a conversation going with the contact being called
        my $convo = $self->{Msn}->findMember( $handle );

        # if so, simply send them this message
        if( $convo )
        {
                $convo->sendMessage( $message, %style );
        }
        # otherwise, open a switchboard and save the message for later delivery
        else
        {
                # try to get a new switchboard


So basically a new switchboard call is done only if there's no conversation yet.
Unfortunately MSN clients sent a "BYE" after several minutes even if they keep the conv window is kept open.

The problem here is that I'm pushing Sport news (goals, results, etc), so I can't solve it by just adding a 10 minute delay Wink
Back to top
Mojave
Almost An Agent
Almost An Agent


Joined: 01 Nov 2003
Posts: 1434

Reputation: 66.4

PostPosted: Wed Jul 19, 2006 7:59 pm    Post subject: Reply with quote

Avoid using sleep at all costs. Sleep freezes your script, preventing MSN from sending and receiving messages it needs.

Instead of sending out bulk messages all at once, try sending them over a small time period. Say you have 600 users on this bot and they all need to get a news update. Send 30 per minute for 20 minutes.
Back to top
lenthamen
Newbie
Newbie


Joined: 15 Jul 2006
Posts: 4
Location: NL

PostPosted: Thu Jul 20, 2006 8:33 am    Post subject: Reply with quote

Hey Mojave,

Thanks for the reply. The sleep was a try to see if it would fix the "Too many conversation requests" problem. Apparently it didn't.

However, I fixed it by adding the contacts to the FL list, and explicitly check if a user is online before calling them.

Len
Back to top
Cer
Upgraded Agent
Upgraded Agent


Joined: 03 Feb 2004
Posts: 3776
Location: Michigan
Reputation: 146.9
votes: 4

PostPosted: Thu Jul 20, 2006 3:49 pm    Post subject: Reply with quote

A theory is that because of the sleeps, your bot was sending call after call after call right in a row through its socket to MSN. If your bot wasn't doing sleeps, the MSN module might send some pings in too. To MSN, it probably looks like your connection just had a 5 second lag and that you were just spamming.
_________________
Current Site (2008) http://www.cuvou.com/
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Bot Depot Forum Index -> Code Help All times are GMT
Page 1 of 1

 



Protected by phpBB Security phpBB-TweakS
phpBB Security Has Blocked 9 Exploit Attempts.
Antispam Captcha Mod by phpbb-security.com
Powered by phpBB © 2001, 2005 phpBB Group