Committer  : entrope
CVSROOT    : /cvsroot/undernet-ircu
Module     : ircu2.10
Commit time: 2006-06-29 02:23:24 UTC

Modified files:
     ChangeLog ircd/m_burst.c ircd/m_endburst.c ircd/m_error.c
     ircd/m_get.c ircd/m_gline.c ircd/m_help.c

Log message:

Doxygenate m_[begh]*.c

---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.785 ircu2.10/ChangeLog:1.786
--- ircu2.10/ChangeLog:1.785    Wed Jun 28 18:43:43 2006
+++ ircu2.10/ChangeLog  Wed Jun 28 19:23:13 2006
@@ -1,5 +1,30 @@
 2006-06-28  Michael Poole <[EMAIL PROTECTED]>
 
+       * ircd/m_burst.c (m_functions): Delete duplicative comment.
+       (netride_modes): Add doxygen comment.
+       (ms_burst): Convert comment to doxygen format.
+
+       * ircd/m_endburst.c (m_functions): Delete duplicative comment.
+       (ms_end_of_burst): Convert comment to doxygen format.
+       (ms_end_of_burst_ack): Convert comment to doxygen format.
+
+       * ircd/m_error.c (m_functions): Delete duplicative comment.
+       (mr_error): Write doxygen comment.
+       (ms_error): Write doxygen comment.
+
+       * ircd/m_get.c (m_functions): Delete duplicative comment.
+       (mo_get): Write doxygen comment.
+
+       * ircd/m_gline.c (m_functions): Delete duplicative comment.
+       (ms_gline): Write doxygen comment.
+       (mo_gline): Write doxygen comment.
+       (m_gline): Write doxygen comment.
+
+       * ircd/m_help.c (m_functions): Delete duplicative comment.
+       (m_help): Write doxygen comment.
+
+2006-06-28  Michael Poole <[EMAIL PROTECTED]>
+
        * ircd/m_account.c (m_functions): Remove large cut-and-paste
        comment.
        (ms_account): Write full doxygen comment.
Index: ircu2.10/ircd/m_burst.c
diff -u ircu2.10/ircd/m_burst.c:1.43 ircu2.10/ircd/m_burst.c:1.44
--- ircu2.10/ircd/m_burst.c:1.43        Mon Jun 26 19:39:59 2006
+++ ircu2.10/ircd/m_burst.c     Wed Jun 28 19:23:14 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_burst.c,v 1.43 2006/06/27 02:39:59 entrope Exp $
+ * $Id: m_burst.c,v 1.44 2006/06/29 02:23:14 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 "channel.h"
@@ -106,6 +50,19 @@
 #include <string.h>
 #include <ctype.h>
 
+/** Find modes in \a parv that may require net.riders to be kicked.
+ * \a parv[0] must be a mode string starting with '+', and \a parv
+ * must contain enough parameters to satisfy any argument-bearing
+ * modes in \a parv[0].
+ *
+ * The current set of triggering modes are +i, +r, and (if \a curr_key
+ * is different than the received key) +k.
+ *
+ * @param[in] parc Number of valid elements in \a parv.
+ * @param[in] parv Mode arguments.
+ * @param[in] curr_key The channel's current key.
+ * @return A bitmask of MODE_* modes.
+ */
 static int
 netride_modes(int parc, char **parv, const char *curr_key)
 {
@@ -133,8 +90,7 @@
   return result;
 }
 
-/*
- * ms_burst - server message handler
+/** Handle a BURST message from a server.
  *
  * --  by Run [EMAIL PROTECTED]  december 1995 till march 1997
  *
@@ -199,6 +155,12 @@
  * is sent upstream as reaction to a DESTRUCT message.  For
  * these BURST messages it is possible that the listed channel
  * members are already joined.
+ *
+ * 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_burst(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
 {
Index: ircu2.10/ircd/m_endburst.c
diff -u ircu2.10/ircd/m_endburst.c:1.10 ircu2.10/ircd/m_endburst.c:1.11
--- ircu2.10/ircd/m_endburst.c:1.10     Mon May 30 06:14:53 2005
+++ ircu2.10/ircd/m_endburst.c  Wed Jun 28 19:23:14 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_endburst.c,v 1.10 2005/05/30 13:14:53 entrope Exp $
+ * $Id: m_endburst.c,v 1.11 2006/06/29 02:23:14 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 "channel.h"
@@ -95,8 +39,8 @@
 
 /* #include <assert.h> -- Now using assert in ircd_log.h */
 
