added EventHandler idea (not implemented, yet)
authorpk910 <philipp@zoelle1.de>
Tue, 26 Jul 2011 10:50:28 +0000 (12:50 +0200)
committerpk910 <philipp@zoelle1.de>
Tue, 26 Jul 2011 10:50:28 +0000 (12:50 +0200)
Uplink/EventHandler.interface.php [new file with mode: 0644]
Uplink/Uplink.class.php

diff --git a/Uplink/EventHandler.interface.php b/Uplink/EventHandler.interface.php
new file mode 100644 (file)
index 0000000..01eb98a
--- /dev/null
@@ -0,0 +1,49 @@
+<?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.       *
+ *                                                                      *
+ ************************************************************************
+ * 
+ *  Uplink/EventHandler.interface.php
+ *
+ * This file contains the Uplink EventHandler interface.
+ *
+ */
+
+interface EventHandler {
+       
+       public function event_newserver($server);
+       public function event_squit($server);
+       
+       public function event_connect($user, $isBurst);
+       public function event_quit($user, $reason);
+       
+       public function event_join($user, $channel, $isBurst);
+       public function event_part($user, $channel, $reason);
+       public function event_kick($user, $target, $channel, $reason);
+       public function event_mode($user, $channel, $modes);
+       
+       public function event_chanmessage($user, $channel, $message);
+       public function event_channotice($user, $channel, $message);    
+       public function event_privmessage($user, $channel, $message);
+       public function event_privnotice($user, $channel, $message);
+       
+}
+
+?>
\ No newline at end of file
index cd6e49bf492e52d52914fdd98b2dd133ed7f7671..b49c3f6ef763fb90437d02138ef9c87eb7393513 100644 (file)
@@ -46,6 +46,9 @@
  *
  * void setValidateServer(String $name, String $password)
  *     sets additional security relevant information about the remote server.
+ *
+ * void setEventHandler(EventHandler $event_handler)
+ *     sets the EventHandlder
  */
 require_once("Client.class.php");
 require_once("Numerics.class.php");
@@ -340,7 +343,6 @@ class Uplink {
        }
        
        private function recv_burst($from, $args) {
-               //AK B #aide 1292621006 +tn ALAMH:o
                $name = $args[0];
                $create_time = $args[1];
                $channel = P10_Channel::getChannelByName($name);