Committer : entrope
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Commit time: 2006-06-29 03:48:27 UTC
Modified files:
ChangeLog ircd/m_clearmode.c ircd/m_close.c ircd/m_connect.c
ircd/m_cprivmsg.c ircd/m_create.c ircd/m_defaults.c
ircd/m_destruct.c ircd/m_desynch.c ircd/m_die.c
Log message:
Clean m_functions comments and doxygenate m_[cd]*.c
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.787 ircu2.10/ChangeLog:1.788
--- ircu2.10/ChangeLog:1.787 Wed Jun 28 19:56:12 2006
+++ ircu2.10/ChangeLog Wed Jun 28 20:48:17 2006
@@ -1,5 +1,41 @@
2006-06-28 Michael Poole <[EMAIL PROTECTED]>
+ * ircd/m_clearmode.c (m_functions): Delete duplicative comment.
+ (do_clearmode): Write doxygen comment.
+ (ms_clearmode): Write doxygen comment.
+ (mo_clearmode): Write doxygen comment.
+
+ * ircd/m_close.c (m_functions): Delete duplicative comment.
+ (mo_close): Write doxygen comment.
+
+ * ircd/m_connect.c (m_functions): Delete duplicative comment.
+ (ms_connect): Write doxygen comment.
+ (mo_connect): Write doxygen comment.
+
+ * ircd/m_cprivmsg.c (m_functions): Delete duplicative comment.
+ (m_cprivmsg): Write doxygen comment. Fix parv[3] use.
+ (m_cnotice): Write doxygen comment. Fix parv[3] use.
+
+ * ircd/m_create.c (m_functions): Delete duplicative comment.
+ (ms_create): Write doxygen comment.
+
+ * ircd/m_defaults.c (m_functions): Delete duplicative comment.
+ (m_not_oper): Write doxygen comment.
+ (m_unregistered): Write doxygen comment.
+ (m_registered): Write doxygen comment.
+ (m_ignore): Write doxygen comment.
+
+ * ircd/m_destruct.c (ms_destruct): Convert comment to doxygen
+ format.
+
+ * ircd/m_desynch.c (m_functions): Delete duplicative comment.
+ (ms_desynch): Write doxygen comment.
+
+ * ircd/m_die.c (m_functions): Delete duplicative comment.
+ (mo_die): Write doxygen comment.
+
+2006-06-28 Michael Poole <[EMAIL PROTECTED]>
+
* ircd/m_cap.c: Doxygenate structures, variables and functions
that were not documented before.
Index: ircu2.10/ircd/m_clearmode.c
diff -u ircu2.10/ircd/m_clearmode.c:1.31 ircu2.10/ircd/m_clearmode.c:1.32
--- ircu2.10/ircd/m_clearmode.c:1.31 Mon Sep 26 19:41:57 2005
+++ ircu2.10/ircd/m_clearmode.c Wed Jun 28 20:48:17 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_clearmode.c,v 1.31 2005/09/27 02:41:57 entrope Exp $
+ * $Id: m_clearmode.c,v 1.32 2006/06/29 03:48:17 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,11 +44,12 @@
/* #include <assert.h> -- Now using assert in ircd_log.h */
-/*
- * do_clearmode(struct Client *cptr, struct Client *sptr,
- * struct Channel *chptr, char *control)
- *
- * This is the function that actually clears the channel modes.
+/** Clear a channel's modes.
+ * @param[in] cptr The local client sending the CLEARMODE message.
+ * @param[in] sptr The original source of the CLEARMODE message.
+ * @param[in] chptr The channel being affected.
+ * @param[in] control Null-terminated array of modes to clear.
+ * @return Zero.
*/
static int
do_clearmode(struct Client *cptr, struct Client *sptr, struct Channel *chptr,
@@ -237,12 +182,17 @@
return 0;
}
-/*
- * ms_clearmode - server message handler
+/** Handle a CLEARMODE message from a server.
*
- * parv[0] = Send prefix
- * parv[1] = Channel name
- * parv[2] = Control string
+ * \a parv has the following elements:
+ * \li \a parv[1] is the channel to affect
+ * \li \a parv[2] is the channel modes to clear
+ *
+ * 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_clearmode(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
@@ -264,12 +214,17 @@
return do_clearmode(cptr, sptr, chptr, parv[2]);
}
-/*
- * mo_clearmode - oper message handler
+/** Handle a CLEARMODE message from an operator.
*
- * parv[0] = Send prefix
- * parv[1] = Channel name
- * parv[2] = Control string
+ * \a parv has the following elements:
+ * \li \a parv[1] is the channel to affect
+ * \li \a parv[2] (optional) is the channel modes to clear
+ *
+ * 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_clearmode(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
Index: ircu2.10/ircd/m_close.c
diff -u ircu2.10/ircd/m_close.c:1.5 ircu2.10/ircd/m_close.c:1.6
--- ircu2.10/ircd/m_close.c:1.5 Fri Dec 10 21:13:46 2004
+++ ircu2.10/ircd/m_close.c Wed Jun 28 20:48:17 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_close.c,v 1.5 2004/12/11 05:13:46 klmitch Exp $
+ * $Id: m_close.c,v 1.6 2006/06/29 03:48:17 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"
@@ -91,9 +35,15 @@
/* #include <assert.h> -- Now using assert in ircd_log.h */
-/*
- * mo_close - oper message handler
+/** Handle a CLOSE message from an operator.
+ * This causes all currently unregistered connections to be closed.
* - added by Darren Reed Jul 13 1992.
+ *
+ * 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_close(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
Index: ircu2.10/ircd/m_connect.c
diff -u ircu2.10/ircd/m_connect.c:1.17 ircu2.10/ircd/m_connect.c:1.18
--- ircu2.10/ircd/m_connect.c:1.17 Fri Dec 10 21:13:46 2004
+++ ircu2.10/ircd/m_connect.c Wed Jun 28 20:48:17 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_connect.c,v 1.17 2004/12/11 05:13:46 klmitch Exp $
+ * $Id: m_connect.c,v 1.18 2006/06/29 03:48:17 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,14 +46,18 @@
/* #include <assert.h> -- Now using assert in ircd_log.h */
#include <stdlib.h>
-/*
- * ms_connect - server message handler
- * - Added by Jto 11 Feb 1989
+/** Handle a CONNECT message from a server.
*
- * parv[0] = sender prefix
- * parv[1] = servername
- * parv[2] = port number
- * parv[3] = remote server
+ * \a parv has the following elements:
+ * \li \a parv[1] is the server that should initiate the connection
+ * \li \a parv[2] is the port number to connect on (zero for the default)
+ * \li \a parv[3] is the server to connect 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_connect(struct Client* cptr, struct Client* sptr, int parc, char*
parv[])
{
@@ -213,14 +161,18 @@
return 0;
}
-/*
- * mo_connect - oper message handler
- * - Added by Jto 11 Feb 1989
+/** Handle a CONNECT message from an operator.
*
- * parv[0] = sender prefix
- * parv[1] = servername
- * parv[2] = port number
- * parv[3] = remote server
+ * \a parv has the following elements:
+ * \li \a parv[1] is the server that should initiate the connection
+ * \li \a parv[2] is the port number to connect on (zero for the default)
+ * \li \a parv[3] is the server to connect 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_connect(struct Client* cptr, struct Client* sptr, int parc, char*
parv[])
{
Index: ircu2.10/ircd/m_cprivmsg.c
diff -u ircu2.10/ircd/m_cprivmsg.c:1.4 ircu2.10/ircd/m_cprivmsg.c:1.5
--- ircu2.10/ircd/m_cprivmsg.c:1.4 Fri Dec 10 21:13:46 2004
+++ ircu2.10/ircd/m_cprivmsg.c Wed Jun 28 20:48:17 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_cprivmsg.c,v 1.4 2004/12/11 05:13:46 klmitch Exp $
+ * $Id: m_cprivmsg.c,v 1.5 2006/06/29 03:48:17 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"
@@ -89,13 +33,18 @@
/* #include <assert.h> -- Now using assert in ircd_log.h */
-/*
- * m_cprivmsg - generic message handler
+/** Handle a CPRIVMSG from some client.
*
- * parv[0] = sender prefix
- * parv[1] = nick
- * parv[2] = #channel
- * parv[3] = Private message text
+ * \a parv has the following elements:
+ * \li \a parv[1] is the nickname of the client being sent to
+ * \li \a parv[2] is a channel where \a sptr is an op and \a parv[1] has joined
+ * \li \a parv[\a parc - 1] is the message to send
+ *
+ * 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_cprivmsg(struct Client* cptr, struct Client* sptr, int parc, char*
parv[])
{
@@ -105,16 +54,21 @@
if (parc < 4 || EmptyString(parv[3]))
return need_more_params(sptr, "CPRIVMSG");
- return whisper(sptr, parv[1], parv[2], parv[3], 0);
+ return whisper(sptr, parv[1], parv[2], parv[parc - 1], 0);
}
-/*
- * m_cnotice - generic message handler
+/** Handle a CNOTICE from some client.
*
- * parv[0] = sender prefix
- * parv[1] = nick
- * parv[2] = #channel
- * parv[3] = Private message text
+ * \a parv has the following elements:
+ * \li \a parv[1] is the nickname of the client being sent to
+ * \li \a parv[2] is a channel where \a sptr is an op and \a parv[1] has joined
+ * \li \a parv[\a parc - 1] is the message to send
+ *
+ * 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_cnotice(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
{
@@ -124,7 +78,7 @@
if (parc < 4 || EmptyString(parv[3]))
return need_more_params(sptr, "CNOTICE");
- return whisper(sptr, parv[1], parv[2], parv[3], 1);
+ return whisper(sptr, parv[1], parv[2], parv[parc - 1], 1);
}
Index: ircu2.10/ircd/m_create.c
diff -u ircu2.10/ircd/m_create.c:1.21 ircu2.10/ircd/m_create.c:1.22
--- ircu2.10/ircd/m_create.c:1.21 Thu Apr 6 20:27:50 2006
+++ ircu2.10/ircd/m_create.c Wed Jun 28 20:48:17 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_create.c,v 1.21 2006/04/07 03:27:50 entrope Exp $
+ * $Id: m_create.c,v 1.22 2006/06/29 03:48:17 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"
@@ -100,8 +44,18 @@
#include <stdlib.h>
#include <string.h>
-/*
- * ms_create - server message handler
+/** Handle a CREATE message from a server.
+ * Atomically creates a new channel and ops the creator.
+ *
+ * \a parv has the following elements:
+ * \li \a parv[1] Comma-separated list of channels to create.
+ * \li \a parv[2] Creation timestamp for the channel(s).
+ *
+ * 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_create(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
Index: ircu2.10/ircd/m_defaults.c
diff -u ircu2.10/ircd/m_defaults.c:1.8 ircu2.10/ircd/m_defaults.c:1.9
--- ircu2.10/ircd/m_defaults.c:1.8 Fri Jan 6 03:22:31 2006
+++ ircu2.10/ircd/m_defaults.c Wed Jun 28 20:48:17 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_defaults.c,v 1.8 2006/01/06 11:22:31 isomer Exp $
+ * $Id: m_defaults.c,v 1.9 2006/06/29 03:48:17 entrope Exp $
*/
#include "config.h"
@@ -35,68 +35,29 @@
/* #include <assert.h> -- Now using assert in ircd_log.h */
-/*
- * m_functions execute protocol messages on this server:
+/** Inform a client he is not opered.
+ * \a parv is ignored.
*
- * 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.
+ * 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_not_oper(struct Client* cptr, struct Client* sptr, int parc, char*
parv[])
{
return send_reply(cptr, ERR_NOPRIVILEGES);
}
+/** Inform a client he must be registered first.
+ * \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_unregistered(struct Client* cptr, struct Client* sptr, int parc, char*
parv[])
{
send_reply(cptr, SND_EXPLICIT | ERR_NOTREGISTERED, "%s :Register first.",
@@ -104,11 +65,29 @@
return 0;
}
+/** Inform a client he is already registered.
+ * \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_registered(struct Client* cptr, struct Client* sptr, int parc, char*
parv[])
{
return send_reply(sptr, ERR_ALREADYREGISTRED);
}
+/** Ignore a command entirely.
+ * \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_ignore(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
return 0;
Index: ircu2.10/ircd/m_destruct.c
diff -u ircu2.10/ircd/m_destruct.c:1.12 ircu2.10/ircd/m_destruct.c:1.13
--- ircu2.10/ircd/m_destruct.c:1.12 Thu Apr 6 20:27:50 2006
+++ ircu2.10/ircd/m_destruct.c Wed Jun 28 20:48:17 2006
@@ -19,7 +19,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: m_destruct.c,v 1.12 2006/04/07 03:27:50 entrope Exp $
+ * $Id: m_destruct.c,v 1.13 2006/06/29 03:48:17 entrope Exp $
*/
#include "config.h"
@@ -40,14 +40,13 @@
/* #include <assert.h> -- Now using assert in ircd_log.h */
#include <stdlib.h>
-/*
- * ms_destruct - server message handler
+/** Handle a DESTRUCT message from a server.
*
- * Added 1997 by Run, actually coded and used since 2002.
+ * \a parv has the following elements:
+ * \li \a parv[1] Name of channel to destroy
+ * \li \a parv[2] Timestamp of channel to destroy
*
- * parv[0] = sender prefix
- * parv[1] = channel channelname
- * parv[2] = channel time stamp
+ * Added 1997 by Run, actually coded and used since 2002.
*
* This message is intended to destruct _empty_ channels.
*
@@ -86,6 +85,12 @@
* destruct because it comes from an 'area' that will
* be overridden by our own CREATE: the state that generated
* this DESTRUCT is 'history'.
+ *
+ * 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_destruct(struct Client* cptr, struct Client* sptr, int parc, char*
parv[])
{
Index: ircu2.10/ircd/m_desynch.c
diff -u ircu2.10/ircd/m_desynch.c:1.10 ircu2.10/ircd/m_desynch.c:1.11
--- ircu2.10/ircd/m_desynch.c:1.10 Fri Dec 10 21:13:46 2004
+++ ircu2.10/ircd/m_desynch.c Wed Jun 28 20:48:17 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_desynch.c,v 1.10 2004/12/11 05:13:46 klmitch Exp $
+ * $Id: m_desynch.c,v 1.11 2006/06/29 03:48:17 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"
@@ -95,14 +39,18 @@
/* #include <assert.h> -- Now using assert in ircd_log.h */
-/*
- * ms_desynch - server message handler
- *
- * Writes to all +g users; for sending wall type debugging/anti-hack info.
+/** Handle a DESYNCH message from a server.
+ * Broadcasts the message to opers with +g and to other servers.
* Added 23 Apr 1998 --Run
*
- * parv[0] - sender prefix
- * parv[parc-1] - message text
+ * \a parv has the following elements:
+ * \li \a parv[\a parc - 1] is the description of the desynchronization.
+ *
+ * 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_desynch(struct Client* cptr, struct Client* sptr, int parc, char*
parv[])
{
Index: ircu2.10/ircd/m_die.c
diff -u ircu2.10/ircd/m_die.c:1.6 ircu2.10/ircd/m_die.c:1.7
--- ircu2.10/ircd/m_die.c:1.6 Fri Dec 10 21:13:46 2004
+++ ircu2.10/ircd/m_die.c Wed Jun 28 20:48:17 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_die.c,v 1.6 2004/12/11 05:13:46 klmitch Exp $
+ * $Id: m_die.c,v 1.7 2006/06/29 03:48:17 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"
@@ -95,8 +39,15 @@
/* #include <assert.h> -- Now using assert in ircd_log.h */
-/*
- * mo_die - oper message handler
+/** Handle a DIE message from an operator.
+ *
+ * \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 mo_die(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