Zeile 293 | Zeile 293 |
---|
// See if the sender is on the recipients ignore list and that either // - admin_override is set or // - sender is an administrator
|
// See if the sender is on the recipients ignore list and that either // - admin_override is set or // - sender is an administrator
|
if(($this->admin_override != true && $sender_permissions['cancp'] != 1) && $sender_permissions['canoverridepm'] != 1)
| if($this->admin_override != true && $sender_permissions['canoverridepm'] != 1)
|
{ if(!empty($user['ignorelist']) && strpos(','.$user['ignorelist'].',', ','.$pm['fromid'].',') !== false) {
|
{ if(!empty($user['ignorelist']) && strpos(','.$user['ignorelist'].',', ','.$pm['fromid'].',') !== false) {
|
$this->set_error('recipient_is_ignoring', array($user['username']));
| $this->set_error("recipient_is_ignoring", array(htmlspecialchars_uni($user['username'])));
|
}
// Is the recipient only allowing private messages from their buddy list?
| }
// Is the recipient only allowing private messages from their buddy list?
|
Zeile 309 | Zeile 309 |
---|
// Can the recipient actually receive private messages based on their permissions or user setting? if(($user['receivepms'] == 0 || $recipient_permissions['canusepms'] == 0) && empty($pm['saveasdraft'])) {
|
// Can the recipient actually receive private messages based on their permissions or user setting? if(($user['receivepms'] == 0 || $recipient_permissions['canusepms'] == 0) && empty($pm['saveasdraft'])) {
|
$this->set_error("recipient_pms_disabled", array($user['username']));
| $this->set_error("recipient_pms_disabled", array(htmlspecialchars_uni($user['username'])));
|
return false; } }
| return false; } }
|
Zeile 359 | Zeile 359 |
---|
if($this->admin_override != true) {
|
if($this->admin_override != true) {
|
$this->set_error("recipient_reached_quota", array($user['username']));
| $this->set_error("recipient_reached_quota", array(htmlspecialchars_uni($user['username'])));
|
} }
| } }
|
Zeile 395 | Zeile 395 |
---|
$pm = &$this->data;
// Check if post flooding is enabled within MyBB or if the admin override option is specified.
|
$pm = &$this->data;
// Check if post flooding is enabled within MyBB or if the admin override option is specified.
|
if($mybb->settings['pmfloodsecs'] > 0 && $pm['fromid'] != 0 && $this->admin_override == false)
| if($mybb->settings['pmfloodsecs'] > 0 && $pm['fromid'] != 0 && $this->admin_override == false && !is_moderator(0, '', $pm['fromid']))
|
{ // Fetch the senders profile data. $sender = get_user($pm['fromid']);
| { // Fetch the senders profile data. $sender = get_user($pm['fromid']);
|
Zeile 405 | Zeile 405 |
---|
$sender['lastpm'] = $db->fetch_field($query, "dateline");
// A little bit of calculation magic and moderator status checking.
|
$sender['lastpm'] = $db->fetch_field($query, "dateline");
// A little bit of calculation magic and moderator status checking.
|
if(TIME_NOW-$sender['lastpm'] <= $mybb->settings['pmfloodsecs'] && !is_moderator("", "", $pm['fromid']))
| if(TIME_NOW-$sender['lastpm'] <= $mybb->settings['pmfloodsecs'])
|
{ // Oops, user has been flooding - throw back error message. $time_to_wait = ($mybb->settings['pmfloodsecs'] - (TIME_NOW-$sender['lastpm'])) + 1;
| { // Oops, user has been flooding - throw back error message. $time_to_wait = ($mybb->settings['pmfloodsecs'] - (TIME_NOW-$sender['lastpm'])) + 1;
|