コード例 #1
0
ファイル: MessageObject.php プロジェクト: Westie/OUTRAGEbot
 /**
  *	Called when the message object is loaded.
  */
 public function __construct($sString)
 {
     $this->Raw = $sString;
     $this->Parts = explode(' ', $sString);
     $this->Numeric = strtoupper($this->Parts[1]);
     $this->User = CoreMaster::parseHostmask(substr($this->Parts[0], 1));
     $this->Payload = ($iPosition = strpos($sString, ' :', 2)) !== false ? substr($sString, $iPosition + 2) : '';
 }
コード例 #2
0
ファイル: Channel.php プロジェクト: Westie/OUTRAGEbot
 /**
  *	Get the channel exception list.
  */
 public function getExceptionList()
 {
     CoreChannel::$mTemp = array();
     $pSocket = $this->internalMasterObject()->getCurrentSocket();
     $pSocket->Output("MODE {$this->sChannel} +e");
     $pSocket->executeCapture(function ($sString) {
         $pMessage = Core::getMessageObject($sString);
         switch ($pMessage->Numeric) {
             case "348":
                 CoreChannel::$mTemp[] = (object) array('hostmaskString' => $pMessage->Parts[4], 'hostmaskObject' => CoreMaster::parseHostmask($pMessage->Parts[4]), 'modeSetter' => $pMessage->Parts[5], 'modeTime' => $pMessage->Parts[6]);
                 return false;
             case "349":
                 return true;
         }
         return false;
     });
     $mTemp = CoreChannel::$mTemp;
     CoreChannel::$mTemp = null;
     return $mTemp;
 }