<?xml version="1.0" encoding="utf-8"?>

<creole>

    <files>
            <package>ircd-irc2</package>
            <service servicelist="ircd">ircd-irc2</service>
            <service_access service='ircd-irc2'>
                <port port_type="SymLinkOption">ircd_port</port>
            </service_access>
            <file filelist="ircd" name='/etc/ircd/ircd.conf'/>
            <file filelist="ircd" name='/etc/ircd/ircd.motd'/>
    </files>

    <variables>
        <family name='services'>
            <variable name='activer_ircd' type='oui/non' description="Activer le serveur IRC" >
                <value>oui</value>
            </variable>
        </family>
        <family name='ircd'>
            <variable name='ircd_domaine' type='domain' description="Nom de domaine utilisé pour accéder au serveur IRC"/>
            <variable name='ircd_libelle' type='string' description="Libellé du serveur IRC"/>
            <variable name='ircd_port' type='port' description="Port du serveur IRC" mode='expert'>
                <value>6667</value>
            </variable>
            <variable name='ircd_banned_hostname' type='domain' description="Hote banni sur le serveur IRC" multi="True" mandatory="True"/>
            <variable name='ircd_banned_comment' type='string' description="Motif du bannissement du serveur IRC">
                <value>Vous êtes banni, contacter votre administrateur</value>
            </variable>
            <variable name='ircd_motd_message' type='string' description="Message de bienvenu"/>
            <variable name='ircd_motd_personnalise' type='string' description="Message de bienvenu personnalisé"/>
        </family>
    </variables>

    <constraints>
        <check name='valid_enum' target='ircd_motd_message'>
            <param>['message 1', 'message 2', 'personnalisé']</param>
        </check>
        <fill name='calc_val' target='ircd_domaine'>
            <param type='eole' name='valeur' hidden="False">web_url</param>
        </fill>
        <fill name='ma_fonction' target='ircd_motd_personnalise'>
        </fill>
        <auto name="concat" target='ircd_libelle'>
            <param name='valeur1'>Serveur IRC pour </param>
            <param type='eole' name='valeur2'>libelle_etab</param>
        </auto>
        <group master='ircd_banned_hostname'>
            <slave>ircd_banned_comment</slave>
        </group>
        <condition name='disabled_if_in' source='activer_ircd'>
            <param>non</param>
            <target type='filelist'>ircd</target>
            <target type='servicelist'>ircd</target>
            <target type='family'>ircd</target>
        </condition>
        <condition name='disabled_if_not_in' source='ircd_motd_message'>
            <param>personnalisé</param>
            <target>ircd_motd_personnalise</target>
        </condition>
        <check name="valid_differ" target="ircd_libelle">
            <param type='eole' hidden="False">ircd_motd_personnalise</param>
        </check>
    </constraints>

    <help>
        <variable name="activer_ircd">Cette variable permet d'activer un serveur IRC</variable>
    </help>

</creole>
<!-- vim: ts=4 sw=4 expandtab
-->