added Bot class (simple method dummy) & fixed some bugs
authorpk910 <philipp@zoelle1.de>
Wed, 27 Jul 2011 11:11:23 +0000 (13:11 +0200)
committerpk910 <philipp@zoelle1.de>
Wed, 27 Jul 2011 11:11:23 +0000 (13:11 +0200)
BotLoader/Bot.class.php [new file with mode: 0644]
Uplink/Uplink.class.php
main.php

diff --git a/BotLoader/Bot.class.php b/BotLoader/Bot.class.php
new file mode 100644 (file)
index 0000000..21641c7
--- /dev/null
@@ -0,0 +1,45 @@
+<?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.
+ *
+ */
+
+class Bot {
+       
+       public function load($uplink, $oldDatas = null) {
+       
+       }
+       
+       public function unload() {
+       
+       }
+       
+       public function loop() {
+       
+       }
+
+}
+
+?>
\ No newline at end of file
index 037d4633170c904026ee89f5f144e87294f52c94..524d392c1084db3e72e6e8cb632c43d34e807a98 100644 (file)
@@ -330,7 +330,7 @@ class Uplink {
                        $this->server->addServer($new_server);
                        $this->flags |= self::FLAG_P10SESSION | self::FLAG_BURST_PENDING;
                        if($this->eventHandler)
                        $this->server->addServer($new_server);
                        $this->flags |= self::FLAG_P10SESSION | self::FLAG_BURST_PENDING;
                        if($this->eventHandler)
-                               $this->eventHandler->event_server($new_server, !($this->flags & self::FLAG_CONNECTED));
+                               $this->eventHandler->event_newserver($new_server, !($this->flags & self::FLAG_CONNECTED));
                } else {
                        //another server got a new slave server ^^
                        $server = P10_Server::getServerByNum($from);
                } else {
                        //another server got a new slave server ^^
                        $server = P10_Server::getServerByNum($from);
@@ -341,7 +341,7 @@ class Uplink {
                        $new_server = new P10_Server($args[0], substr($args[5],0,2), $server, $args[2], $args[3], $args[7]);
                        $server->addServer($new_server);
                        if($this->eventHandler)
                        $new_server = new P10_Server($args[0], substr($args[5],0,2), $server, $args[2], $args[3], $args[7]);
                        $server->addServer($new_server);
                        if($this->eventHandler)
-                               $this->eventHandler->event_server($new_server, !($this->flags & self::FLAG_CONNECTED));
+                               $this->eventHandler->event_newserver($new_server, !($this->flags & self::FLAG_CONNECTED));
                }
        }
        
                }
        }
        
index 95e82b258bbb20ac4b9a9e7601976955737c814e..5dcf7d93b9dcd0843925f9ccfb6237bd7dcdda32 100644 (file)
--- a/main.php
+++ b/main.php
@@ -26,6 +26,7 @@
  *
  */
 require_once("Uplink/Uplink.class.php");
  *
  */
 require_once("Uplink/Uplink.class.php");
+require_once("ModCMD/ModCMD.class.php");
 
 //basicly here is nothing, yet :D
 $uplink = new Uplink();
 
 //basicly here is nothing, yet :D
 $uplink = new Uplink();