Committer  : entrope
CVSROOT    : /cvsroot/undernet-ircu
Module     : ircu2.10
Commit time: 2006-07-13 02:51:21 UTC

Modified files:
     ChangeLog ircd/m_set.c ircd/m_settime.c ircd/m_squit.c
     ircd/m_stats.c

Log message:

Doxygenate m_s*.c

---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.794 ircu2.10/ChangeLog:1.795
--- ircu2.10/ChangeLog:1.794    Sun Jul  9 05:33:45 2006
+++ ircu2.10/ChangeLog  Wed Jul 12 19:50:57 2006
@@ -1,3 +1,18 @@
+2006-07-12  Michael Poole <[EMAIL PROTECTED]>
+
+       * ircd/m_set.c (m_functions): Delete duplicative comment.
+       (mo_set): Write doxygen comment.
+
+       * ircd/m_settime.c (m_functions): Delete duplicative comment.
+       (ms_settime): Write doxygen comment.
+       (mo_settime): Write doxygen comment.
+
+       * ircd/m_squit.c (ms_squit): Write doxygen comment.
+       (mo_squit): Write doxygen comment.
+
+       * ircd/m_stats.c (m_functions): Delete duplicative comment.
+       (m_stats): Write doxygen comment.
+
 2006-07-05  Michael Poole <[EMAIL PROTECTED]>
 
        * ircd/s_auth.c (auth_freelist): New static variable.
Index: ircu2.10/ircd/m_set.c
diff -u ircu2.10/ircd/m_set.c:1.4 ircu2.10/ircd/m_set.c:1.5
--- ircu2.10/ircd/m_set.c:1.4   Fri Dec 10 21:14:03 2004
+++ ircu2.10/ircd/m_set.c       Wed Jul 12 19:50:59 2006
@@ -20,65 +20,9 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: m_set.c,v 1.4 2004/12/11 05:14:03 klmitch Exp $
+ * $Id: m_set.c,v 1.5 2006/07/13 02:50:59 entrope Exp $
  */
 
-/*
- * m_functions execute protocol messages on this server:
- *
- *    cptr    is always NON-NULL, pointing to a *LOCAL* client
- *            structure (with an open socket connected!). This
- *            identifies the physical socket where the message
- *            originated (or which caused the m_function to be
- *            executed--some m_functions may call others...).
- *
- *    sptr    is the source of the message, defined by the
- *            prefix part of the message if present. If not
- *            or prefix not found, then sptr==cptr.
- *
- *            (!IsServer(cptr)) => (cptr == sptr), because
- *            prefixes are taken *only* from servers...
- *
- *            (IsServer(cptr))
- *                    (sptr == cptr) => the message didn't
- *                    have the prefix.
- *
- *                    (sptr != cptr && IsServer(sptr) means
- *                    the prefix specified servername. (?)
- *
- *                    (sptr != cptr && !IsServer(sptr) means
- *                    that message originated from a remote
- *                    user (not local).
- *
- *            combining
- *
- *            (!IsServer(sptr)) means that, sptr can safely
- *            taken as defining the target structure of the
- *            message in this server.
- *
- *    *Always* true (if 'parse' and others are working correct):
- *
- *    1)      sptr->from == cptr  (note: cptr->from == cptr)
- *
- *    2)      MyConnect(sptr) <=> sptr == cptr (e.g. sptr
- *            *cannot* be a local connection, unless it's
- *            actually cptr!). [MyConnect(x) should probably
- *            be defined as (x == x->from) --msa ]
- *
- *    parc    number of variable parameter strings (if zero,
- *            parv is allowed to be NULL)
- *
- *    parv    a NULL terminated list of parameter pointers,
- *
- *                    parv[0], sender (prefix string), if not present
- *                            this points to an empty string.
- *                    parv[1]...parv[parc-1]
- *                            pointers to additional parameters
- *                    parv[parc] == NULL, *always*
- *
- *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
- *                    non-NULL pointers.
- */
 #include "config.h"
 
 #include "client.h"
@@ -94,8 +38,31 @@
 
 /* #include <assert.h> -- Now using assert in ircd_log.h */
 
