summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-07-15 15:31:06 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-07-15 15:31:06 -0400
commit3da84feabd10c93211d1dc8aadb82d4faeaee79b (patch)
tree9cb2450ab432abb3526acff5cd6af45e7108e169 /plugins
parent8b1ac4ea2084ec8d4a1fb0439e1ad327ac573097 (diff)
Build channel strings in Meteor plugin
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Meteor/MeteorPlugin.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/plugins/Meteor/MeteorPlugin.php b/plugins/Meteor/MeteorPlugin.php
index 89c79e7de..d54d565bd 100644
--- a/plugins/Meteor/MeteorPlugin.php
+++ b/plugins/Meteor/MeteorPlugin.php
@@ -76,7 +76,7 @@ class MeteorPlugin extends RealtimePlugin
function _updateInitialize($timeline, $user_id)
{
$script = parent::_updateInitialize($timeline, $user_id);
- return $script." MeteorUpdater.init(\"$this->webserver\", $this->webport, \"{$this->channelbase}{$timeline}\");";
+ return $script." MeteorUpdater.init(\"$this->webserver\", $this->webport, \"{$timeline}\");";
}
function _connect()
@@ -93,8 +93,7 @@ class MeteorPlugin extends RealtimePlugin
{
$message = json_encode($message);
$message = addslashes($message);
- common_debug("Message = $message\n");
- $cmd = "ADDMESSAGE {$this->channelbase}{$channel} $message\n";
+ $cmd = "ADDMESSAGE $channel $message\n";
$cnt = fwrite($this->_socket, $cmd);
$result = fgets($this->_socket);
if (preg_match('/^ERR (.*)$/', $result, $matches)) {
@@ -108,4 +107,14 @@ class MeteorPlugin extends RealtimePlugin
$cnt = fwrite($this->_socket, "QUIT\n");
@fclose($this->_socket);
}
+
+ // Meteord flips out with default '/' separator
+
+ function _pathToChannel($path)
+ {
+ if (!empty($this->channelbase)) {
+ array_unshift($path, $this->channelbase);
+ }
+ return implode('-', $path);
+ }
}