phpDocumentor phpIcqBot
[ class tree: phpIcqBot ] [ index: phpIcqBot ] [ all elements ]

Source for file shell.module.php

Documentation is available at shell.module.php

  1. <?php
  2. /**
  3.  * phpIcqBot Shell Module
  4.  * 
  5.  * It's a simple remote shell for phpIcqBot PC
  6.  * Usage:
  7.  * !shell <command>
  8.  * 
  9.  * @author Jector <no.one.on@gmail.com>
  10.  * @version 0.2
  11.  * @package phpIcqBot
  12.  * @todo more powerfull shell with saving current dir and etc
  13.  */
  14.  
  15.  
  16. {
  17.     public function init()
  18.     {
  19.         $this->commands->addCommand($this'shell'array('sh'));
  20.     }
  21.     
  22.     public function deinit()
  23.     {
  24.         
  25.     }
  26.     
  27.     /**
  28.      * Simple remote shell
  29.      *
  30.      * @param integer $uin 
  31.      * @param string $params 
  32.      */
  33.     public function Command_Shell($uin$params)
  34.     {
  35.         if (!IcqBot_Users::load($uin)->canRoles('shell'))
  36.         {
  37.             $this->commands->sendMsg($uin"Access denied.");
  38.             return;
  39.         }
  40.     
  41.         $this->commands->sendMsg($uin,convert_cyr_string(`$params`,"d","w"));
  42.     }
  43. }

Documentation generated on Mon, 24 Dec 2007 09:34:34 +0500 by phpDocumentor 1.4.0