summaryrefslogtreecommitdiff
path: root/scripts/xmppdaemon.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-12-22 16:44:19 -0800
committerEvan Prodromou <evan@status.net>2009-12-22 16:44:19 -0800
commitf6bf9529805cd58fdd1671dd9b133bde05e8ae87 (patch)
treecf272bd1105da48f016b635db4d9c34810adcbda /scripts/xmppdaemon.php
parentf987273f118a12d443b6789c2ab59d7a4b01f678 (diff)
parent30c2e2ce83282f0bc268153d7ec465fbb5cf00ca (diff)
Merge branch 'testing'
Diffstat (limited to 'scripts/xmppdaemon.php')
-rwxr-xr-xscripts/xmppdaemon.php20
1 files changed, 0 insertions, 20 deletions
diff --git a/scripts/xmppdaemon.php b/scripts/xmppdaemon.php
index e52e2a6af..20105b602 100755
--- a/scripts/xmppdaemon.php
+++ b/scripts/xmppdaemon.php
@@ -195,17 +195,6 @@ class XMPPDaemon extends Daemon
} else if ($this->is_otr($pl['body'])) {
$this->log(LOG_INFO, 'Ignoring OTR from ' . $from);
return;
- } else if ($this->is_direct($pl['body'])) {
- $this->log(LOG_INFO, 'Got a direct message ' . $from);
-
- preg_match_all('/d[\ ]*([a-z0-9]{1,64})/', $pl['body'], $to);
-
- $to = preg_replace('/^d([\ ])*/', '', $to[0][0]);
- $body = preg_replace('/d[\ ]*('. $to .')[\ ]*/', '', $pl['body']);
-
- $this->log(LOG_INFO, 'Direct message from '. $user->nickname . ' to ' . $to);
-
- $this->add_direct($user, $body, $to, $from);
} else {
$this->log(LOG_INFO, 'Posting a notice from ' . $user->nickname);
@@ -284,15 +273,6 @@ class XMPPDaemon extends Daemon
}
}
- function is_direct($txt)
- {
- if (strtolower(substr($txt, 0, 2))=='d ') {
- return true;
- } else {
- return false;
- }
- }
-
function from_site($address, $msg)
{
$text = '['.common_config('site', 'name') . '] ' . $msg;