diff options
author | Evan Prodromou <evan@controlezvous.ca> | 2008-06-23 18:36:41 -0400 |
---|---|---|
committer | Evan Prodromou <evan@controlezvous.ca> | 2008-06-23 18:36:41 -0400 |
commit | ae40dfe842c034263a49e2dbbde5c19ac9515c19 (patch) | |
tree | ccfd88c8de279646b079d4a343b738f1718bd7c4 /xmppdaemon.php | |
parent | e4f5893f7331325c37d7030b3895a94f23f80e33 (diff) |
add imsettings to menu
darcs-hash:20080623223641-34904-2758e19c70026a0c169e99d86481d87b0b4bc79c.gz
Diffstat (limited to 'xmppdaemon.php')
-rw-r--r-- | xmppdaemon.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/xmppdaemon.php b/xmppdaemon.php index e055182c9..aa402b1e2 100644 --- a/xmppdaemon.php +++ b/xmppdaemon.php @@ -58,7 +58,7 @@ class XMPPDaemon { $resource = $matches[3]; return strtolower($node.'@'.$server); } - + function handle() { while(!$this->conn->disconnected) { $payloads = $this->conn->processUntil(array('message', 'presence', @@ -81,6 +81,12 @@ class XMPPDaemon { } function handle_message(&$pl) { + if ($pl['type'] != 'chat') { + return; + } + if (strlen($pl['body']) == 0) { + return; + } $from = $this->normalize_jid($pl['from']); $user = User::staticGet('jabber', $from); if (!$user) { |