--- /dev/null
+<?php
+/********************************* PHP-P10 ******************************
+ * P10 uplink class by pk910 (c)2011 pk910 *
+ ************************************************************************
+ * Version 2 (OOP) *
+ * *
+ * PHP-P10 is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with PHP-P10; if not, write to the Free Software Foundation, *
+ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
+ * *
+ ************************************************************************
+ *
+ * BotLoader/Bot.class.php
+ *
+ * bots' parent class.
+ *
+ */
+require_once("Bot.class.php");
+
+class BotLoader {
+ private $uplink;
+
+ public function __construct($uplink) {
+ $this->uplink = $uplink;
+ }
+
+ public function loadBots() {
+
+ }
+
+}
+
+?>
\ No newline at end of file
$this->uplink->join($this->example_bot, "#test");
//now we want to say something...
//but note: thats the startup procedure! the p10 server is not connected to an uplink, yet - so noone would recive our message (only the other bots on this server)
- }
+ }
+
} else {
$this->example_bot = $old; //We've saved out Bot reference in $old so we can simply use it again...
}
//please don't trigger any blocking functions here... that would cause an extreme lagg!
}
+ public function unload($rehash = false) { //this function is triggered, when the Bot is unloaded... If it's just a rehash the return value of this method is passed to $old in the load method.
+ return $this->example_bot;
+ }
+
public function recive_privmsg($user, $channel, $message) {
//We've got a privmsg...
$exp=explode(" ",$message);
*/
require_once("Uplink/Uplink.class.php");
require_once("ModCMD/ModCMD.class.php");
+require_once("BotLoader/BotLoader.class.php");
//basicly here is nothing, yet :D
$uplink = new Uplink();
$uplink->initialize();
+$botloader = new BotLoader($uplink);
+$botloader->loadBots();
+
while(true) {
$uplink->loop();
}