2 class sample
implements plugin
{
3 private $IRCConn,$formater;
6 public function __construct($main) {
7 $this->IRCConn
= IRCConn
::GetInstance();
8 $this->formater
= text_format
::GetInstance();
11 public function commands_list() {
13 'method1' => array( // !sample method1
15 'help' => 'some help for this method1',
18 'method2' => array( // !sample method2 arg
20 // the \n chr in a double quote string create a new line (2 PRIVMSG)
21 'help' => "some help for this method2\n".$this->formater
->bold('one arg').' requier',
24 'method3' => array( // /msg BotName sample method3 arg
26 'help' => 'some help for this method3',
33 public function current_message ($message) {
36 'type' => PRIVMSG|NOTICE,
37 'from' => Nick (reply to),
38 'to' => BotName / ChannelName,
39 'message' => The message
42 $this->message
= $message;
46 $this->IRCConn
->privmsg(IRCConn
::$channel,'This is the method1');
49 function method2 ($query) {
50 $this->IRCConn
->privmsg(IRCConn
::$channel,'This is the method2 : '.$query);
53 function method3 ($query,$replyto) {
54 $this->IRCConn
->privmsg($replyto,'This is the method3 : '.$query);