diff --git a/chatroom.chatroom.inc b/chatroom.chatroom.inc
index 63908c6..b328373 100755
--- a/chatroom.chatroom.inc
+++ b/chatroom.chatroom.inc
@@ -18,9 +18,14 @@ class Chatroom {
   protected $allowedRids = array();
 
   /**
-   * List of user uids allowed in this chat.
+   * List of user uids allowed watch in this chat.
    */
   protected $allowedUids = array();
+  
+  /**
+   * List of role ids allowed to post in this chat.
+   */
+  protected $allowedPostRids = array();
 
   protected $cid = 0;
 
@@ -33,19 +38,24 @@ class Chatroom {
   protected $latestMessage = FALSE;
 
   protected $onlineUsers = array();
+  
+  protected $archived = FALSE;
 
   public function __construct($cid = FALSE) {
+    
     if ($cid) {
       $data = db_query('SELECT * FROM {chatroom} WHERE cid = :cid', array(':cid' => $cid))->fetchObject();
       if ($data) {
         $this->cid = $data->cid;
         $this->public = $data->public;
+        $this->archived = $data->archived;
         $this->title = $data->title;
         $this->format = $data->format ? $data->format : filter_fallback_format();
         $this->loadAllowedRoles();
+        $this->loadAllowedPostRoles();
         $this->loadAllowedUids();
         $this->loadLatestMessage();
-      }
+      }      
     }
   }
 
@@ -81,12 +91,21 @@ class Chatroom {
 
   protected function loadAllowedRoles() {
     $this->allowedRids = array();
-    $roles = db_query('SELECT rid FROM {chatroom_role} WHERE cid = :cid', array(':cid' => $this->cid))->fetchAll();
+    $roles = db_query('SELECT rid FROM {chatroom_role} WHERE cid = :cid AND level = :level', array(':cid' => $this->cid, ':level' => 'view'))->fetchAll();
     foreach ($roles as $role) {
       $this->allowedRids[$role->rid] = $role->rid;
     }
     return $this->allowedRids;
   }
+  
+    protected function loadAllowedPostRoles() {
+    $this->allowedPostRids = array();
+    $roles = db_query('SELECT rid FROM {chatroom_role} WHERE cid = :cid AND level = :level', array(':cid' => $this->cid, ':level' => 'post'))->fetchAll();
+    foreach ($roles as $role) {
+      $this->allowedPostRids[$role->rid] = $role->rid;
+    }
+    return $this->allowedPostRids;
+  }
 
   protected function loadAllowedUids() {
     $this->allowedUids = array();
@@ -202,11 +221,23 @@ class Chatroom {
   protected function updateRids() {
     $sql = "DELETE
             FROM {chatroom_role}
-            WHERE cid = :cid";
-    db_query($sql, array(':cid' => $this->get('cid')));
+            WHERE cid = :cid AND level = :level";
+    db_query($sql, array(':cid' => $this->get('cid'), ':level' => 'view'));
 
     foreach ($this->allowedRids as $rid) {
-      $data = array('rid' => $rid, 'cid' => $this->get('cid'));
+      $data = array('rid' => $rid, 'cid' => $this->get('cid'), 'level' => 'view');
+      drupal_write_record('chatroom_role', $data);
+    }
+  }
+  
+  protected function updatePostRids() {
+    $sql = "DELETE
+            FROM {chatroom_role}
+            WHERE cid = :cid AND level = :level";
+    db_query($sql, array(':cid' => $this->get('cid'), ':level' => 'post'));
+
+    foreach ($this->allowedPostRids as $rid) {
+      $data = array('rid' => $rid, 'cid' => $this->get('cid'), 'level' => 'post');
       drupal_write_record('chatroom_role', $data);
     }
   }
@@ -225,6 +256,7 @@ class Chatroom {
       $data = array(
         'title' => $this->title,
         'public' => $this->public,
+        'archived' => $this->archived,
         'uid' => $this->uid,
         'format' => $this->format,
       );
@@ -240,6 +272,9 @@ class Chatroom {
       if ($this->hasChanged('allowedRids')) {
         $this->updateRids();
       }
+      if ($this->hasChanged('allowedPostRids')) {
+        $this->updatePostRids();
+      }
       if ($this->hasChanged('allowedUids')) {
         $this->updateUids();
       }
diff --git a/chatroom.install b/chatroom.install
index d960dc9..6a554c2 100644
--- a/chatroom.install
+++ b/chatroom.install
@@ -86,6 +86,13 @@ function chatroom_schema() {
         'not null' => TRUE,
         'description' => 'Role id of the role allowed in this chat.',
       ),
+      'level' => array(
+        'type' => 'varchar',
+        'description' => "Access Level",
+        'length' => 255,
+        'not null' => FALSE,
+        'default' => 'view',
+      )
     ),
     'indexes' => array(
       'cid' => array('cid'),
diff --git a/chatroom.module b/chatroom.module
index 1143bf8..2eb0f88 100644
--- a/chatroom.module
+++ b/chatroom.module
@@ -103,6 +103,11 @@ function chatroom_field_widget_form(&$form, &$form_state, $field, $instance, $la
           '#type' => 'checkbox',
           '#default_value' => $chatroom->get('public'),
         ),
+        'chatroom_archived' => array(
+          '#title' => t('Is this chatroom archived?'),
+          '#type' => 'checkbox',
+          '#default_value' => $chatroom->get('archived'),
+        ),
         'chatroom_cid' => array(
           '#type' => 'value',
           '#value' => $chatroom->get('cid'),
@@ -112,6 +117,16 @@ function chatroom_field_widget_form(&$form, &$form_state, $field, $instance, $la
           '#title' => 'Which roles have access to this chatroom',
           '#options' => user_roles(TRUE),
           '#default_value' => $chatroom->get('allowedRids'),
+          '#multiple' => true,
+          '#size' => 6,
+        ),
+          'chatroom_roles_post' => array(
+          '#type' => 'select',
+          '#title' => 'Which roles have access to post messages to this chatroom',
+          '#options' => user_roles(TRUE),
+          '#default_value' => $chatroom->get('allowedPostRids'),
+          '#multiple' => true,
+          '#size' => 6,
         ),
       ),
     );
@@ -155,8 +170,10 @@ function chatroom_field_insert($entity_type, $entity, $field, $instance, $langco
     $chatroom = new Chatroom();
     $chatroom->set('title', $item['chatroom']['chatroom_title']);
     $chatroom->set('public', $item['chatroom']['chatroom_public']);
+    $chatroom->set('archived', $item['chatroom']['chatroom_archived']);
     $chatroom->set('uid', $user->uid);
-    $chatroom->set('allowedRids', array($item['chatroom']['chatroom_roles']));
+    $chatroom->set('allowedRids', array_keys($item['chatroom']['chatroom_roles']));
+    $chatroom->set('allowedPostRids', array_keys($item['chatroom']['chatroom_roles_post']));
     if (isset($item['chatroom']['chatroom_format'])) {
       $chatroom->set('format', $item['chatroom']['chatroom_format']);
     }
@@ -175,8 +192,10 @@ function chatroom_field_update($entity_type, $entity, $field, $instance, $langco
     $chatroom = new Chatroom($item['chatroom']['chatroom_cid']);
     $chatroom->set('title', $item['chatroom']['chatroom_title']);
     $chatroom->set('public', $item['chatroom']['chatroom_public']);
+    $chatroom->set('archived', $item['chatroom']['chatroom_archived']);
     $chatroom->set('uid', $user->uid);
-    $chatroom->set('allowedRids', array($item['chatroom']['chatroom_roles']));
+    $chatroom->set('allowedRids', array_keys($item['chatroom']['chatroom_roles']));
+    $chatroom->set('allowedPostRids', array_keys($item['chatroom']['chatroom_roles_post']));
     if (isset($item['chatroom']['chatroom_format'])) {
       $chatroom->set('format', $item['chatroom']['chatroom_format']);
     }
@@ -710,7 +729,8 @@ function theme_chatroom_irc($variables) {
     $output .= theme('chatroom_message', array('message' => $message, 'chatroom' => $chatroom));
   }
   $output .= '</div></div>';
-  $output .= theme('chatroom_irc_buttons', array('chatroom' => $chatroom));
+  if(!$chatroom->get('archived'))
+    $output .= theme('chatroom_irc_buttons', array('chatroom' => $chatroom));
   return $output;
 }
 
@@ -742,8 +762,12 @@ function theme_chatroom_irc_user_list($variables) {
  */
 function theme_chatroom_irc_buttons($variables) {
   $chatroom = $variables['chatroom'];
-  $form = drupal_get_form('chatroom_irc_buttons_form_' . $chatroom->get('cid'), $chatroom);
-  return '<div class="chatroom-irc-buttons" id="chatroom-chat-buttons-' . $chatroom->get('cid') . '">' . drupal_render($form) . '</div>';
+  global $user;
+  $intersection = array_intersect(array_keys($chatroom->get('allowedPostRids')), array_keys($user->roles));
+  if(!empty($intersection)){
+    $form = drupal_get_form('chatroom_irc_buttons_form_' . $chatroom->get('cid'), $chatroom);
+    return '<div class="chatroom-irc-buttons" id="chatroom-chat-buttons-' . $chatroom->get('cid') . '">' . drupal_render($form) . '</div>';
+  }
 }
 
 /**
