Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Module extends IRC {
- public $Buffer;
- public function Init() {
- $this->Mods = array("core");
- foreach($this->Mods as $Mod) {
- require_once("Modules/mod.$Mod/Main.php");
- $this->$Mod = new $Mod();
- echo "Loaded Module: $Mod\r\n";
- }
- }
- public function GetBuffer($Buffer) {
- $this->Buffer = $Buffer; // This is reading the raw line from the IRCd. I wouldn't process anything off of this, unless you are really good with REGEX.
- $this->BufferBits = explode(" ", $this->Buffer); // This breaks down the big line of shit into something more easy to base triggers off of...
- $PersonRegex = preg_split("/[:!@]/", $this->BufferBits[0], 0, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
- $this->Peron = array (
- 'NICKNAME' => $PersonRegex[0],
- 'HOST' => $PersonRegex[2],
- 'IDENT' => $PersonRegex[1]
- );
- $this->Command = $this->BufferBits[3];
- foreach ($this->Mods as $Mod) {
- $this->$Mod->PassInfo($Command = $this->Command);
- }
- print_r($this->Buffer);
- echo "\r\n";
- print_r($this->BufferBits);
- echo "\r\n";
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement