User Control Panel
Advertisements

HELP US, HELP YOU!

MSN 2.0 rev 84 & getContactStatus problem

 
Post new topic   Reply to topic    Bot Depot Forum Index -> MSN Protocol modules
View unanswered posts
Author Message
DaZe
Newbie
Newbie


Joined: 12 Apr 2005
Posts: 1

Reputation: 13

PostPosted: Tue Apr 12, 2005 1:48 pm    Post subject: Reply with quote

While developing a MSN bot i discovered a small glitch using the function getContactStatus on contacts that are offline when you start the bot.


the function getContactStatus in Notification.pm contains the following check:
Code:
<br />        if( !defined $self->{Lists}->{FL}->{$email} || !defined $self->{Lists}-><br />{FL}->{$email}->{Status} )<br />        {<br />                return $self->error( "Contact doesn't exist" );<br />        }<br />


MSN 2.0 does not init the status of contacts on the FL, so running getContactStatus on a user that has been offline all the time (since you started the bot) results in "Contact doesn't exist"

My solution to this problem is a small change in CMD_LST in Notification.pm, which initialy sets the status of all users on the FL to 'FLN'. Patch is below and attached.

Code:
<br />--- Notification.pm.orig   2005-04-12 15:52:27.000000000 +0200<br />+++ Notification.pm   2005-04-12 15:06:21.000000000 +0200<br />@@ -748,6 +748,7 @@<br />     my $RL = $self->{Lists}->{RL};<br />     my $AL = $self->{Lists}->{AL};<br />     my $BL = $self->{Lists}->{BL};<br />+  my $FL = $self->{Lists}->{FL};<br /> <br />     foreach my $handle (keys %$RL)<br />     {<br />@@ -759,6 +760,11 @@<br />    }<br />     }<br /> <br />+  foreach my $handle (keys %$FL)<br />+  {<br />+     $FL->{$handle}->{Status} = 'FLN';<br />+  }<br />+<br />     $self->send( 'CHG', 'NLN ' . $self->{Msn}->{ClientID} );<br />     $self->{Msn}->call_event( $self, "Connected" );<br />  }<br />
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Bot Depot Forum Index -> MSN Protocol modules 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