summaryrefslogtreecommitdiff
path: root/scripts/xmppdaemon.php
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/xmppdaemon.php')
-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);
}
}