- Corrected PhotoSticker bug in phpmsnclass

- Update time till next ping when a command is sent
This commit is contained in:
Luke Fitzgerald 2010-06-13 03:42:21 +01:00
parent dc66503f33
commit 0083e58db3
2 changed files with 11 additions and 10 deletions

View File

@ -180,7 +180,7 @@ class MSN {
$this->retry_wait = isset($Configs['retry_wait']) ? $Configs['retry_wait'] : 30;
$this->backup_file = isset($Configs['backup_file']) ? $Configs['backup_file'] : true;
$this->update_pending = isset($Configs['update_pending']) ? $Configs['update_pending'] : true;
$this->PhotoStickerFile=$Configs['PhotoSticker'];
$this->PhotoStickerFile=isset($Configs['PhotoSticker']) ? $Configs['PhotoSticker'] : false;
$this->IgnoreList=isset($Configs['IgnoreList'])?$Configs['IgnoreList']:false;
if($this->Emotions = isset($Configs['Emotions']) ? $Configs['Emotions']:false)
{
@ -3626,15 +3626,8 @@ X-OIM-Sequence-Num: 1
$this->SB_writedata($aMessage);
if (feof($this->SBFp))
{
// lost connection? error? try OIM later
@fclose($this->SBFp);
//TODO introduce callback to add offline message to queue?
return false;
}
$this->SB_writeln("OUT");
@fclose($this->SBFp);
// Don't close the SB session, we might as well leave it open
return true;
}
@ -3651,6 +3644,10 @@ X-OIM-Sequence-Num: 1
return true;
}
private function getSBSession($to) {
}
public function sendMessage($message, $to) {
if($message != '') {
list($name,$host,$network)=explode('@',$to);

View File

@ -139,6 +139,10 @@ class MsnManager extends ImManager
return false;
}
$this->conn->sflapSend($data[0],$data[1],$data[2],$data[3]);
// Sending a command updates the time till next ping
$this->lastping = time();
$this->pingInterval = 50;
return true;
}
}