45
           
            
                
     
    
    I just checked - so the code itself is in the /include/notifications_functions.php around line 192:
 if ($module->getVar('hascomments')) { 
        $com_config = $module->getInfo('comments'); 
        if (!empty($category['item_name']) && $category['item_name'] == $com_config['itemName']) { 
            if (!is_dir($dir = XOOPS_ROOT_PATH . '/language/' . $xoopsConfig['language'] . '/mail_template/')) { 
                $dir = XOOPS_ROOT_PATH . '/language/english/mail_template/'; 
            } 
            $mail_template_dir = $dir; 
 
            include_once $GLOBALS['xoops']->path('include/comment_constants.php'); 
            $config_handler = xoops_getHandler('config'); 
            $com_config     = $config_handler->getConfigsByCat(0, $module_id); 
            if (!$enabled_only) { 
                $insert_comment = true; 
                $insert_submit  = true; 
            } else { 
                $insert_comment = false; 
                $insert_submit  = false; 
                switch ($com_config['com_rule']) { 
                    case XOOPS_COMMENT_APPROVENONE: 
                        // comments disabled, no comment events 
                        break; 
                    case XOOPS_COMMENT_APPROVEALL: 
                        // all comments are automatically approved, no 'submit' 
                        if (!$override_comment) { 
                            $insert_comment = true; 
                        } 
                        break; 
                    case XOOPS_COMMENT_APPROVEUSER: 
                    case XOOPS_COMMENT_APPROVEADMIN: 
                        // comments first submitted, require later approval 
                        if (!$override_comment) { 
                            $insert_comment = true; 
                        } 
                        if (!$override_commentsubmit) { 
                            $insert_submit = true; 
                        } 
                        break; 
                } 
            } 
            if ($insert_comment) { 
                $event = array( 
                    'name'              => 'comment', 
                    'category'          => $category['name'], 
                    'title'             => _NOT_COMMENT_NOTIFY, 
                    'caption'           => _NOT_COMMENT_NOTIFYCAP, 
                    'description'       => _NOT_COMMENT_NOTIFYDSC, 
                    'mail_template_dir' => $mail_template_dir, 
                    'mail_template'     => 'comment_notify', 
                    'mail_subject'      => _NOT_COMMENT_NOTIFYSBJ); 
                if (!$enabled_only || notificationEventEnabled($category, $event, $module)) { 
                    $event_array[] = $event; 
                } 
            } 
            if ($insert_submit) { 
                $event = array( 
                    'name'              => 'comment_submit', 
                    'category'          => $category['name'], 
                    'title'             => _NOT_COMMENTSUBMIT_NOTIFY, 
                    'caption'           => _NOT_COMMENTSUBMIT_NOTIFYCAP, 
                    'description'       => _NOT_COMMENTSUBMIT_NOTIFYDSC, 
                    'mail_template_dir' => $mail_template_dir, 
                    'mail_template'     => 'commentsubmit_notify', 
                    'mail_subject'      => _NOT_COMMENTSUBMIT_NOTIFYSBJ, 
                    'admin_only'        => 1); 
                if (!$enabled_only || notificationEventEnabled($category, $event, $module)) { 
                    $event_array[] = $event; 
                } 
            } 
        } 
    }