Exemplo n.º 1
0
 /**
  * Reply in HTML
  *
  * Send a message back to the sender of this message with HTML formatting
  *
  * @param string $text The message to send
  *
  * @return void
  */
 public function replyHTML($text)
 {
     $this->_bot->messageHtml($this->getReplyAddress(), $text, $this->type);
 }
Exemplo n.º 2
0
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * @package   JabberBot
 * @author    Peter Smith <*****@*****.**>
 * @copyright 2011 Plusnet
 * @license   http://www.opensource.org/licenses/gpl-3.0 GNU General Public License, version 3
 */
require_once 'Bootstrap.inc.php';
declare (ticks=1);
$pid = pcntl_fork();
if ($pid) {
    echo 'Jabber Bot started.  Process pid is ' . $pid . PHP_EOL;
    exit;
}
$bot = new JabberBot_Bot();
while (!$bot->isDisconnected()) {
    $bot->readInbound();
    $bot->checkMessageQueue();
    $bot->pingIfNecessary();
    sleep(2);
}