how do i alter the includes/integration.php file's online list SQL statements below in order to show only male/female users depending on their gender. that is male sees female that are online and female sees male that are online vise vasa. my user table name is 'users' and my gender filed is 'gender'. thanks in advance for your help.
function get_online_list($userid, $time)
{
global $db;
global $online_timeout;
$sql = ("
SELECT DISTINCT " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " userid, " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_NAME . " username, arrowchat_status.session_time lastactivity, " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_AVATAR . " avatar, " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " link, arrowchat_status.is_admin, arrowchat_status.status
FROM " . TABLE_PREFIX . DB_USERTABLE . "
JOIN arrowchat_status
ON " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " = arrowchat_status.userid
WHERE arrowchat_status.session_time > (" . time() . " - " . $online_timeout . " - 60)
AND " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_USERID . " != '" . $db->escape_string($userid) . "'
ORDER BY " . TABLE_PREFIX . DB_USERTABLE . "." . DB_USERTABLE_NAME . " ASC
");
return $sql;
}