-/*
- * ms_end_of_burst - server message handler
+/** Handle an EOB message from a server.
+ *
  * - Added Xorath 6-14-96, rewritten by Run 24-7-96
  * - and fixed by record and Kev 8/1/96
  * - and really fixed by Run 15/8/96 :p
@@ -106,7 +50,13 @@
  * As of 10.11, to fix a bug in the way BURST is processed, it also
  * makes sure empty channels are deleted
  *
- * parv[0] - sender prefix
+ * \a parv is ignored.
+ *
+ * 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_end_of_burst(struct Client* cptr, struct Client* sptr, int parc, char* 
parv[])
 {
@@ -137,13 +87,18 @@
   return 0;
 }
 
-/*
- * ms_end_of_burst_ack - server message handler
+/** Handle an EOB acknowledgment from a server.
  *
  * This the acknowledge message of the `END_OF_BURST' message.
  * It clears a flag for the server receiving the burst.
  *
- * parv[0] - sender prefix
+ * \a parv is ignored.
+ *
+ * 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_end_of_burst_ack(struct Client *cptr, struct Client *sptr, int parc, 
char **parv)
 {
Index: ircu2.10/ircd/m_error.c
diff -u ircu2.10/ircd/m_error.c:1.11 ircu2.10/ircd/m_error.c:1.12
--- ircu2.10/ircd/m_error.c:1.11        Fri Dec 10 21:13:46 2004
+++ ircu2.10/ircd/m_error.c     Wed Jun 28 19:23:14 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_error.c,v 1.11 2004/12/11 05:13:46 klmitch Exp $
+ * $Id: m_error.c,v 1.12 2006/06/29 02:23:14 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"
@@ -97,11 +41,17 @@
 /* #include <assert.h> -- Now using assert in ircd_log.h */
 #include <string.h>
 
-/*
- * mr_error - unregistered client message handler
+/** Handle an ERROR message from an unregistered client.
+ * The most common normal cause for this is a server password mismatch.
  *
- * parv[0] = sender prefix
- * parv[parc-1] = text
+ * \a parv has the following elements:
+ * \li \a parv[\a parc - 1] is the error 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 mr_error(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 {
@@ -129,11 +79,16 @@
   return 0;
 }
 
-/*
- * ms_error - server message handler
+/** Handle an ERROR message from a server.
+ *
+ * \a parv has the following elements:
+ * \li \a parv[\a parc - 1] is the error message
  *
- * parv[0] = sender prefix
- * parv[parc-1] = text
+ * 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_error(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 {
Index: ircu2.10/ircd/m_get.c
diff -u ircu2.10/ircd/m_get.c:1.4 ircu2.10/ircd/m_get.c:1.5
--- ircu2.10/ircd/m_get.c:1.4   Fri Dec 10 21:13:46 2004
+++ ircu2.10/ircd/m_get.c       Wed Jun 28 19:23:14 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_get.c,v 1.4 2004/12/11 05:13:46 klmitch Exp $
+ * $Id: m_get.c,v 1.5 2006/06/29 02:23:14 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,21 @@
 
 /* #include <assert.h> -- Now using assert in ircd_log.h */
 
