User Control Panel
Advertisements
HELP US, HELP YOU!
Author
Message
DaZe Newbie Joined: 12 Apr 2005Posts: 1
Posted: Tue Apr 12, 2005 1:48 pm Post subject:
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