Erebot  latest
A modular IRC bot for PHP 7.0+
Erebot\Identd\Worker Class Reference

A worker process for the Identification Protocol (RFC 1413). More...

+ Inheritance diagram for Erebot\Identd\Worker:

Public Member Functions

 __construct (\Erebot\Interfaces\Core $bot, $socket)
 
 __destruct ()
 Destructor.
 
 connect ()
 
 disconnect ($quitMessage=null)
 
 getBot ()
 
 getConfig ($chan)
 
 getIO ()
 
 getSocket ()
 
 isConnected ()
 
 process ()
 Processes commands queued in the input buffer.
 
 read ()
 
 write ()
 

Protected Member Functions

 handleMessage ($line)
 

Protected Attributes

 $bot
 A bot object implementing the Erebot::Interfaces::Core interface.
 
 $io
 I/O manager for the socket.
 
 $socket
 The underlying socket, represented as a stream.
 

Detailed Description

A worker process for the Identification Protocol (RFC 1413).

See Also
http://www.ietf.org/rfc/rfc1413.txt

Definition at line 30 of file Worker.php.

Constructor & Destructor Documentation

Erebot\Identd\Worker::__construct ( \Erebot\Interfaces\Core  $bot,
  $socket 
)

Creates a worker object capable of handling a single identification request. As soon as the request has been handled and a response has been sent, this worker will destroy itself.

Parameters
Erebot::Interfaces::Core$botInstance of the bot to operate on.
resource$socketA socket connected to a client requesting an identification from our IdentD server.

Definition at line 57 of file Worker.php.

References Erebot\Identd\Worker\$bot, Erebot\Identd\Worker\$socket, and Erebot\LineIO\EOL_WIN.

Member Function Documentation

Erebot\Identd\Worker::handleMessage (   $line)
protected

Handles an IdentD request.

Parameters
string$lineIdentD request to handle.
Return values
stringMessage to send as the response to this request.
falseThe request was malformed.

Definition at line 123 of file Worker.php.

References Erebot\Identd\Worker\$socket.

Referenced by Erebot\Identd\Worker\process().


The documentation for this class was generated from the following file: