logo       

[CVS] Module ircu2.10: Change committed: msg#00025

Subject: [CVS] Module ircu2.10: Change committed
Committer  : entrope
CVSROOT    : /cvsroot/undernet-ircu
Module     : ircu2.10
Commit time: 2006-06-30 22:00:00 UTC

Modified files:
     ChangeLog ircd/m_info.c ircd/m_invite.c ircd/m_ison.c
     ircd/m_jupe.c ircd/m_kick.c ircd/m_kill.c

Log message:

Doxygenate m_[ijk]*.c

---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.788 ircu2.10/ChangeLog:1.789
--- ircu2.10/ChangeLog:1.788    Wed Jun 28 20:48:17 2006
+++ ircu2.10/ChangeLog  Fri Jun 30 14:59:49 2006
@@ -1,3 +1,30 @@
+2006-06-30  Michael Poole <mdpoole@xxxxxxxxxxx>
+
+       * ircd/m_info.c (m_functions): Delete duplicative comment.
+       (m_info): Write doxygen comment.
+       (ms_info): Write doxygen comment.
+       (mo_info): Write doxygen comment.
+
+       * ircd/m_invite.c (m_functions): Delete duplicative comment.
+       (m_invite): Convert comment to doxygen format.
+       (ms_invite): Convert comment to doxygen format.
+
+       * ircd/m_ison.c (m_functions): Delete duplicative comment.
+       (m_ison): Convert comment to doxygen format.
+
+       * ircd/m_jupe.c (m_functions): Delete duplicative comment.
+       (ms_jupe): Write doxygen comment.  Fix parv[parc-1] usage.
+       (mo_jupe): Write doxygen comment.  Fix parv[parc-1] usage.
+
+       * ircd/m_kick.c (m_functions): Delete duplicative comment.
+       (m_kick): Write doxygen comment.
+       (ms_kick): Write doxygen comment.
+
+       * ircd/m_kill.c (m_functions): Delete duplicative comment.
+       (do_kill): Write doxygen comment.
+       (ms_kill): Write doxygen comment.
+       (mo_kill): Write doxygen comment.
+
 2006-06-28  Michael Poole <mdpoole@xxxxxxxxxxx>
 
        * ircd/m_clearmode.c (m_functions): Delete duplicative comment.
Index: ircu2.10/ircd/m_info.c
diff -u ircu2.10/ircd/m_info.c:1.11 ircu2.10/ircd/m_info.c:1.12
--- ircu2.10/ircd/m_info.c:1.11 Fri Dec 10 21:13:47 2004
+++ ircu2.10/ircd/m_info.c      Fri Jun 30 14:59:50 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_info.c,v 1.11 2004/12/11 05:13:47 klmitch Exp $
+ * $Id: m_info.c,v 1.12 2006/06/30 21:59:50 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,16 @@
 
 /* #include <assert.h> -- Now using assert in ircd_log.h */
 
