public function getOnlineStatus($nick)
 {
     $query = new Query("SELECT");
     $query->where("channel_name = ?", Config::getVal("general", "channel"));
     $query->where("nickname = ?", $nick);
     $channelUserBeanSet = ChannelUserBean::select($query);
     $channelUserBean = $channelUserBeanSet[0];
     if ($channelUserBean) {
         return true;
     } else {
         return false;
     }
 }
 /**
  * Gets all the currently online users on the
  * channel and returns them as an array, sorted by
  * privileges
  *
  * @return array online users sorted by privileges
  */
 public function getOnlineUsers()
 {
     $query = new Query("SELECT");
     $query->where("channel_name = ?", Config::getVal("general", "channel"));
     $users = ChannelUserBean::select($query);
     $orderedUsers = array();
     foreach ($users as $user) {
         if ($user->privilege == "~") {
             $orderedUsers[] = $user;
         }
     }
     foreach ($users as $user) {
         if ($user->privilege == "&") {
             $orderedUsers[] = $user;
         }
     }
     foreach ($users as $user) {
         if ($user->privilege == "@") {
             $orderedUsers[] = $user;
         }
     }
     foreach ($users as $user) {
         if ($user->privilege == "%") {
             $orderedUsers[] = $user;
         }
     }
     foreach ($users as $user) {
         if ($user->privilege == "+") {
             $orderedUsers[] = $user;
         }
     }
     foreach ($users as $user) {
         if ($user->privilege == "") {
             $orderedUsers[] = $user;
         }
     }
     return $orderedUsers;
 }