Move all help information to the XML docs.
authorJelmer Vernooij <jelmer@samba.org>
Tue, 20 Mar 2007 00:09:29 +0000 (01:09 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Tue, 20 Mar 2007 00:09:29 +0000 (01:09 +0100)
doc/commands.xml
mods/listener.c
src/admin.c
src/admin.h

index 876a586d77e42f4be4f24112b5fa19c85cdb5eea..16bc755fa008e96a4a45c0bb33fcb9081c03fb1e 100644 (file)
@@ -9,27 +9,31 @@
                Adds a new network with the specified name.
                </para></listitem></varlistentry>
 
-               <varlistentry><term>ADDSERVER &lt;network&gt; &lt;server&gt; &lt;port&gt;</term>
+               <varlistentry><term>ADDSERVER &lt;network&gt; &lt;host&gt;[:&lt;port&gt;] [&lt;password&gt;]</term>
                <listitem><para>
-               Adds a new server to the specified network with the specified type and options.</para>
+               Adds a new server to the specified network.</para>
 
-               <para>Example: <command>addserver OPN irc.freenode.net 6667</command></para>
+               <para>Example: <command>addserver OPN irc.freenode.net:6667</command></para>
 
                </listitem></varlistentry>
 
                <varlistentry><term>BACKLOG [&lt;channel&gt;]</term>
                <listitem>
                        <para>Without any arguments, the BACKLOG command replicates all the 
-                       backlogs for the current channel.</para>
+                       backlogs for the current network.</para>
 
                <para>With one argument, the name of a channel, all lines on that 
                        channel are replicated.</para>
 
                </listitem></varlistentry>
 
+               <varlistentry><term>CHARSET &lt;charset&gt;</term>
+                       <listitem><para>Change client charset.</para></listitem>
+               </varlistentry>
+
                <varlistentry><term>CONNECT &lt;network&gt;</term>
 
-               <listitem><para>Connect to the specifed network. Ctrlproxy will connect to the first known server for this network.</para></listitem></varlistentry>
+               <listitem><para>Connect to the specified network. Ctrlproxy will connect to the first known server for this network.</para></listitem></varlistentry>
 
                <varlistentry><term>DELNETWORK &lt;network&gt;</term>
 
 
                <listitem><para>Detach client from the proxy.</para></listitem></varlistentry>
 
+               <varlistentry><term>ECHO text</term>
+                       <listitem><para>Repeats specified text. useful mainly for debugging. </para></listitem>
+               </varlistentry>
+
                <varlistentry><term>LISTNETWORKS</term>
                <listitem><para>Prints out a list of all networks 
                ctrlproxy is connected to at the moment.</para></listitem></varlistentry>
 
-               <varlistentry><term>NEXTSERVER</term>
+               <varlistentry><term>LOG_LEVEL [&lt;level&gt;]</term>
+                       <listitem><para>Change log level if specified. If not specified 
+                                       will print the current log level.</para></listitem>
+               </varlistentry>
+
+               <varlistentry><term>NEXTSERVER [&lt;NETWORK&gt;]</term>
                        <listitem><para>Makes the specified network disconnect from the current server and go to the next one.</para></listitem>
                </varlistentry>
 
-               <varlistentry><term>SAVECONFIG</term>
+               <varlistentry><term>SAVECONFIG [&lt;path&gt;]</term>
                        <listitem><para>Save the (updated) configuration to the location it was loaded from (usually <filename>$HOME/.ctrlproxy/</filename>).</para></listitem></varlistentry>
 
-               <varlistentry><term>HELP</term>
+               <varlistentry><term>STARTLISTENER [&lt;address&gt;:]&lt;port&gt; &lt;password&gt; [&lt;network&gt;]</term>
+                       <listitem><para>Add listener on specified port</para></listitem>
+               </varlistentry>
+
+               <varlistentry><term>STOPLISTENER [&lt;address&gt;:]&lt;port&gt;</term>
+                       <listitem><para>Stop listener on specified port</para></listitem>
+               </varlistentry>
+
+               <varlistentry><term>LISTLISTENER</term>
+                       <listitem><para>List all listeners</para></listitem>
+               </varlistentry>
+
+
+               <varlistentry><term>HELP [&lt;topic&gt;]</term>
                <listitem><para>Prints out list of available commands.</para></listitem></varlistentry>
 
 
index 30d26c1a16c40c854e97e840d8b48938ebfbc343..f8c884b6c08677d14e66b013bff21019a95fcc18 100644 (file)
@@ -489,9 +489,9 @@ void cmd_list_listener(admin_handle h, char **args, void *userdata)
 }
 
 const static struct admin_command listener_commands[] = {
-       { "STARTLISTENER", cmd_start_listener, "[<address>:]<port> <password> [<network>]", "Add listener on specified port" },
-       { "STOPLISTENER", cmd_stop_listener, "[<address>:]<port>", "Stop listener on specified port" },
-       { "LISTLISTENER", cmd_list_listener, "", "Add new network with specified name" },
+       { "STARTLISTENER", cmd_start_listener },
+       { "STOPLISTENER", cmd_stop_listener },
+       { "LISTLISTENER", cmd_list_listener },
        { NULL }
 };
 