-/*
- * m_info - generic message handler
+/** Handle an INFO message from a normal user.
+ *
+ * \a parv has the following elements:
+ * \li \a parv[1] (optional) is the server name to request information for.
  *
- * parv[0] = sender prefix
- * parv[1] = servername
+ * 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_info(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 {
@@ -125,11 +74,16 @@
   return 0;
 }
 
-/*
- * ms_info - server message handler
+/** Handle an INFO message from a server connection.
  *
- * parv[0] = sender prefix
- * parv[1] = servername
+ * \a parv has the following elements:
+ * \li \a parv[1] is the server name to request information for.
+ *
+ * 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_info(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 {
@@ -161,11 +115,16 @@
   return 0;
 }
 
-/*
- * mo_info - oper message handler
+/** Handle an INFO message from an operator.
+ *
+ * \a parv has the following elements:
+ * \li \a parv[1] (optional) is the server name to request information for.
  *
- * parv[0] = sender prefix
- * parv[1] = servername
+ * 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_info(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 {
Index: ircu2.10/ircd/m_invite.c
diff -u ircu2.10/ircd/m_invite.c:1.26 ircu2.10/ircd/m_invite.c:1.27
--- ircu2.10/ircd/m_invite.c:1.26       Fri Jan  6 16:57:16 2006
+++ ircu2.10/ircd/m_invite.c    Fri Jun 30 14:59:50 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_invite.c,v 1.26 2006/01/07 00:57:16 isomer Exp $
+ * $Id: m_invite.c,v 1.27 2006/06/30 21:59:50 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"
@@ -152,12 +96,11 @@
 }
 
 
-/*
- * m_invite - generic message handler
+/** Handle an INVITE from a local client.
  *
- *   parv[0] - sender prefix
- *   parv[1] - user to invite
- *   parv[2] - channel name
+ * \a parv has the following elements:
+ * \li \a parv[1] is the nickname of the client to invite
+ * \li \a parv[2] is the name of the channel to invite \a parv[1] to
  *
  * - INVITE now is accepted only if who does it is chanop (this of course
  *   implies that channel must exist and he must be on it).
@@ -167,6 +110,12 @@
  *
  * - Invite with no parameters now lists the channels you are invited to.
  *                                                         - Isomer 23 Oct 99
+ *
+ * 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_invite(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 {
@@ -252,13 +201,12 @@
   return 0;
 }
 
-/*
- * ms_invite - server message handler
+/** Handle an INVITE from a server connection.
  *
- *   parv[0] - sender prefix
- *   parv[1] - user to invite
- *   parv[2] - channel name
- *   parv[3] - (optional) channel timestamp
+ * \a parv has the following elements:
+ * \li \a parv[1] is the nickname of the client to invite
+ * \li \a parv[2] is the name of the channel to invite \a parv[1] to
+ * \li \a parv[3] (optional) is the channel's timestamp
  *
  * - INVITE now is accepted only if who does it is chanop (this of course
  *   implies that channel must exist and he must be on it).
@@ -271,6 +219,12 @@
  *
  * - Invite with too-late timestamp, or with no timestamp from a bursting
  *   server, is silently discarded.                   - Entrope 19 Jan 05
+ *
+ * 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_invite(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 {
Index: ircu2.10/ircd/m_ison.c
diff -u ircu2.10/ircd/m_ison.c:1.9 ircu2.10/ircd/m_ison.c:1.10
--- ircu2.10/ircd/m_ison.c:1.9  Sun Mar 20 08:06:18 2005
+++ ircu2.10/ircd/m_ison.c      Fri Jun 30 14:59:50 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_ison.c,v 1.9 2005/03/20 16:06:18 entrope Exp $
+ * $Id: m_ison.c,v 1.10 2006/06/30 21:59:50 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,10 @@
 /* #include <assert.h> -- Now using assert in ircd_log.h */
 #include <string.h>
 
