ExplodingVortex

Privatechat plugin for Kitsune

Jul 3rd, 2016
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. <?php
  2.  
  3. namespace Kitsune\ClubPenguin\Plugins\PrivateChat;
  4.  
  5. use Kitsune\Logging\Logger;
  6. use Kitsune\ClubPenguin\Packets\Packet;
  7. use Kitsune\ClubPenguin\Plugins\Base\Plugin;
  8.  
  9. final class PrivateChat extends Plugin {
  10.  
  11. public $worldHandlers = array(
  12. "s" => array(
  13. "m#pm" => array("handlePrivateChat", self::After)
  14. )
  15. );
  16.  
  17. public $xmlHandlers = array(null);
  18.  
  19. public $loginServer = true;
  20.  
  21. public function __construct($server) {
  22. $this->server = $server;
  23. }
  24.  
  25. public function onReady() {
  26. parent::__construct(__CLASS__);
  27. }
  28.  
  29. function handlePrivateChat($data, $str, $clientid){
  30. $client = $this->clients[$clientid];
  31. $id = $data[4];
  32. if(!$this->isOnline($id) or $id == $client->ID)
  33. return false;
  34. $this->sendToID(makeXt("pm", -1, $client->ID, $client->loginName, trim(strip_tags($data[5]))), $id);
  35. }
  36. }
  37. ?>
Advertisement
Add Comment
Please, Sign In to add comment