index 0d820372687dbec9b8fccda76c2a5200d4d591c5..085a808cd3737e073e0248113ad9ff45ec4339fe 100644 (file)
@@ -659,24 +659,24 @@ void admin_log(enum log_level level, const struct network *n, const struct clien
 }
 
 const static struct admin_command builtin_commands[] = {
-       { "ADDNETWORK", add_network, "<name>", "Add new network with specified name" },
-       { "ADDSERVER", add_server, "<network> <host>[:<port>] [<password>]", "Add server to network" },
-       { "BACKLOG", repl_command, "[channel]", "Send backlogs for this network or a channel, if specified" },
-       { "CONNECT", com_connect_network, "<network>", "Connect to specified network. Forces reconnect when waiting." },
-       { "DELNETWORK", del_network, "<network>", "Remove specified network" },
-       { "ECHO", cmd_echo, "<DATA>", "Simple echo command" },
-       { "LOG_LEVEL", cmd_log_level, "[level]", "Change/Show log level" },
-       { "NEXTSERVER", com_next_server, "[network]", "Disconnect and use to the next server in the list" },
-       { "CHARSET", handle_charset, "<charset>", "Change client charset" },
-       { "DIE", handle_die, "", "Exit ctrlproxy" },
-       { "DISCONNECT", com_disconnect_network, "<network>", "Disconnect specified network" },
-       { "LISTNETWORKS", list_networks, "", "List current networks and their status" },
-       { "SAVECONFIG", com_save_config, "<name>", "Save current XML configuration to specified file" },
-       { "DETACH", detach_client, "", "Detach current client" },
-       { "HELP", cmd_help, "[command]", "This help command" },
-       { "DUMPJOINEDCHANNELS", dump_joined_channels, "[network]", NULL, NULL },
+       { "ADDNETWORK", add_network },
+       { "ADDSERVER", add_server },
+       { "BACKLOG", repl_command },
+       { "CONNECT", com_connect_network },
+       { "DELNETWORK", del_network },
+       { "ECHO", cmd_echo },
+       { "LOG_LEVEL", cmd_log_level },
+       { "NEXTSERVER", com_next_server },
+       { "CHARSET", handle_charset },
+       { "DIE", handle_die },
+       { "DISCONNECT", com_disconnect_network },
+       { "LISTNETWORKS", list_networks },
+       { "SAVECONFIG", com_save_config },
+       { "DETACH", detach_client },
+       { "HELP", cmd_help },
+       { "DUMPJOINEDCHANNELS" },
 #ifdef DEBUG
-       { "ABORT", do_abort, "", NULL, NULL },
+       { "ABORT", do_abort },
 #endif
        { NULL }
 };
index fb633f9ffc3380ea79dfa8beb798989ed3cd16d7..fc147f9ae500fe89124238e4dcefa1db079bf2eb 100644 (file)
@@ -27,14 +27,6 @@ struct admin_handle
 struct admin_command {
        char *name;
        admin_command_handler handler;
-       /**
-        * One line description
-        */
-       const char *help;
-       /**
-        * Extended (multi-line) description
-        */
-       const char *help_details;
        void *userdata;
 };