-/*
- * m_ison
+/** Handle an ISON request from a local connection.
+ *
+ * \a parv has the following elements:
+ * \li \a parv[1] is the comma-separated list of nicknames to check
  *
  * Added by Darren Reed 13/8/91 to act as an efficient user indicator
  * with respect to cpu/bandwidth used. Implemented for NOTIFY feature in
@@ -108,6 +54,12 @@
  * XXX - this is virtually the same as send_user_info, but doesn't send
  * no nick found, might be refactored so that m_userhost, m_userip, and
  * m_ison all use the same function with different formatters. --Bleep
+ *
+ * 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_ison(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
 {
Index: ircu2.10/ircd/m_jupe.c
diff -u ircu2.10/ircd/m_jupe.c:1.16 ircu2.10/ircd/m_jupe.c:1.17
--- ircu2.10/ircd/m_jupe.c:1.16 Fri Jan  6 03:22:31 2006
+++ ircu2.10/ircd/m_jupe.c      Fri Jun 30 14:59:50 2006
@@ -21,65 +21,9 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: m_jupe.c,v 1.16 2006/01/06 11:22:31 isomer Exp $
+ * $Id: m_jupe.c,v 1.17 2006/06/30 21:59:50 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"
@@ -102,19 +46,23 @@
 #include <stdlib.h>
 #include <string.h>
 
-/*
- * ms_jupe - server message handler
- *
- * parv[0] = Send prefix
- *
- * From server:
- *
- * parv[1] = Target: server numeric or *
- * parv[2] = (+|-)<server name>
- * parv[3] = Expiration offset
- * parv[4] = Last modification time
- * parv[5] = Comment
+/** Handle a JUPE message from a server connection.
  *
+ * \a parv has the following elements:
+ * \li \a parv[1] is the target server's numnick (or "*" for all servers)
+ * \li \a parv[2] is the server name to jupe, optionally with '+' or '-' prefix
+ * \li \a parv[3] is the jupe's duration in seconds
+ * \li \a parv[4] is the last modification time of the jupe
+ * \li \a parv[\a parc - 1] is the comment or explanation of the jupe
+ *
+ * The default is to deactivate the jupe; activating or adding a jupe
+ * requires the '+' prefix to \a parv[2].
+ *
+ * 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_jupe(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 {
@@ -122,7 +70,7 @@
   struct Jupe *ajupe;
   unsigned int flags = 0;
   time_t expire_off, lastmod;
-  char *server = parv[2], *target = parv[1], *reason = parv[5];
+  char *server = parv[2], *target = parv[1], *reason = parv[parc - 1];
 
   if (parc < 6)
     return need_more_params(sptr, "JUPE");
@@ -169,23 +117,23 @@
   return jupe_add(cptr, sptr, server, reason, expire_off, lastmod, flags);
 }
 
-/*
- * mo_jupe - oper message handler
- *
- * parv[0] = Send prefix
- * parv[1] = [[+|-]<server name>]
- *
- * 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 JUP message from an operator.
  *
+ * \a parv has the following elements:
+ * \li \a parv[1] is the target server's numnick (or "*" for all servers)
+ * \li \a parv[2] (optional) is the server name to jupe with '+' or '-' prefix
+ * \li \a parv[N+1] is the jupe's duration in seconds
+ * \li \a parv[N+2] is the last modification time of the jupe
+ * \li \a parv[\a parc - 1] is the comment or explanation of the jupe
+ *
+ * Unlike GLINE and server-to-server JUPE, the '+' or '-' prefix
+ * before the target is REQUIRED.
+ *
+ * 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_jupe(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 {
@@ -211,15 +159,15 @@
 
   if (parc == 4) {
     expire_off = atoi(parv[2]);
-    reason = parv[3];
     flags |= JUPE_LOCAL;
   } else if (parc > 4) {
     target = parv[2];
     expire_off = atoi(parv[3]);
-    reason = parv[4];
   } else
     return need_more_params(sptr, "JUPE");
 
+  reason = parv[parc - 1];
+
   if (target) {
     if (!(target[0] == '*' && target[1] == '\0')) {
       if (!(acptr = find_match_server(target)))
Index: ircu2.10/ircd/m_kick.c
diff -u ircu2.10/ircd/m_kick.c:1.24 ircu2.10/ircd/m_kick.c:1.25
--- ircu2.10/ircd/m_kick.c:1.24 Mon Jun 26 19:39:59 2006
+++ ircu2.10/ircd/m_kick.c      Fri Jun 30 14:59:50 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_kick.c,v 1.24 2006/06/27 02:39:59 entrope Exp $
+ * $Id: m_kick.c,v 1.25 2006/06/30 21:59:50 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"
@@ -96,13 +40,18 @@
 
 /* #include <assert.h> -- Now using assert in ircd_log.h */
 
