if (!isset($abuse_category)) {
    $abuse_category = 0;
}
if (!isset($abuse_description)) {
    $abuse_description = '';
}
if (!empty($current_user->id)) {
    // Get moderators
    if (empty($session->_s_room_id)) {
        // User is not in room
        $xmlwriter->setHeaderMessage($l->g('error'));
        $xmlwriter->setHeaderStatus(1);
    } else {
        $xmlwriter->setHeaderMessage($l->g('abuse_report_sent'));
        $xmlwriter->setHeaderStatus(0);
        $moderators = $room->getModerators($session->_s_room_id);
        if (empty($moderators)) {
            // Room has no moderators. Admin(s) will receive an abuse then.
            $moderators = $current_user->getAdmins();
        }
        _pcpin_loadClass('nickname');
        $nickname = new PCPIN_Nickname($session);
        $old_language_id = $l->id;
        // Create message body
        $body = $current_user->id . '/' . $session->_s_room_id . '/' . $abuse_category * 1 . '/' . trim(str_replace('/', ' ', $abuse_nickname)) . '/' . trim($abuse_description);
        foreach ($moderators as $data) {
            _pcpin_loadClass('user');
            $tmp_user = new PCPIN_User($session);
            $tmp_user->_db_loadObj($data['id']);
            if (!empty($data['is_online'])) {
                // User is online