summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCiaranG <ciaran@ciarang.com>2008-08-18 17:30:31 -0400
committerCiaranG <ciaran@ciarang.com>2008-08-18 17:30:31 -0400
commit5022a9efb957c6d308d3c729739c2c6c48694002 (patch)
tree0a998861676bb01e0a163da8b70928e1b373b965
parentea40dabb392aec3d7b9da666285969bb296a94e2 (diff)
XMPP bounce message when too long (ticket #112)
darcs-hash:20080818213031-f6e2c-760cbb6f91485bbb8b29156c06a16e9ad6cd0acf.gz
-rwxr-xr-xscripts/xmppdaemon.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/xmppdaemon.php b/scripts/xmppdaemon.php
index 327854ccd..1aa789e7e 100755
--- a/scripts/xmppdaemon.php
+++ b/scripts/xmppdaemon.php
@@ -176,6 +176,10 @@ class XMPPDaemon {
$this->log(LOG_INFO, 'Ignoring OTR from ' . $from);
return;
} else {
+ if(strlen($pl['body'])>140) {
+ $this->from_site($from, 'Message too long - maximum is 140 characters, you sent ' . strlen($pl['body']));
+ return;
+ }
$this->add_notice($user, $pl);
}
}