-/*
- * m_kick - generic message handler
+/** Handle a KICK message from a local connection.
  *
- * parv[0] = sender prefix
- * parv[1] = channel
- * parv[2] = client to kick
- * parv[parc-1] = kick comment
+ * \a parv has the following elements:
+ * \li \a parv[1] is the channel name to kick someone from
+ * \li \a parv[2] is the nickname of the client to kick
+ * \li \a parv[\a parc - 1] (optional) is the kick comment
+ *
+ * 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_kick(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
 {
@@ -173,13 +122,18 @@
   return 0;
 }
 
-/*
- * ms_kick - server message handler
+/** Handle a KICK message from a server connection.
  *
- * parv[0] = sender prefix
- * parv[1] = channel
- * parv[2] = client to kick
- * parv[parc-1] = kick comment
+ * \a parv has the following elements:
+ * \li \a parv[1] is the channel name to kick someone from
+ * \li \a parv[2] is the numnick of the client to kick
+ * \li \a parv[\a parc - 1] is the kick comment
+ *
+ * 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_kick(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
 {
Index: ircu2.10/ircd/m_kill.c
diff -u ircu2.10/ircd/m_kill.c:1.31 ircu2.10/ircd/m_kill.c:1.32
--- ircu2.10/ircd/m_kill.c:1.31 Sun Aug 21 06:46:07 2005
+++ ircu2.10/ircd/m_kill.c      Fri Jun 30 14:59:50 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_kill.c,v 1.31 2005/08/21 13:46:07 entrope Exp $
+ * $Id: m_kill.c,v 1.32 2006/06/30 21:59:50 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"
@@ -99,9 +43,16 @@
 /* #include <assert.h> -- Now using assert in ircd_log.h */
 #include <string.h>
 
-/*
- * do_kill - Performs the generic work involved in killing a client
- *
+/** Perform the generic work involved in killing a client.
+ * @param[in] cptr Client that sent us the KILL.
+ * @param[in] sptr Original source of the KILL.
+ * @param[in] victim Client to be killed.
+ * @param[in] inpath If cptr is a server, its name; else cptr's (true)
+ *   hostname.
+ * @param[in] path If cptr is a server, the kill path it advertised;
+ *   else cptr's nickname.
+ * @param[in] msg Kill message
+ * @return Has a tail call to exit_client_msg().
  */
 static int do_kill(struct Client* cptr, struct Client* sptr,
                   struct Client* victim, char* inpath, char* path, char* msg)
@@ -161,14 +112,18 @@
                         msg);
 }
 
-/*
- * ms_kill - server message handler
+/** Handle a KILL message from a server connection.
  *
- * NOTE: IsServer(cptr) == true;
- *
- * parv[0]      = sender prefix
- * parv[1]      = kill victim
- * parv[parc-1] = kill path
+ * \a parv has the following elements:
+ * \li \a parv[1] is the numnick of the user to kill
+ * \li \a parv[\a parc - 1] is the kill path, followed by a space,
+ *   followed by the kill message (traditionally in parentheses)
+ *
+ * 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_kill(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 {
@@ -226,15 +181,18 @@
   return do_kill(cptr, sptr, victim, cli_name(cptr), path, msg);
 }
 
-/*
- * mo_kill - oper message handler
+/** Handle a KILL message from an operator.
+ *
+ * \a parv has the following elements:
+ * \li \a parv[1] is the nickname of the user to kill
+ * \li \a parv[\a parc - 1] is the kill message
  *
- * NOTE: IsPrivileged(sptr), IsAnOper(sptr) == true
- *       IsServer(cptr), IsServer(sptr) == false
  *
- * parv[0]      = sender prefix
- * parv[1]      = kill victim
- * parv[parc-1] = kill path
+ * 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_kill(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 {
----------------------- End of diff -----------------------


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
linux.arklinux....    user-groups.lin...    kde.usability/2...    ietf.ipp/2002-0...    mail.spam.spamc...    os.netbsd.devel...    audio.cd-record...    text.unicode.de...    php.documentati...    games.fps.halfl...    window-managers...    suse.oracle.gen...    bug-tracking.gn...    video.dvdrip.us...    xfree86.cvs/200...    java.netbeans.m...    network.argus/2...    culture.sf.kill...    debian.ports.al...    freebsd.questio...    qplus.devel/200...    handhelds.palm....   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe