3 class plug_admin
implements plugin
{
8 public function __construct($main) {
12 public function start($IRCtxt) {
16 public function help(){
17 $msg[] = 'connect <user> <password> : Vous authentifie au bot';
21 public function auth($IRCtext) {
22 if (preg_match('`^:(.*?)!.*?@.*? PRIVMSG '.$this->main
->MyConn
->myBotName
." :connect ([^ ]+) ([^\n\r]+)\n\r`",$IRCtext,$T)) {
23 if ($T[2] == 'admin' && $T[3] == 'mypass') {
25 $this->main
->MyConn
->put('PRIVMSG '.$T[1].' :Vous etes bien connecte.');
27 $this->main
->MyConn
->put('PRIVMSG '.$T[1].' :Erreur.');