XMPP bounce message when too long (ticket #112)

darcs-hash:20080818213031-f6e2c-760cbb6f91485bbb8b29156c06a16e9ad6cd0acf.gz
This commit is contained in:
CiaranG 2008-08-18 17:30:31 -04:00
parent ea40dabb39
commit 5022a9efb9
1 changed files with 4 additions and 0 deletions

View File

@ -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);
}
}