forked from GNUsocial/gnu-social
Lots more work - Implemented nickname checking
This commit is contained in:
@@ -66,6 +66,27 @@ class Phergie_StatusnetBot extends Phergie_Bot {
|
||||
$this->getProcessor()->handleEvents();
|
||||
}
|
||||
|
||||
/**
|
||||
* Close the current connection and reconnect to the server
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function reconnect() {
|
||||
$driver = $this->getDriver();
|
||||
$sockets = $driver->getSockets();
|
||||
|
||||
// Close any existing connections
|
||||
try {
|
||||
$driver->forceQuit();
|
||||
} catch (Phergie_Driver_Exception $e){}
|
||||
try {
|
||||
$driver->doConnect();
|
||||
} catch (Phergie_Driver_Exception $e){
|
||||
$driver->forceQuit();
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the sockets used by the bot
|
||||
*
|
||||
|
Reference in New Issue
Block a user