  
      my $message_length = length($message_chunk);
      DEBUG("Sending message $yday-$hour-$messages_this_hour $message_length bytes to $recipient");
-@@ -1134,6 +1160,22 @@
+@@ -1134,6 +1169,45 @@
      $self->jabber_client->Subscription(type=>"unsubscribe", to=>$user);
      $self->jabber_client->Subscription(type=>"unsubscribed",to=>$user);
  }
 +
++=item B<IsInRoomJid>
++
++Returns grep if JID is present at specified forum
++
++=cut
++
++sub IsInRoomJid {
++    my $self = shift;
++    my $forum = shift;
++    my $jid = shift;
++    my $qnick = quotemeta($jid);
++
++    return 0 if(
++       !defined $forum || !defined $jid || !defined $self->JidDB->{"jid_$forum"}
++    );
++
++    my @ret = grep {/^$qnick$/i} values $self->JidDB->{"jid_$forum"};
++    return @ret;
++}
 +=item B<IsInRoom>
 +
-+Returns 1 or 0 if nick is present at specified forum
++Returns grep if nick is present at specified forum
 +
 +=cut
 +

+    my $self = shift;
+    my $forum = shift;
+    my $nick = shift;
+
+    return 0 if(!defined $forum || !defined $nick);
+
+    return $self->JidDB->{$forum}->{$nick} || 0;
+}
 =back
 

--- Bot.pm.old	2016-01-09 19:49:41.801668822 +0300
+++ Bot.pm	2016-03-27 16:32:40.369766217 +0300
@@ -12,7 +12,7 @@
 use Time::HiRes;
 use Sys::Hostname;
 use Log::Log4perl qw(:easy);
-#use Data::Dumper; #For testing only.
+#use Data::Dumper; #For @ret;
 
 
 coerce Bool, from Str, 
@@ -49,17 +49,18 @@
 has 'loop_sleep_time'     => (isa => PosNum, is => 'rw', default => 5);
 has 'process_timeout'     => (isa => PosNum, is => 'rw', default => 5);
