|
| Author |
Message |
lenthamen Newbie

Joined: 15 Jul 2006 Posts: 4 Location: NL  
|
Posted: Wed Jul 19, 2006 6:19 am Post subject: Too many new conversations requested. |
|
|
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 I'm not changing my status / display name...
Len |
|
| Back to top |
|
 |
darkmonkey The Merovingian

Joined: 18 Apr 2004 Posts: 2557 Location: London, England
     votes: 7
|
Posted: Wed Jul 19, 2006 9:50 am Post subject: |
|
|
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

Joined: 15 Jul 2006 Posts: 4 Location: NL  
|
Posted: Wed Jul 19, 2006 11:50 am Post subject: |
|
|
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  |
|
| Back to top |
|
 |
Mojave Almost An Agent

Joined: 01 Nov 2003 Posts: 1434
 
|
Posted: Wed Jul 19, 2006 7:59 pm Post subject: |
|
|
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

Joined: 15 Jul 2006 Posts: 4 Location: NL  
|
Posted: Thu Jul 20, 2006 8:33 am Post subject: |
|
|
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

Joined: 03 Feb 2004 Posts: 3776 Location: Michigan
  votes: 4
|
Posted: Thu Jul 20, 2006 3:49 pm Post subject: |
|
|
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 |
|
 |
|