Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace Kitsune\ClubPenguin\Plugins\PrivateChat;
- use Kitsune\Logging\Logger;
- use Kitsune\ClubPenguin\Packets\Packet;
- use Kitsune\ClubPenguin\Plugins\Base\Plugin;
- final class PrivateChat extends Plugin {
- public $worldHandlers = array(
- "s" => array(
- "m#pm" => array("handlePrivateChat", self::After)
- )
- );
- public $xmlHandlers = array(null);
- public $loginServer = true;
- public function __construct($server) {
- $this->server = $server;
- }
- public function onReady() {
- parent::__construct(__CLASS__);
- }
- function handlePrivateChat($data, $str, $clientid){
- $client = $this->clients[$clientid];
- $id = $data[4];
- if(!$this->isOnline($id) or $id == $client->ID)
- return false;
- $this->sendToID(makeXt("pm", -1, $client->ID, $client->loginName, trim(strip_tags($data[5]))), $id);
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment