Committer  : entrope
CVSROOT    : /cvsroot/undernet-ircu
Module     : ircu2.10
Commit time: 2006-07-04 20:37:42 UTC

Modified files:
     ChangeLog ircd/m_part.c ircd/m_pass.c ircd/m_ping.c ircd/m_pong.c
     ircd/m_privmsg.c ircd/m_pseudo.c

Log message:

Doxygenate m_p*.c

---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.791 ircu2.10/ChangeLog:1.792
--- ircu2.10/ChangeLog:1.791    Tue Jul  4 12:44:38 2006
+++ ircu2.10/ChangeLog  Tue Jul  4 13:37:32 2006
@@ -1,5 +1,32 @@
 2006-07-04  Michael Poole <[EMAIL PROTECTED]>
 
+       * ircd/m_part.c (m_functions): Delete duplicative comment.
+       (m_part): Write doxygen comment.
+       (ms_part): Write doxygen comment.
+
+       * ircd/m_pass.c (m_functions): Delete duplicative comment.
+       (mr_pass): Write doxygen comment.
+
+       * ircd/m_ping.c (m_functions): Delete duplicative comment.
+       (m_ping): Write doxygen comment.
+       (mo_ping): Write doxygen comment.
+       (ms_ping): Write doxygen comment.
+
+       * ircd/m_pong.c (m_functions): Delete duplicative comment.
+       (ms_pong): Write doxygen comment.
+       (mr_pong): Write doxygen comment.
+       (m_pong): Write doxygen comment.
+
+       * ircd/m_privmsg.c (m_functions): Delete duplicative comment.
+       (m_privmsg): Write doxygen comment.
+       (ms_privmsg): Write doxygen comment.
+       (mo_privmsg): Write doxygen comment.
+
+       * ircd/m_pseudo.c (m_functions): Delete duplicative comment.
+       (m_pseudo): Write doxygen comment.
+
+2006-07-04  Michael Poole <[EMAIL PROTECTED]>
+
        * ircd/m_links.c (m_functions): Delete duplicative comment.
        (m_links): Write doxygen comment.
        (ms_links): Write doxygen comment.
Index: ircu2.10/ircd/m_part.c
diff -u ircu2.10/ircd/m_part.c:1.11 ircu2.10/ircd/m_part.c:1.12
--- ircu2.10/ircd/m_part.c:1.11 Mon Jun 26 19:39:59 2006
+++ ircu2.10/ircd/m_part.c      Tue Jul  4 13:37:32 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_part.c,v 1.11 2006/06/27 02:39:59 entrope Exp $
+ * $Id: m_part.c,v 1.12 2006/07/04 20:37:32 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,12 +39,17 @@
 /* #include <assert.h> -- Now using assert in ircd_log.h */
 #include <string.h>
 
-/*
- * m_part - generic message handler
+/** Handle a PART message from a client connection.
  *
- * parv[0] = sender prefix
- * parv[1] = channel
- * parv[parc - 1] = comment
+ * \a parv has the following elements:
+ * \li \a parv[1] is a comma-separated list of channel names
+ * \li \a parv[\a parc - 1] is the parting 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_part(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 {
@@ -154,12 +103,17 @@
   return joinbuf_flush(&parts); /* flush channel parts */
 }
 
-/*
- * ms_part - server message handler
+/** Handle a PART message from a server connection.
  *
- * parv[0] = sender prefix
- * parv[1] = channel
- * parv[parc - 1] = comment
+ * \a parv has the following elements:
+ * \li \a parv[1] is a comma-separated list of channel names
+ * \li \a parv[\a parc - 1] is the parting 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_part(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 {
Index: ircu2.10/ircd/m_pass.c
diff -u ircu2.10/ircd/m_pass.c:1.10 ircu2.10/ircd/m_pass.c:1.11
--- ircu2.10/ircd/m_pass.c:1.10 Mon Jun 26 17:11:17 2006
+++ ircu2.10/ircd/m_pass.c      Tue Jul  4 13:37:32 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_pass.c,v 1.10 2006/06/27 00:11:17 entrope Exp $
+ * $Id: m_pass.c,v 1.11 2006/07/04 20:37:32 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"
@@ -90,8 +34,17 @@
 
 /* #include <assert.h> -- Now using assert in ircd_log.h */
 
