]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Rename Phergie_Plugin_Statusnet_Callback to Phergie_Plugin_StatusnetCallback
authorLuke Fitzgerald <lw.fitzgerald@googlemail.com>
Wed, 21 Jul 2010 14:37:10 +0000 (07:37 -0700)
committerLuke Fitzgerald <lw.fitzgerald@googlemail.com>
Wed, 21 Jul 2010 14:39:19 +0000 (07:39 -0700)
plugins/Irc/extlib/phergie/Phergie/Plugin/StatusnetCallback.php [new file with mode: 0644]
plugins/Irc/extlib/phergie/Phergie/Plugin/Statusnet_Callback.php [deleted file]
plugins/Irc/ircmanager.php

diff --git a/plugins/Irc/extlib/phergie/Phergie/Plugin/StatusnetCallback.php b/plugins/Irc/extlib/phergie/Phergie/Plugin/StatusnetCallback.php
new file mode 100644 (file)
index 0000000..545ee34
--- /dev/null
@@ -0,0 +1,63 @@
+<?php\r
+/**\r
+ * StatusNet - the distributed open-source microblogging tool\r
+ *\r
+ * This program is free software: you can redistribute it and/or modify\r
+ * it under the terms of the GNU Affero General Public License as published by\r
+ * the Free Software Foundation, either version 3 of the License, or\r
+ * (at your option) any later version.\r
+ *\r
+ * This program is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+ * GNU Affero General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU Affero General Public License\r
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.\r
+ *\r
+ * Calls the given Statusnet IM architecture enqueuing method to enqueue\r
+ * a new incoming message\r
+ *\r
+ * @category  Phergie\r
+ * @package   Phergie_Plugin_StatusnetCallback\r
+ * @author    Luke Fitzgerald <lw.fitzgerald@googlemail.com>\r
+ * @copyright 2010 StatusNet, Inc.\r
+ * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0\r
+ * @link      http://status.net/\r
+ */\r
+\r
+class Phergie_Plugin_StatusnetCallback extends Phergie_Plugin_Abstract {\r
+    /**\r
+    * Callback details\r
+    *\r
+    * @var array\r
+    */\r
+    protected $callback;\r
+\r
+    /**\r
+    * Load callback from config\r
+    */\r
+    public function onLoad() {\r
+        $callback = $this->config['statusnetcallback.callback'];\r
+        if (is_callable($callback)) {\r
+            $this->callback = $callback;\r
+        } else {\r
+            $this->callback = NULL;\r
+        }\r
+    }\r
+\r
+    /**\r
+     * Passes incoming messages to StatusNet\r
+     *\r
+     * @return void\r
+     */\r
+    public function onPrivmsg() {\r
+        if ($this->callback !== NULL) {\r
+            $event = $this->getEvent();\r
+            $source = $event->getSource();\r
+            $message = trim($event->getText());\r
+\r
+            call_user_func($this->callback, array('sender' => $source, 'message' => $message));\r
+        }\r
+    }\r
+}\r
diff --git a/plugins/Irc/extlib/phergie/Phergie/Plugin/Statusnet_Callback.php b/plugins/Irc/extlib/phergie/Phergie/Plugin/Statusnet_Callback.php
deleted file mode 100644 (file)
index 7bc2877..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php\r
-/**\r
- * StatusNet - the distributed open-source microblogging tool\r
- *\r
- * This program is free software: you can redistribute it and/or modify\r
- * it under the terms of the GNU Affero General Public License as published by\r
- * the Free Software Foundation, either version 3 of the License, or\r
- * (at your option) any later version.\r
- *\r
- * This program is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- * GNU Affero General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Affero General Public License\r
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.\r
- *\r
- * Calls the given Statusnet IM architecture enqueuing method to enqueue\r
- * a new incoming message\r
- *\r
- * @category  Phergie\r
- * @package   Phergie_Plugin_Statusnet_Callback\r
- * @author    Luke Fitzgerald <lw.fitzgerald@googlemail.com>\r
- * @copyright 2010 StatusNet, Inc.\r
- * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0\r
- * @link      http://status.net/\r
- */\r
-\r
-class Phergie_Plugin_Statusnet_Callback extends Phergie_Plugin_Abstract {\r
-    /**\r
-    * Callback details\r
-    *\r
-    * @var array\r
-    */\r
-    protected $callback;\r
-\r
-    /**\r
-    * Load callback from config\r
-    */\r
-    public function onLoad() {\r
-        $callback = $this->config['statusnet_callback.callback'];\r
-        if (is_callable($callback)) {\r
-            $this->callback = $callback;\r
-        } else {\r
-            $this->callback = NULL;\r
-        }\r
-    }\r
-\r
-    /**\r
-     * Passes incoming messages to StatusNet\r
-     *\r
-     * @return void\r
-     */\r
-    public function onPrivmsg() {\r
-        if ($this->callback !== NULL) {\r
-            $event = $this->getEvent();\r
-            $source = $event->getSource();\r
-            $message = trim($event->getText());\r
-\r
-            call_user_func($this->callback, array('sender' => $source, 'message' => $message));\r
-        }\r
-    }\r
-}\r
index ea98263a539c5ac31811da9ce2f920514a8107ce..480d4c8f6cd44190642544bef947fb3d161ba206 100644 (file)
@@ -123,7 +123,7 @@ class IrcManager extends ImManager {
 
                     'nickserv.password' => $nickservpassword,
                     'autojoin.channels' => $channels,
-                    'statusnet_callback.callback' => array($this, 'handle_irc_message')
+                    'statusnetcallback.callback' => array($this, 'handle_irc_message')
                 )
             );