-/*
- * mo_set - oper message handler
+/** Handle a SET message from an operator
+ *
+ * \a parv normally has the following elements:
+ * \li \a parv[1] is the Feature setting to change
+ * \li \a parv[2] is the new value for the setting
+ *
+ * If \a parv[1] is "LOG" and \a parc is less than 4, \a parv has the
+ * following elements:
+ * \li \a parv[2] (optional) is the default syslog facility to use
+ *   (one of "NONE", "DEFAULT", "AUTH", possibly "AUTHPRIV", "CRON",
+ *   "DAEMON", "LOCAL0" through "LOCAL7", "LPR", "MAIL", "NEWS",
+ *   "USER" * or "UUCP")
+ *
+ * Otherwise, if \a parv[1] is "LOG", \a parv has the following
+ * elements:
+ * \li \a parv[2] is the log subsystem
+ * \li \a parv[3] is the parameter type ("FILE", "FACILITY", "SNOMASK"
+ *   or "LEVEL") to set
+ * \li \a parv[4] (optional) is the new value for the option
+ *
+ * See @ref m_functions for discussion of the arguments.
+ * @param[in] cptr Client that sent us the message.
+ * @param[in] sptr Original source of message.
+ * @param[in] parc Number of arguments.
+ * @param[in] parv Argument vector.
  */
 int mo_set(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 {
Index: ircu2.10/ircd/m_settime.c
diff -u ircu2.10/ircd/m_settime.c:1.15 ircu2.10/ircd/m_settime.c:1.16
--- ircu2.10/ircd/m_settime.c:1.15      Fri Dec 10 21:14:03 2004
+++ ircu2.10/ircd/m_settime.c   Wed Jul 12 19:51:00 2006
@@ -20,65 +20,9 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: m_settime.c,v 1.15 2004/12/11 05:14:03 klmitch Exp $
+ * $Id: m_settime.c,v 1.16 2006/07/13 02:51:00 entrope Exp $
  */
 
-/*
- * m_functions execute protocol messages on this server:
- *
- *    cptr    is always NON-NULL, pointing to a *LOCAL* client
- *            structure (with an open socket connected!). This
- *            identifies the physical socket where the message
- *            originated (or which caused the m_function to be
- *            executed--some m_functions may call others...).
- *
- *    sptr    is the source of the message, defined by the
- *            prefix part of the message if present. If not
- *            or prefix not found, then sptr==cptr.
- *
- *            (!IsServer(cptr)) => (cptr == sptr), because
- *            prefixes are taken *only* from servers...
- *
- *            (IsServer(cptr))
- *                    (sptr == cptr) => the message didn't
- *                    have the prefix.
- *
- *                    (sptr != cptr && IsServer(sptr) means
- *                    the prefix specified servername. (?)
- *
- *                    (sptr != cptr && !IsServer(sptr) means
- *                    that message originated from a remote
- *                    user (not local).
- *
- *            combining
- *
- *            (!IsServer(sptr)) means that, sptr can safely
- *            taken as defining the target structure of the
- *            message in this server.
- *
- *    *Always* true (if 'parse' and others are working correct):
- *
- *    1)      sptr->from == cptr  (note: cptr->from == cptr)
- *
- *    2)      MyConnect(sptr) <=> sptr == cptr (e.g. sptr
- *            *cannot* be a local connection, unless it's
- *            actually cptr!). [MyConnect(x) should probably
- *            be defined as (x == x->from) --msa ]
- *
- *    parc    number of variable parameter strings (if zero,
- *            parv is allowed to be NULL)
- *
- *    parv    a NULL terminated list of parameter pointers,
- *
- *                    parv[0], sender (prefix string), if not present
- *                            this points to an empty string.
- *                    parv[1]...parv[parc-1]
- *                            pointers to additional parameters
- *                    parv[parc] == NULL, *always*
- *
- *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
- *                    non-NULL pointers.
- */
 #include "config.h"
 
 #include "client.h"
@@ -100,12 +44,17 @@
 /* #include <assert.h> -- Now using assert in ircd_log.h */
 #include <stdlib.h>
 
-/*
- * ms_settime - server message handler
+/** Handle a SETTIME message from a server.
  *
- * parv[0] = sender prefix
- * parv[1] = new time
- * parv[2] = server name (Only used when sptr is an Oper).
+ * \a parv has the following elements:
+ * \li \a parv[1] is the new network time
+ * \li \a parv[2] (optional) is the target server to apply it to
+ *
+ * See @ref m_functions for discussion of the arguments.
+ * @param[in] cptr Client that sent us the message.
+ * @param[in] sptr Original source of message.
+ * @param[in] parc Number of arguments.
+ * @param[in] parv Argument vector.
  */
 int ms_settime(struct Client* cptr, struct Client* sptr, int parc, char* 
parv[])
 {
@@ -193,12 +142,17 @@
   return 0;
 }
 
-/*
- * mo_settime - oper message handler
+/** Handle a SETTIME message from an operator.
  *
- * parv[0] = sender prefix
- * parv[1] = new time
- * parv[2] = servername (Only used when sptr is an Oper).
+ * \a parv has the following elements:
+ * \li \a parv[1] is the new network time
+ * \li \a parv[2] (optional) is the target server to apply it to
+ *
+ * See @ref m_functions for discussion of the arguments.
+ * @param[in] cptr Client that sent us the message.
+ * @param[in] sptr Original source of message.
+ * @param[in] parc Number of arguments.
+ * @param[in] parv Argument vector.
  */
 int mo_settime(struct Client* cptr, struct Client* sptr, int parc, char* 
parv[])
 {
Index: ircu2.10/ircd/m_squit.c
diff -u ircu2.10/ircd/m_squit.c:1.12 ircu2.10/ircd/m_squit.c:1.13
--- ircu2.10/ircd/m_squit.c:1.12        Sun Mar 20 08:06:24 2005
+++ ircu2.10/ircd/m_squit.c     Wed Jul 12 19:51:01 2006
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: m_squit.c,v 1.12 2005/03/20 16:06:24 entrope Exp $
+ * $Id: m_squit.c,v 1.13 2006/07/13 02:51:01 entrope Exp $
  */
 #include "config.h"
 
@@ -44,18 +44,22 @@
 #include <stdlib.h>
 #include <string.h>
 
-/*
- *  ms_squit (server)
+/** Handle a SQUIT message from a server.
  *
- *    parv[0] = sender prefix
- *    parv[1] = server name
- *    parv[2] = timestamp
- *    parv[parc-1] = comment
+ * \a parv has the following elements:
+ * \li \a parv[1] is the target server's numnick
+ * \li \a parv[2] is the server's link timestamp (or zero to force)
+ * \li \a parv[\a parc - 1] is the squit message
  *
- * No longer supports wildcards from servers. 
+ * No longer supports wildcards from servers.
  * No longer squits a server that gave us an malformed squit message.
  *    - Isomer 1999-12-18
- * 
+ *
+ * See @ref m_functions for discussion of the arguments.
+ * @param[in] cptr Client that sent us the message.
+ * @param[in] sptr Original source of message.
+ * @param[in] parc Number of arguments.
+ * @param[in] parv Argument vector.
  */
 int ms_squit(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 {
@@ -103,13 +107,17 @@
   return exit_client(cptr, acptr, sptr, comment);
 }
 
-/*
- *  mo_squit (oper)
+/** Handle a SQUIT message from an operator.
  *
- *    parv[0] = sender prefix
- *    parv[1] = server name
- *    parv[2] = comment (optional)
+ * \a parv has the following elements:
+ * \li \a parv[1] is the target server's name (or wildcard mask)
+ * \li \a parv[\a parc - 1] is the squit message
  *
+ * See @ref m_functions for discussion of the arguments.
+ * @param[in] cptr Client that sent us the message.
+ * @param[in] sptr Original source of message.
+ * @param[in] parc Number of arguments.
+ * @param[in] parv Argument vector.
  */
 int mo_squit(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 {
Index: ircu2.10/ircd/m_stats.c
diff -u ircu2.10/ircd/m_stats.c:1.33 ircu2.10/ircd/m_stats.c:1.34
--- ircu2.10/ircd/m_stats.c:1.33        Mon Jun 26 17:11:17 2006
+++ ircu2.10/ircd/m_stats.c     Wed Jul 12 19:51:05 2006
@@ -20,65 +20,9 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: m_stats.c,v 1.33 2006/06/27 00:11:17 entrope Exp $
+ * $Id: m_stats.c,v 1.34 2006/07/13 02:51:05 entrope Exp $
  */
 
-/*
- * m_functions execute protocol messages on this server:
- *
- *    cptr    is always NON-NULL, pointing to a *LOCAL* client
- *            structure (with an open socket connected!). This
- *            identifies the physical socket where the message
- *            originated (or which caused the m_function to be
- *            executed--some m_functions may call others...).
- *
- *    sptr    is the source of the message, defined by the
- *            prefix part of the message if present. If not
- *            or prefix not found, then sptr==cptr.
- *
- *            (!IsServer(cptr)) => (cptr == sptr), because
- *            prefixes are taken *only* from servers...
- *
- *            (IsServer(cptr))
- *                    (sptr == cptr) => the message didn't
- *                    have the prefix.
- *
- *                    (sptr != cptr && IsServer(sptr) means
- *                    the prefix specified servername. (?)
- *
- *                    (sptr != cptr && !IsServer(sptr) means
- *                    that message originated from a remote
- *                    user (not local).
- *
- *            combining
- *
- *            (!IsServer(sptr)) means that, sptr can safely
- *            taken as defining the target structure of the
- *            message in this server.
- *
- *    *Always* true (if 'parse' and others are working correct):
- *
- *    1)      sptr->from == cptr  (note: cptr->from == cptr)
- *
- *    2)      MyConnect(sptr) <=> sptr == cptr (e.g. sptr
- *            *cannot* be a local connection, unless it's
- *            actually cptr!). [MyConnect(x) should probably
- *            be defined as (x == x->from) --msa ]
- *
- *    parc    number of variable parameter strings (if zero,
- *            parv is allowed to be NULL)
- *
- *    parv    a NULL terminated list of parameter pointers,
- *
- *                    parv[0], sender (prefix string), if not present
- *                            this points to an empty string.
- *                    parv[1]...parv[parc-1]
- *                            pointers to additional parameters
- *                    parv[parc] == NULL, *always*
- *
- *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
- *                    non-NULL pointers.
- */
 #include "config.h"
 
 #include "client.h"
@@ -98,22 +42,24 @@
 #include <stdlib.h>
 #include <string.h>
 
-/*
- * m_stats - generic message handler
+/** Handle a STATS message from some connection.
  *
- *    parv[0] = sender prefix
- *    parv[1] = statistics selector
- *    parv[2] = target server (current server defaulted, if omitted)
- * And 'stats l' and 'stats' L:
- *    parv[3] = server mask ("*" default, if omitted)
- * Or for stats p,P:
- *    parv[3] = port mask (returns p-lines when its port is matched by this)
- * Or for stats k,K,i and I:
- *    parv[3] = [EMAIL PROTECTED] (returns which K/I-lines match this)
- *           or [EMAIL PROTECTED] (returns which K/I-lines are mmatched by 
this)
- *              (defaults to old reply if omitted, when local or Oper)
- *              A remote mask (something containing wildcards) is only
- *              allowed for IRC Operators.
+ * \a parv has the following elements:
+ * \li \a parv[1] is the statistics selector
+ * \li \a parv[2] (optional) is server to query
+ * \li \a parv[3] (optional) is a mask to filter the results
+ *
+ * If \a parv[1] is "l" (or "links"), \a parv[3] is a mask of servers.
+ * If \a parv[1] is "p" (or "P" or "ports"), \a parv[3] is a mask of
+ * ports.  If \a parv[1] is "k" (or "K" or "klines" or "i" or "I" or
+ * "access"), \a parv[3] is a hostname with optional username@ prefix
+ * (for opers, hostmasks are allowed).
+ *
+ * See @ref m_functions for discussion of the arguments.
+ * @param[in] cptr Client that sent us the message.
+ * @param[in] sptr Original source of message.
+ * @param[in] parc Number of arguments.
+ * @param[in] parv Argument vector.
  */
 int
 m_stats(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches

Reply via email to