-/*
- * mr_pass - registration message handler
+/** Handle a PASS message from an unregistered connection.
+ *
+ * \a parv[1..\a parc-1] is a possibly broken-up password.  Since some
+ * clients do not prefix the password with ':', this functions stitches
+ * the elements back together before using it.
+ *
+ * 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_pass(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 {
Index: ircu2.10/ircd/m_ping.c
diff -u ircu2.10/ircd/m_ping.c:1.12 ircu2.10/ircd/m_ping.c:1.13
--- ircu2.10/ircd/m_ping.c:1.12 Sun Sep 11 10:40:21 2005
+++ ircu2.10/ircd/m_ping.c      Tue Jul  4 13:37:32 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_ping.c,v 1.12 2005/09/11 17:40:21 decampos Exp $
+ * $Id: m_ping.c,v 1.13 2006/07/04 20:37:32 entrope Exp $
  */
 
 /*
@@ -74,62 +74,6 @@
  *  <Gte-> there we go
  *  <Gte-> I can get a ping reply from a server I'm not on :)
  */
-/*
- * 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"
@@ -149,12 +93,16 @@
 #include <stdlib.h>
 #include <string.h>
 
-/*
- * m_ping - generic message handler
+/** Handle a PING message from a normal client connection.
+ *
+ * \a parv has the following elements:
+ * \li \a parv[1] is the message to send in the PONG response
  *
- * parv[0] = sender prefix
- * parv[1] = origin
- * parv[2] = destination
+ * 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_ping(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 {
@@ -168,12 +116,17 @@
   return 0;
 }
 
-/*
- * mo_ping - oper message handler
+/** Handle a PING message from an operator's connection.
  *
- * parv[0] = sender prefix
- * parv[1] = origin
- * parv[2] = destination
+ * \a parv has the following elements:
+ * \li \a parv[1] is the message to send in the PONG response
+ * \li \a parv[2] (optional) is the server to ping
+ *
+ * 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_ping(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 {
@@ -222,8 +175,21 @@
  * <Vek> G TOK_PONG G F 7777777777.7777777 0.1734637
  */
 
-/*
- * ms_ping - server message handler
+/** Handle a PING message from a server connection.
+ *
+ * \a parv has the following elements:
+ * \li \a parv[1] is the numnick of the client or server who
+ *   originated the PING
+ * \li \a parv[2] (optional) is the PING destination
+ * \li \a parv[3] (optional) is an AsLL ping timestamp (seconds.msec)
+ *
+ * For AsLL pings, \a parv[1] and \a parv[2] are 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_ping(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 {
Index: ircu2.10/ircd/m_pong.c
diff -u ircu2.10/ircd/m_pong.c:1.18 ircu2.10/ircd/m_pong.c:1.19
--- ircu2.10/ircd/m_pong.c:1.18 Sun May 14 12:31:30 2006
+++ ircu2.10/ircd/m_pong.c      Tue Jul  4 13:37:32 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_pong.c,v 1.18 2006/05/14 19:31:30 entrope Exp $
+ * $Id: m_pong.c,v 1.19 2006/07/04 20:37:32 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,12 +43,23 @@
 #include <string.h>
 #include <stdlib.h>
 
-/*
- * ms_pong - server message handler
+/** Handle a PONG message from a server connection.
  *
- * parv[0] = sender prefix
- * parv[1] = origin
- * parv[2] = destination
+ * \a parv has the following elements:
+ * \li \a parv[1] is the PONG responder
+ * \li \a parv[2] is the PONG target (the PING originator)
+ *
+ * For AsLL pongs, the first two arguments are ignored and the
+ * following arguments are used:
+ * \li \a parv[3] is the original AsLL PING send timestamp
+ * \li \a parv[4] is the "outbound" time for the PING to arrive
+ * \li \a parv[5] is the AsLL PONG send timestamp
+ *
+ * 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_pong(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 {
@@ -149,12 +104,16 @@
   return 0;
 }
 
-/*
- * mr_pong - registration message handler
+/** Handle a PONG message from an unregistered connection.
  *
- * parv[0] = sender prefix
- * parv[1] = pong response echo
- * NOTE: cptr is always unregistered here
+ * \a parv has the following elements:
+ * \li \a parv[1] is the PING "cookie" used to deter TCP spoofing
+ *
+ * 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_pong(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 {
@@ -166,12 +125,15 @@
   return (parc > 1) ? auth_set_pong(cli_auth(sptr), strtoul(parv[parc - 1], 
NULL, 10)) : 0;
 }
 
-/*
- * m_pong - normal message handler
+/** Handle a PONG message from a normal connection.
+ *
+ * \a parv is ignored.
  *
- * parv[0] = sender prefix
- * parv[1] = origin
- * parv[2] = destination
+ * 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_pong(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 {
Index: ircu2.10/ircd/m_privmsg.c
diff -u ircu2.10/ircd/m_privmsg.c:1.12 ircu2.10/ircd/m_privmsg.c:1.13
--- ircu2.10/ircd/m_privmsg.c:1.12      Mon Jun 26 19:39:59 2006
+++ ircu2.10/ircd/m_privmsg.c   Tue Jul  4 13:37:32 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_privmsg.c,v 1.12 2006/06/27 02:39:59 entrope Exp $
+ * $Id: m_privmsg.c,v 1.13 2006/07/04 20:37:32 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,8 +41,17 @@
 /* #include <assert.h> -- Now using assert in ircd_log.h */
 #include <string.h>
 
