~ctrlproxy/ctrlproxy/trunk

« back to all changes in this revision

Viewing changes to doc/syntax.xml

  • Committer: jelmer
  • Date: 2005-10-30 01:15:57 UTC
  • Revision ID: jelmer@samba.org-20051030011557-7137f871b7495c7c
Re-importĀ docs

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<chapter id="syntax">
 
2
        <title>Configuration file syntax</title>
 
3
 
 
4
<!-- Introduction -->
 
5
<para>Ctrlproxy uses XML as the format of it's RC file. The syntax of XML 
 
6
files is described much better in other documents on the web and 
 
7
is beyond the scope of this document. </para>
 
8
 
 
9
<para>Take a look at the <filename>ctrlproxyrc.example</filename> file that 
 
10
is distributed with ctrlproxy. It should give you a good impression of what 
 
11
a ctrlproxyrc file is supposed to look like.</para>
 
12
 
 
13
<para>The root element contains 2 elements: plugins and networks. These are discussed below.</para>
 
14
 
 
15
<sect1><title>Plugins</title>
 
16
 
 
17
        <para>Contains various &lt;plugin&gt; elements, which 
 
18
        each represent a plugin that can be loaded. When the 
 
19
        autoload attribute is set, the plugin will be loaded 
 
20
        when ctrlproxy starts. </para>
 
21
 
 
22
        <para>The <constant>file</constant> attribute is required and 
 
23
        should specify either an absolute path to a plugin or the name of a 
 
24
        plugin in the default modules dir (usually something like 
 
25
        <filename>/usr/lib/ctrlproxy</filename>).</para>
 
26
 
 
27
        <para>The &lt;plugin&gt; element should contain plugin-specific elements. See the documentation for the individual plugins for details.</para>
 
28
</sect1>
 
29
 
 
30
<sect1><title>Networks</title>
 
31
 
 
32
        <para>The &lt;networks&gt; element contains several &lt;network&gt; 
 
33
                elements, each representing an IRC network that CtrlProxy 
 
34
                can connect to.</para>
 
35
 
 
36
        <para>Attributes that can be specified on a network element are:</para>
 
37
 
 
38
        <variablelist>
 
39
        <varlistentry><term>name</term>
 
40
        <listitem><para>Name of the network. Something like <quote>OPN</quote>,  <quote>OFTC</quote> or <quote>IRCNet</quote>. The name of the first 
 
41
        server is used if this is not specified.</para></listitem>
 
42
        </varlistentry>
 
43
 
 
44
        <varlistentry><term>nick</term>
 
45
        <listitem><para>Initial nick name to use on this network. Defaults to UNIX user name.</para></listitem>
 
46
        </varlistentry>
 
47
 
 
48
        <varlistentry><term>username</term>
 
49
        <listitem><para>User name to report in hostmask. Defaults to UNIX user name.</para></listitem>
 
50
        </varlistentry>
 
51
 
 
52
        <varlistentry><term>ignore_first_nickchange</term>
 
53
                <listitem><para>IRC clients always send a NICK command to the IRC server 
 
54
                                after they have connected. Ctrlproxy happily passes this 
 
55
                                new nick name on to the real server. If you want ctrlproxy 
 
56
                                to ignore the first nick change that a client sends, 
 
57
                                add this attribute.</para></listitem>
 
58
        </varlistentry>
 
59
 
 
60
        <varlistentry><term>fullname</term>
 
