diff --git a/drupalchat.module b/drupalchat.module index c925bab..e562a77 100644 --- a/drupalchat.module +++ b/drupalchat.module @@ -689,6 +689,10 @@ function drupalchat_send() { if (!drupal_valid_token($form_token, $form_id)) { return; } + //Create role for users who are shadowbanned. Get the RID from the roles table. My RID was 6. + if (isset($user->roles[6]) == 1) { + return; + } $message = (object) array( 'message_id' => check_plain($_POST['drupalchat_message_id']), 'uid1' => ($user->uid)?$user->uid:'0-'._drupalchat_get_sid(), @@ -1588,4 +1592,4 @@ function drupalchat_get_random_name() { $f_contents = file($path); $line = trim($f_contents[rand(0, count($f_contents) - 1)]); return $line; -} \ No newline at end of file +}