6 public $Plist = array();
9 // Constructeur de la classe
10 public function __construct($server, $port, $channel, $name, $myip, $mydomain) {
11 // Récupération d'une connexion unique
12 IRCConn
::Init($server, $port, $channel, $name, $myip, $mydomain);
13 $this->MyConn
= IRCConn
::GetInstance();
14 // On charge le plugin de base indispensable
15 $this->AddPlug('plug_base');
18 public function run() {
20 $this->msg
= $this->MyConn
->get();
21 foreach ($this->Plist
as $Plug) {
22 $Plug->start($this->msg
);
27 public function AddPlug($Pname) {
28 if ( !array_key_exists ( $Pname, $this->Plist
) ) {
29 $this->Plist
[$Pname] = new $Pname($this);
33 public function UnloadPlug($Pname) {
34 if ( array_key_exists ( $Pname, $this->Plist
) ) {
35 unset( $this->Plist
[$Pname] );