61
        <listitem><para>Full name to report (for example in <command>/WHOIS</command> information). Defaults to the full name specified in the gecos field of your NSS passwd backend (usually the file <filename>/etc/passwd</filename>.</para></listitem>
 
62
        </varlistentry>
 
63
 
 
64
        <varlistentry><term>autoconnect</term>
 
65
                <listitem><para>Specifies whether to connect to this network at start-up. 
 
66
                                If this parameter is set to 0 ctrlproxy might, for example, 
 
67
                                connect to the network when a client tries to use the network.
 
68
                </para></listitem>
 
69
        </varlistentry>
 
70
 
 
71
        </variablelist>
 
72
        
 
73
        <sect2><title>Channels</title>
 
74
        
 
75
                <para>A &lt;network&gt; element can also contain 
 
76
                several &lt;channel&gt; elements. Each channel 
 
77
                should have a <quote>name</quote> attribute which 
 
78
                should contain the name of the channel.</para>
 
79
 
 
80
                <para>The <quote>autojoin</quote> attribute is optional
 
81
                and specifies whether the channel should be joined automatically
 
82
                when ctrlproxy connects to the network. </para>
 
83
 
 
84
                <para>Example:</para>
 
85
 
 
86
                <programlisting>
 
87
                <![CDATA[
 
88
                <ctrlproxy>
 
89
                        <networks>
 
90
                                <network name="Freenode">
 
91
                                        <channel name="#samba"/>
 
92
                                        <channel name="#samba-technical" autojoin="1"/>
 
93
                                </network>
 
94
                        </networks>
 
95
                </ctrlproxy>
 
96
                ]]>
 
97
                </programlisting>
 
98
        </sect2>
 
99
        
 
100
        <sect2><title>Servers</title>
 
101
        
 
102
        <para>CtrlProxy can connect to networks via TCP/IP, 
 
103
                it can connect to program (such as BitlBee) or it can 
 
104
                &quot;simulate&quot; a server (such as the Admin network 
 
105
                that allows you to change CtrlProxy settings on the fly).</para>
 
106
 
 
107
                <para>Note that ctrlproxy always connects to exactly <emphasis>one</emphasis> server at a time. </para>
 
108
 
 
109
        <sect3>
 
110
                <title>TCP/IP Connection to a server</title>
 
111
 
 
112
                <para>
 
113
                        TCP/IP is the main transport for IRC traffic. You can specify 
 
114
                        a list of servers that to connect to, in case one of them goes down.
 
115
                        CtrlProxy will automatically connect to the next server in the 
 
116
                        list if the current one goes down.
 
117
                </para>
 
118
 
 
119
        <para>Example:</para>
 
120
 
 
121
        <programlisting>
 
122
        <![CDATA[
 
123
        <ctrlproxy>
 
124
                <plugins>
 
125
                </plugins>
 
126
                <networks>
 
127
                        <network name="Freenode" autoconnect="1">
 
128
                                <servers>
 
129
                                        <server host="irc.freenode.net"/>
 
130
                                        <server host="irc.ipv6.freenode.net"/>
 
131
                                </servers>
 
132
                        </network>
 
133
                </networks>
 
134
        </ctrlproxy>
 
135
        ]]>
 
136
        </programlisting>
 
137
 
 
138
        </sect3>
 
139
 
 
140
        <sect3>
 
141
                <title>Virtual servers</title>
 
142
 
 
143
                <para>Virtual servers are provided by plugins to CtrlProxy. A 
 
144
                        good example is the <constant>admin</constant> module that 
 
145
                        provides a virtual network with exactly one channel you can 
 
146
                        use for administrating CtrlProxy.
 
147
                </para>
 
148
        </sect3>
 
149
 
 
150
        <sect3>
 
151
                <title>Programs</title>
 
152
 
 
153
                <para>This type of network is used for connecting to 
 
154
                        local IRC-servers that support inetd-style communication. One 
 
155
                        of the examples of such a program is 
 
156
                        <ulink url="http://www.bitlbee.org/">BitlBee</ulink>
 
157
                </para>
 
158
        </sect3>
 
159
 
 
160
        </sect2>
 
161
 
 
162
</sect1>
 
163
 
 
164
<sect1><title>Replication</title>
 
165
 
 
166
        <para>Replication (short for 'backlog replication') is the system that 
 
167
        stores certain IRC lines and then sends them to the user at a certain moment.</para>
 
168
 
 
169
<!--FIXME-->
 
170
 
 
171
</sect1>
 
172
 
 
173
</chapter>