Index: chatroom.forms.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/chatroom/chatroom.forms.inc,v
retrieving revision 1.4
diff -u -r1.4 chatroom.forms.inc
--- chatroom.forms.inc	15 Sep 2009 08:44:10 -0000	1.4
+++ chatroom.forms.inc	28 Oct 2009 14:22:28 -0000
@@ -266,6 +266,34 @@
     drupal_add_js('$("#sound_message").attr("href", "javascript:Drupal.chatroom.soundManager.play(\'message\')")', 'inline', 'footer');
     drupal_add_js('$("#sound_user").attr("href", "javascript:Drupal.chatroom.soundManager.play(\'user\')")', 'inline', 'footer');
   }
+    $form['chatroom_profile_picture_support'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('User profile picture support'),
+    '#collapsible' => TRUE,
+    '#collapsed' => TRUE,
+  );
+  $form['chatroom_profile_picture_support']['chatroom_profile_picture'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('User profile picture.'),
+    '#description' => t('Enable User profile picture for chatroom.'),
+    '#default_value' => variable_get('chatroom_profile_picture', 0),
+    '#disabled' => !variable_get('user_pictures', FALSE),
+  );
+  if(module_exists('imagecache')) {
+    // Load imagecache presets
+      $presets = array();
+      $presets[] = '';
+      foreach (imagecache_presets() as $key => $preset) {
+        $presets[$key] = check_plain($preset['presetname']);
+      }
+      $form['chatroom_profile_picture_support']['chatroom_profile_picture_preset'] = array(
+        '#type' => 'select',
+        '#title' => t('Profile picture preset'),
+        '#default_value' => variable_get('chatroom_profile_picture_preset', ''),
+        '#options' => $presets,
+        '#description' => t("This will set the picture size."),
+      );
+  }
   $form['#attributes'] = array('enctype' => 'multipart/form-data');
   return system_settings_form($form);
 }
Index: chatroom.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/chatroom/chatroom.module,v
retrieving revision 1.65
diff -u -r1.65 chatroom.module
--- chatroom.module	15 Sep 2009 08:44:10 -0000	1.65
+++ chatroom.module	28 Oct 2009 13:46:02 -0000
@@ -891,6 +891,7 @@
     SELECT
       s.uid,
       u.name,
+			u.picture,
       col.guest_id
     FROM {chatroom_online_list} col
     JOIN {sessions} s ON s.sid = col.sid
Index: chatroom.theme.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/chatroom/chatroom.theme.inc,v
retrieving revision 1.3
diff -u -r1.3 chatroom.theme.inc
--- chatroom.theme.inc	13 Sep 2009 16:06:59 -0000	1.3
+++ chatroom.theme.inc	28 Oct 2009 14:22:22 -0000
@@ -177,9 +177,22 @@
  * @ingroup themeable
  */
 function theme_chatroom_user_list($users) {
+  $items = array();
   if (!empty($users)) {
     foreach ($users as $user) {
-      $items[] = theme('username', $user);
+      if(variable_get('chatroom_profile_picture', 0)) { // imagecache picture
+        $size = variable_get ('chatroom_profile_picture_preset', 0);
+        if(module_exists('imagecache') && $size && $user->uid) {
+          $preset = imagecache_preset($size);
+          $alt = t("@user's picture", array('@user' => $user->name));
+          $user->picture = theme('imagecache', $preset['presetname'], $user->picture, $alt, $alt);
+          $items[] = $user->picture . theme('username', $user);
+        }else{ // default picture
+          $items[] = theme('user_picture', $user) . theme('username', $user);
+        }
+      }else{ // no picture
+        $items[] = theme('username', $user);
+      }
     }
   }
   $output = theme('item_list', $items);