-/*
- * m_privmsg - generic message handler
+/** Handle a PRIVMSG message from a normal client connection.
+ *
+ * \a parv has the following elements:
+ * \li \a parv[1] is the comma-separated list of message targets
+ * \li \a parv[\a parc - 1] is the 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 m_privmsg(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 {
@@ -143,8 +96,17 @@
   return 0;
 }
 
-/*
- * ms_privmsg - server message handler
+/** Handle a PRIVMSG message from a server connection.
+ *
+ * \a parv has the following elements:
+ * \li \a parv[1] is the comma-separated list of message targets
+ * \li \a parv[\a parc - 1] is the 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 ms_privmsg(struct Client* cptr, struct Client* sptr, int parc, char* 
parv[])
 {
@@ -183,9 +145,17 @@
   return 0;
 }
 
-
-/*
- * mo_privmsg - oper message handler
+/** Handle a PRIVMSG message from an operator connection.
+ *
+ * \a parv has the following elements:
+ * \li \a parv[1] is the comma-separated list of message targets
+ * \li \a parv[\a parc - 1] is the 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_privmsg(struct Client* cptr, struct Client* sptr, int parc, char* 
parv[])
 {
Index: ircu2.10/ircd/m_pseudo.c
diff -u ircu2.10/ircd/m_pseudo.c:1.2 ircu2.10/ircd/m_pseudo.c:1.3
--- ircu2.10/ircd/m_pseudo.c:1.2        Fri Dec 10 21:13:48 2004
+++ ircu2.10/ircd/m_pseudo.c    Tue Jul  4 13:37:32 2006
@@ -19,66 +19,9 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: m_pseudo.c,v 1.2 2004/12/11 05:13:48 klmitch Exp $
+ * $Id: m_pseudo.c,v 1.3 2006/07/04 20:37:32 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], pointer to "extra" data (service mapping)
- *                    parv[2]...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,12 +41,18 @@
 
 /* #include <assert.h> -- Now using assert in ircd_log.h */
 
-/*
- * m_pseudo - generic service message handler
+/** Hanel a pseudo-message (e.g. /X or /CHANSERV) from a connection.
  *
- * parv[0] = sender prefix
- * parv[1] = service mapping (s_map * disguised as char *)
- * parv[2] = message
+ * \a parv has the following elements:
+ * \li \a parv[1] is secretly a struct s_map *, passed as char *
+ *   because there is no per-command-handler private data
+ * \li \a parv[\a parc - 1] is the message to the service
+ *
+ * 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_pseudo(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