-/*
- * mo_get - oper message handler
+/** Handle a GET message from an operator.
+ *
+ * \a parv has the following elements:
+ * \li \a parv[1] is the Feature setting being requested
+ *
+ * If \a parv[1] is GET, \a parv has the following additional elements:
+ * \li \a parv[2] is the log subsystem name
+ * \li \a parv[3] is the parameter type ("FILE", "FACILITY", "SNOMASK"
+ *   or "LEVEL") being requested
+ *
+ * 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_get(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 {
Index: ircu2.10/ircd/m_gline.c
diff -u ircu2.10/ircd/m_gline.c:1.28 ircu2.10/ircd/m_gline.c:1.29
--- ircu2.10/ircd/m_gline.c:1.28        Mon Jun 26 17:11:17 2006
+++ ircu2.10/ircd/m_gline.c     Wed Jun 28 19:23:14 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_gline.c,v 1.28 2006/06/27 00:11:17 entrope Exp $
+ * $Id: m_gline.c,v 1.29 2006/06/29 02:23:14 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"
@@ -101,23 +45,32 @@
 #include <stdlib.h>
 #include <string.h>
 
-/*
- * ms_gline - server message handler
- *
- * parv[0] = Sender prefix
- * parv[1] = Target: server numeric
- * parv[2] = (+|-)<G-line mask>
- * parv[3] = G-line lifetime
- *
- * From Uworld:
- *
- * parv[4] = Comment
- *
- * From somewhere else:
- *
- * parv[4] = Last modification time
- * parv[5] = Comment
+/** Handle a GLINE message from a server.
  *
+ * \a parv has the following elements:
+ * \li \a parv[1] is the target server numnick or "*" for all servers
+ * \li \a parv[2] is the G-line mask (preceded by modifier flags)
+ * \li \a parv[3] is the G-line lifetime in seconds
+ * \li \a parv[4] (optional) is the G-line's last modification time
+ * \li \a parv[\a parc - 1] is the G-line comment
+ *
+ * If the issuer is a server or there is no timestamp, the issuer must
+ * be flagged as a UWorld server.  In this case, if the '-' modifier
+ * flag is used, the G-line lifetime and all following arguments may
+ * be omitted.
+ *
+ * Three modifier flags are recognized, and must be present in this
+ * order:
+ * \li '!' Indicates an G-line that an oper forcibly applied.
+ * \li '-' Indicates that the following G-line should be removed.
+ * \li '+' (exclusive of '-') indicates that the G-line should be
+ *   activated.
+ *
+ * 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_gline(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
@@ -211,23 +164,26 @@
   return gline_add(cptr, sptr, mask, reason, expire_off, lastmod, flags);
 }
 
-/*
- * mo_gline - oper message handler
- *
- * parv[0] = Sender prefix
- * parv[1] = [[+|-]<G-line mask>]
- *
- * Local (to me) style:
- *
- * parv[2] = [Expiration offset]
- * parv[3] = [Comment]
- *
- * Global (or remote local) style:
- *
- * parv[2] = [target]
- * parv[3] = [Expiration offset]
- * parv[4] = [Comment]
+/** Handle a GLINE message from an operator.
  *
+ * \a parv has the following elements:
+ * \li \a parv[1] is the G-line mask (preceded by modifier flags)
+ * \li \a parv[2] (optional) is the target server numnick or '*'
+ * \li \a parv[N+1] is the G-line lifetime in seconds
+ * \li \a parv[\a parc - 1] is the G-line comment
+ *
+ * Three modifier flags are recognized, and must be present in this
+ * order:
+ * \li '!' Indicates an G-line that an oper forcibly applied.
+ * \li '-' Indicates that the following G-line should be removed.
+ * \li '+' (exclusive of '-') indicates that the G-line should be
+ *   activated.
+ *
+ * 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_gline(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
@@ -251,7 +207,6 @@
   if (*mask == '+') {
     flags |= GLINE_ACTIVE;
     mask++;
-
   } else if (*mask == '-')
     mask++;
   else
@@ -259,15 +214,15 @@
 
   if (parc == 4) {
     expire_off = atoi(parv[2]);
-    reason = parv[3];
     flags |= GLINE_LOCAL;
   } else if (parc > 4) {
     target = parv[2];
     expire_off = atoi(parv[3]);
-    reason = parv[4];
   } else
     return need_more_params(sptr, "GLINE");
 
+  reason = parv[parc - 1];
+
   if (target)
   {
     if (!(target[0] == '*' && target[1] == '\0'))
@@ -321,12 +276,16 @@
   return gline_add(cptr, sptr, mask, reason, expire_off, TStime(), flags);
 }
 
-/*
- * m_gline - user message handler
+/** Handle a GLINE message from a normal client.
  *
- * parv[0] = Sender prefix
- * parv[1] = [<server name>]
+ * \a parv has the following elements:
+ * \li \a parv[1] is the target for which to show G-lines.
  *
+ * 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_gline(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
Index: ircu2.10/ircd/m_help.c
diff -u ircu2.10/ircd/m_help.c:1.6 ircu2.10/ircd/m_help.c:1.7
--- ircu2.10/ircd/m_help.c:1.6  Fri Dec 10 21:13:47 2004
+++ ircu2.10/ircd/m_help.c      Wed Jun 28 19:23:14 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_help.c,v 1.6 2004/12/11 05:13:47 klmitch Exp $
+ * $Id: m_help.c,v 1.7 2006/06/29 02:23:14 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,15 @@
 
 /* #include <assert.h> -- Now using assert in ircd_log.h */
 
-/*
- * m_help - generic message handler
+/** Handle a HELP message from some client.
+ *
+ * \a parv is ignored.
+ *
+ * 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_help(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