Committer : entrope
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Commit time: 2006-07-04 19:44:48 UTC
Modified files:
ChangeLog ircd/m_links.c ircd/m_list.c ircd/m_lusers.c
ircd/m_map.c ircd/m_mode.c ircd/m_motd.c ircd/m_names.c
ircd/m_nick.c ircd/m_notice.c ircd/m_oper.c ircd/m_opmode.c
Log message:
Doxygenate m_[lmno]*.c
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.790 ircu2.10/ChangeLog:1.791
--- ircu2.10/ChangeLog:1.790 Fri Jun 30 16:45:59 2006
+++ ircu2.10/ChangeLog Tue Jul 4 12:44:38 2006
@@ -1,3 +1,56 @@
+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.
+
+ * ircd/m_list.c (m_functions): Delete duplicative comment.
+ (show_usage): Write doxygen comment.
+ (param_parse): Write doxygen comment.
+ (list_set_default): Write doxygen comment.
+ (m_list): Write doxygen comment.
+
+ * ircd/m_lusers.c (m_functions): Delete duplicative comment.
+ (m_lusers): Write doxygen comment.
+ (ms_lusers): Write doxygen comment.
+
+ * ircd/m_map.c (m_functions): Delete duplicative comment.
+ (dump_map): Write doxygen comment.
+ (m_map): Write doxygen comment.
+
+ * ircd/m_mode.c (m_functions): Delete duplicative comment.
+ (m_mode): Write doxygen comment.
+ (ms_mode): Write doxygen comment.
+
+ * ircd/m_motd.c (m_functions): Delete duplicative comment.
+ (m_motd): Convert comment to doxygen format.
+ (ms_motd): Convert comment to doxygen format.
+
+ * ircd/m_names.c (m_functions): Delete duplicative comment.
+ (do_names): Convert comment to doxygen format.
+ (m_names): Write doxygen comment.
+ (ms_names): Write doxygen comment.
+
+ * ircd/m_nick.c (m_functions): Delete duplicative comment.
+ (do_nick_name): Convert comment to doxygen format.
+ (m_nick): Write doxygen comment.
+ (ms_nick): Write doxygen comment.
+
+ * ircd/m_notice.c (m_functions): Delete duplicative comment.
+ (m_notice): Write doxygen comment.
+ (ms_notice): Write doxygen comment.
+ (mo_notice): Write doxygen comment.
+
+ * ircd/m_oper.c (m_functions): Delete duplicative comment.
+ (oper_password_match): Write doxygen comment.
+ (m_oper): Write doxygen comment.
+ (ms_oper): Write doxygen comment.
+ (mo_oper): Write doxygen comment.
+
+ * ircd/m_opmode.c (m_functions): Delete duplicative comment.
+ (ms_opmode): Write doxygen comment.
+ (mo_opmode): Write doxygen comment.
+
2006-06-30 Michael Poole <[EMAIL PROTECTED]>
* ircd/ircd_parser.y (iauth*): Avoid leaking program name string.
Index: ircu2.10/ircd/m_links.c
diff -u ircu2.10/ircd/m_links.c:1.12 ircu2.10/ircd/m_links.c:1.13
--- ircu2.10/ircd/m_links.c:1.12 Fri Dec 10 21:13:47 2004
+++ ircu2.10/ircd/m_links.c Tue Jul 4 12:44:38 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_links.c,v 1.12 2004/12/11 05:13:47 klmitch Exp $
+ * $Id: m_links.c,v 1.13 2006/07/04 19:44:38 entrope Exp $
*/
-/*
- * m_functions execute protocol messages on this server:
- *
- * cptr is always NON-NULL, pointing to a *LOCAL* client
- * structure (with an open socket connected!). This
- * identifies the physical socket where the message
- * originated (or which caused the m_function to be
- * executed--some m_functions may call others...).
- *
- * sptr is the source of the message, defined by the
- * prefix part of the message if present. If not
- * or prefix not found, then sptr==cptr.
- *
- * (!IsServer(cptr)) => (cptr == sptr), because
- * prefixes are taken *only* from servers...
- *
- * (IsServer(cptr))
- * (sptr == cptr) => the message didn't
- * have the prefix.
- *
- * (sptr != cptr && IsServer(sptr) means
- * the prefix specified servername. (?)
- *
- * (sptr != cptr && !IsServer(sptr) means
- * that message originated from a remote
- * user (not local).
- *
- * combining
- *
- * (!IsServer(sptr)) means that, sptr can safely
- * taken as defining the target structure of the
- * message in this server.
- *
- * *Always* true (if 'parse' and others are working correct):
- *
- * 1) sptr->from == cptr (note: cptr->from == cptr)
- *
- * 2) MyConnect(sptr) <=> sptr == cptr (e.g. sptr
- * *cannot* be a local connection, unless it's
- * actually cptr!). [MyConnect(x) should probably
- * be defined as (x == x->from) --msa ]
- *
- * parc number of variable parameter strings (if zero,
- * parv is allowed to be NULL)
- *
- * parv a NULL terminated list of parameter pointers,
- *
- * parv[0], sender (prefix string), if not present
- * this points to an empty string.
- * parv[1]...parv[parc-1]
- * pointers to additional parameters
- * parv[parc] == NULL, *always*
- *
- * note: it is guaranteed that parv[0]..parv[parc-1] are all
- * non-NULL pointers.
- */
#include "config.h"
#include "client.h"
@@ -98,17 +42,17 @@
/* #include <assert.h> -- Now using assert in ircd_log.h */
-/*
- * m_links - generic message handler
- *
- * parv[0] = sender prefix
- * parv[1] = servername mask
- *
- * or
+/** Handle a LINKS message from a local client.
*
- * parv[0] = sender prefix
- * parv[1] = server to query
- * parv[2] = servername mask
+ * \a parv has the following elements:
+ * \li \a parv[1] (optional) is the server name to query
+ * \li \a parv[N+1] is the server name mask to list
+ *
+ * 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_links(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
@@ -150,17 +94,17 @@
return 0;
}
-/*
- * ms_links - server message handler
- *
- * parv[0] = sender prefix
- * parv[1] = servername mask
- *
- * or
+/** Handle a LINKS message from another server.
*
- * parv[0] = sender prefix
- * parv[1] = server to query
- * parv[2] = servername mask
+ * \a parv has the following elements:
+ * \li \a parv[1] (optional) is the server name to interrogate
+ * \li \a parv[N+1] is the server name mask to list
+ *
+ * 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_links(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
Index: ircu2.10/ircd/m_list.c
diff -u ircu2.10/ircd/m_list.c:1.16 ircu2.10/ircd/m_list.c:1.17
--- ircu2.10/ircd/m_list.c:1.16 Mon Jun 20 06:22:45 2005
+++ ircu2.10/ircd/m_list.c Tue Jul 4 12:44:38 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_list.c,v 1.16 2005/06/20 13:22:45 a1kmm Exp $
+ * $Id: m_list.c,v 1.17 2006/07/04 19:44:38 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"
@@ -129,6 +73,10 @@
{0} /* wildcard */
};
+/** Send LIST usage instructions to a client.
+ * @param[in] sptr Client who needs instructions.
+ * @return LPARAM_ERROR
+ */
static int
show_usage(struct Client *sptr)
{
@@ -178,6 +126,15 @@
return LPARAM_ERROR; /* return error condition */
}
+/** Parse a parameter to a LIST message.
+ * @param[in] sptr Client that originated the request.
+ * @param[in] param Parameter to parse.
+ * @param[in,out] args List arguments to update based on \a param.
+ * @param[in] permit_chan If non-zero, allow \a param to be a
+ * comma-separated list of channel names.
+ * @return LPARAM_ERROR on failure, LPARAM_CHANNEL if \a param should
+ * be interpreted as channel names, LPARAM_SUCCESS otherwise.
+ */
static int
param_parse(struct Client *sptr, const char *param, struct ListingArgs *args,
int permit_chan)
@@ -316,6 +273,10 @@
return LPARAM_SUCCESS;
}
+/** Initialize #la_default.
+ * Modifies #la_default to be #la_init modified by the value of
+ * FEAT_DEFAULT_LIST_PARAM.
+ */
void
list_set_default(void)
{
@@ -326,12 +287,22 @@
la_default = la_init; /* recover from error by switching to default */
}
-/*
- * m_list - generic message handler
+/** Handle a LIST request from a local connection.
*
- * parv[0] = sender prefix
- * parv[1] = channel list or user/time limit
- * parv[2...] = more user/time limits
+ * \a parv has the following elements:
+ * \li \a parv[1] (optional) is a comma-separated list of channel
+ * names, or a filter specification
+ * \li \a parv[2..\a parc - 1] (optional) are additional filters
+ *
+ * If a listing is already in progress, it is stopped before the new
+ * list is started. If there are no arguments or if \a parv[1] is
+ * "STOP", the listing is stopped with no new list started.
+ *
+ * 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_list(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
Index: ircu2.10/ircd/m_lusers.c
diff -u ircu2.10/ircd/m_lusers.c:1.9 ircu2.10/ircd/m_lusers.c:1.10
--- ircu2.10/ircd/m_lusers.c:1.9 Fri Dec 10 21:13:47 2004
+++ ircu2.10/ircd/m_lusers.c Tue Jul 4 12:44:38 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_lusers.c,v 1.9 2004/12/11 05:13:47 klmitch Exp $
+ * $Id: m_lusers.c,v 1.10 2006/07/04 19:44:38 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,12 +41,17 @@
/* #include <assert.h> -- Now using assert in ircd_log.h */
-/*
- * m_lusers - generic message handler
+/** Handle a LUSERS message from a local connection.
*
- * parv[0] = sender
- * parv[1] = ignored
- * parv[2] = server to query
+ * \a parv may either be empty or have the following elements:
+ * \a \li parv[1] is ignored
+ * \a \li parv[2] is the server to query
+ *
+ * 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_lusers(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
@@ -130,12 +79,17 @@
return 0;
}
-/*
- * ms_lusers - server message handler
+/** Handle a LUSERS message from a server connection.
*
- * parv[0] = sender
- * parv[1] = ignored
- * parv[2] = server to query
+ * \a parv has the following elements:
+ * \a \li parv[1] is ignored
+ * \a \li parv[2] is the server to query
+ *
+ * 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_lusers(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
Index: ircu2.10/ircd/m_map.c
diff -u ircu2.10/ircd/m_map.c:1.15 ircu2.10/ircd/m_map.c:1.16
--- ircu2.10/ircd/m_map.c:1.15 Fri Jan 6 03:22:31 2006
+++ ircu2.10/ircd/m_map.c Tue Jul 4 12:44:38 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_map.c,v 1.15 2006/01/06 11:22:31 isomer Exp $
+ * $Id: m_map.c,v 1.16 2006/07/04 19:44:38 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,6 +46,12 @@
#include <stdio.h>
#include <string.h>
+/** Send a server map to a client.
+ * @param[in] cptr Client to who to send the map.
+ * @param[in] server Top-level server to display.
+ * @param[in] mask Mask to filter which servers are shown.
+ * @param[in] prompt_length Number of characters used in prompt.
+ */
static void dump_map(struct Client *cptr, struct Client *server, char *mask,
int prompt_length)
{
const char *chr;
@@ -162,12 +112,17 @@
}
-/*
- * m_map - generic message handler
+/** Handle a MAP request from a local connection.
* -- by Run
*
- * parv[0] = sender prefix
- * parv[1] = server mask
+ * \a \parv has the following elements:
+ * \li \a parv[1] (optional) is a mask of servers to display in the map
+ *
+ * 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_map(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
Index: ircu2.10/ircd/m_mode.c
diff -u ircu2.10/ircd/m_mode.c:1.18 ircu2.10/ircd/m_mode.c:1.19
--- ircu2.10/ircd/m_mode.c:1.18 Mon Jun 26 19:39:59 2006
+++ ircu2.10/ircd/m_mode.c Tue Jul 4 12:44:38 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_mode.c,v 1.18 2006/06/27 02:39:59 entrope Exp $
+ * $Id: m_mode.c,v 1.19 2006/07/04 19:44:38 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 "handlers.h"
@@ -102,6 +46,19 @@
#include <stdlib.h>
#include <string.h>
+/** Handle a MODE message from a local client.
+ *
+ * \a parv has the following elements:
+ * \a parv[1] is the name of the channel to modify
+ * \a parv[2..\a parc - 1] (optional) are the modes and parameters to
+ * apply to the channel
+ *
+ * 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_mode(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
{
@@ -152,6 +109,20 @@
return modebuf_flush(&mbuf);
}
+/** Handle a MODE message from a server.
+ *
+ * \a parv has the following elements:
+ * \a parv[1] is the name of the channel to modify
+ * \a parv[2..\a parc - N] are the modes and parameters to apply to
+ * the channel
+ * \a parv[\a parc - 1] (optional) is the channel 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_mode(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
{
Index: ircu2.10/ircd/m_motd.c
diff -u ircu2.10/ircd/m_motd.c:1.14 ircu2.10/ircd/m_motd.c:1.15
--- ircu2.10/ircd/m_motd.c:1.14 Fri Jan 6 03:22:31 2006
+++ ircu2.10/ircd/m_motd.c Tue Jul 4 12:44:38 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_motd.c,v 1.14 2006/01/06 11:22:31 isomer Exp $
+ * $Id: m_motd.c,v 1.15 2006/07/04 19:44:38 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,10 @@
#include <stdlib.h>
/* #include <assert.h> -- Now using assert in ircd_log.h */
-/*
- * m_motd - generic message handler
+/** Handle a MOTD message from a local connection.
*
- * parv[0] - sender prefix
- * parv[1] - servername
+ * \a parv has the following elements:
+ * \a \li parv[1] is the server to query
*
* modified 30 mar 1995 by flux ([EMAIL PROTECTED])
* T line patch - display motd based on hostmask
@@ -113,6 +56,12 @@
* memory in read_motd() in s_conf.c
*
* Now using the motd_* family of functions defined in motd.c
+ *
+ * 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_motd(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
@@ -123,11 +72,10 @@
return motd_send(sptr);
}
-/*
- * ms_motd - server message handler
+/** Handle a MOTD message from a server connection.
*
- * parv[0] - sender prefix
- * parv[1] - servername
+ * \a parv has the following elements:
+ * \a \li parv[1] is the server to query
*
* modified 30 mar 1995 by flux ([EMAIL PROTECTED])
* T line patch - display motd based on hostmask
@@ -136,6 +84,12 @@
* memory in read_motd() in s_conf.c
*
* Now using the motd_* family of functions defined in motd.c
+ *
+ * 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.
*/
static
int ms_motd(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
Index: ircu2.10/ircd/m_names.c
diff -u ircu2.10/ircd/m_names.c:1.24 ircu2.10/ircd/m_names.c:1.25
--- ircu2.10/ircd/m_names.c:1.24 Wed Nov 16 16:07:18 2005
+++ ircu2.10/ircd/m_names.c Tue Jul 4 12:44:38 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_names.c,v 1.24 2005/11/17 00:07:18 entrope Exp $
+ * $Id: m_names.c,v 1.25 2006/07/04 19:44:38 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"
@@ -97,17 +41,19 @@
/* #include <assert.h> -- Now using assert in ircd_log.h */
#include <string.h>
-/*
- * Sends a suitably formatted 'names' reply to 'sptr' consisting of nicks
within
- * 'chptr', depending on 'filter'.
+/** List some or all of of the users in a channel.
*
+ * The list contents depend on \a filter:
* NAMES_ALL - Lists all users on channel.
* NAMES_VIS - Only list visible (-i) users. --Gte (04/06/2000).
+ * NAMES_DEL - Only list delayed-join members.
* NAMES_EON - When OR'd with the other two, adds an 'End of Names' numeric
* used by m_join
*
+ * @param[in] sptr Client to whom to send the list.
+ * @param[in] chptr Channel to send list from.
+ * @param[in] filter Selector for list contents, as above.
*/
-
void do_names(struct Client* sptr, struct Channel* chptr, int filter)
{
int mlen;
@@ -208,13 +154,20 @@
send_reply(sptr, RPL_ENDOFNAMES, chptr->chname);
}
-/*
- * m_names - generic message handler
+/** Handle a NAMES message from a local connection.
*
- * parv[0] = sender prefix
- * parv[1] = channel
+ * \a parv has the following elements:
+ * \li \a parv[1] (optional) is "-D" to select delayed-join members.
+ * \li \a parv[1+N] is a comma-separated list of channels to list, or
+ * "0" for all clients on the network
+ * \li \a parv[2+N] (optional) is the server name to query
+ *
+ * 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_names(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
struct Channel *chptr;
@@ -357,11 +310,18 @@
}
-/*
- * ms_names - server message handler
- *
- * parv[0] = sender prefix
- * parv[1] = channel
+/** Handle a NAMES message from a server connection.
+ * \a parv has the following elements:
+ * \li \a parv[1] (optional) is "-D" to select delayed-join members.
+ * \li \a parv[1+N] is a comma-separated list of channels to list, or
+ * "0" for all clients on the network
+ * \li \a parv[2+N] is the server name to query
+ *
+ * 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_names(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
Index: ircu2.10/ircd/m_nick.c
diff -u ircu2.10/ircd/m_nick.c:1.27 ircu2.10/ircd/m_nick.c:1.28
--- ircu2.10/ircd/m_nick.c:1.27 Wed Dec 28 20:55:16 2005
+++ ircu2.10/ircd/m_nick.c Tue Jul 4 12:44:38 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_nick.c,v 1.27 2005/12/29 04:55:16 entrope Exp $
+ * $Id: m_nick.c,v 1.28 2006/07/04 19:44:38 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 "IPcheck.h"
@@ -102,7 +46,8 @@
#include <stdlib.h>
#include <string.h>
- /*
+/** Clean up a requested nickname.
+*
* 'do_nick_name' ensures that the given parameter (nick) is really a proper
* string for a nickname (note, the 'nick' may be modified in the process...)
*
@@ -115,6 +60,9 @@
* Note:
* The '~'-character should be allowed, but a change should be global,
* some confusion would result if only few servers allowed it...
+*
+* @param[in,out] nick Client's requested nickname.
+* @return Length of \a nick on output, or zero if totally invalid.
*/
static int do_nick_name(char* nick)
{
@@ -134,10 +82,16 @@
return (ch - nick);
}
-/*
- * m_nick - message handler for local clients
- * parv[0] = sender prefix
- * parv[1] = nickname
+/** Handle a NICK message from a local connection.
+ *
+ * \a parv has the following elements:
+ * \li \a parv[1] is the client's new requested nickname
+ *
+ * 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_nick(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
@@ -260,24 +214,28 @@
}
-/*
- * ms_nick - server message handler for nicks
- * parv[0] = sender prefix
- * parv[1] = nickname
- *
- * If from server, source is client:
- * parv[2] = timestamp
+/** Handle a NICK message from a server connection.
*
- * Source is server:
- * parv[2] = hopcount
- * parv[3] = timestamp
- * parv[4] = username
- * parv[5] = hostname
- * parv[6] = umode (optional)
- * parv[parc-3] = IP# <- Only Protocol >= 10
- * parv[parc-2] = YXX, numeric nick <- Only Protocol >= 10
- * parv[parc-1] = info
- * parv[0] = server
+ * \a parv has the following elements when \a sptr is a client:
+ * \li \a parv[1] is the client's new nickname
+ * \li \a parv[2] is the client's nickname timestamp
+ *
+ * \a parv has the following elements when \a sptr is a server:
+ * \li \a parv[1] is the new client's nickname
+ * \li \a parv[2] is the hop count to the client
+ * \li \a parv[3] is the client's nickname timestamp
+ * \li \a parv[4] is the client's username
+ * \li \a parv[5] is the client's hostname
+ * \li \a parv[6..\a parc-4] (optional) is the client's usermode
+ * \li \a parv[\a parc-3] is the client's base64 encoded IP address
+ * \li \a parv[\a parc-2] is the client's numnick
+ * \li \a parv[\a parc-1] is the client's full (GECOS-style) name
+ *
+ * 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_nick(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
Index: ircu2.10/ircd/m_notice.c
diff -u ircu2.10/ircd/m_notice.c:1.11 ircu2.10/ircd/m_notice.c:1.12
--- ircu2.10/ircd/m_notice.c:1.11 Mon Jun 26 19:39:59 2006
+++ ircu2.10/ircd/m_notice.c Tue Jul 4 12:44:38 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_notice.c,v 1.11 2006/06/27 02:39:59 entrope Exp $
+ * $Id: m_notice.c,v 1.12 2006/07/04 19:44:38 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,8 +43,17 @@
#include "handlers.h"
#endif
-/*
- * m_notice - generic message handler
+/** Handle a NOTICE message from a local 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 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_notice(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
@@ -146,8 +99,17 @@
return 0;
}
-/*
- * ms_notice - server message handler
+/** Handle a NOTICE 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 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 ms_notice(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
@@ -186,8 +148,17 @@
return 0;
}
-/*
- * mo_notice - oper message handler
+/** Handle a NOTICE 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 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 mo_notice(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
Index: ircu2.10/ircd/m_oper.c
diff -u ircu2.10/ircd/m_oper.c:1.26 ircu2.10/ircd/m_oper.c:1.27
--- ircu2.10/ircd/m_oper.c:1.26 Fri Jan 6 03:22:31 2006
+++ ircu2.10/ircd/m_oper.c Tue Jul 4 12:44:38 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_oper.c,v 1.26 2006/01/06 11:22:31 isomer Exp $
+ * $Id: m_oper.c,v 1.27 2006/07/04 19:44:38 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"
@@ -104,6 +48,11 @@
#include <stdlib.h>
#include <string.h>
+/** Check whether an oper password matches.
+ * @param[in] to_match The configured password field.
+ * @param[in] passwd The user's asserted password.
+ * @return Non-zero on match, zero on mismatch.
+ */
static
int oper_password_match(const char* to_match, const char* passwd)
{
@@ -129,8 +78,17 @@
return 0 == res;
}
-/*
- * m_oper - generic message handler
+/** Handle an OPER message from a local connection.
+ *
+ * \a parv has the following elements:
+ * \li \a parv[1] is the operator identifier string
+ * \li \a parv[2] is the password
+ *
+ * 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_oper(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
@@ -202,8 +160,18 @@
return 0;
}
-/*
- * ms_oper - server message handler
+/** Handle an OPER message from a server connection.
+ * Usually, a server will just send a MODE <numnick> +o message
+ * instead.
+ *
+ * \a parv has the following elements:
+ * \li \a parv[1] is the operator identifier string
+ *
+ * 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_oper(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
@@ -221,8 +189,15 @@
return 0;
}
-/*
- * mo_oper - oper message handler
+/** Handle an OPER 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_oper(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
Index: ircu2.10/ircd/m_opmode.c
diff -u ircu2.10/ircd/m_opmode.c:1.18 ircu2.10/ircd/m_opmode.c:1.19
--- ircu2.10/ircd/m_opmode.c:1.18 Tue Sep 13 08:17:46 2005
+++ ircu2.10/ircd/m_opmode.c Tue Jul 4 12:44:38 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_opmode.c,v 1.18 2005/09/13 15:17:46 entrope Exp $
+ * $Id: m_opmode.c,v 1.19 2006/07/04 19:44:38 entrope Exp $
*/
-/*
- * m_functions execute protocol messages on this server:
- *
- * cptr is always NON-NULL, pointing to a *LOCAL* client
- * structure (with an open socket connected!). This
- * identifies the physical socket where the message
- * originated (or which caused the m_function to be
- * executed--some m_functions may call others...).
- *
- * sptr is the source of the message, defined by the
- * prefix part of the message if present. If not
- * or prefix not found, then sptr==cptr.
- *
- * (!IsServer(cptr)) => (cptr == sptr), because
- * prefixes are taken *only* from servers...
- *
- * (IsServer(cptr))
- * (sptr == cptr) => the message didn't
- * have the prefix.
- *
- * (sptr != cptr && IsServer(sptr) means
- * the prefix specified servername. (?)
- *
- * (sptr != cptr && !IsServer(sptr) means
- * that message originated from a remote
- * user (not local).
- *
- * combining
- *
- * (!IsServer(sptr)) means that, sptr can safely
- * taken as defining the target structure of the
- * message in this server.
- *
- * *Always* true (if 'parse' and others are working correct):
- *
- * 1) sptr->from == cptr (note: cptr->from == cptr)
- *
- * 2) MyConnect(sptr) <=> sptr == cptr (e.g. sptr
- * *cannot* be a local connection, unless it's
- * actually cptr!). [MyConnect(x) should probably
- * be defined as (x == x->from) --msa ]
- *
- * parc number of variable parameter strings (if zero,
- * parv is allowed to be NULL)
- *
- * parv a NULL terminated list of parameter pointers,
- *
- * parv[0], sender (prefix string), if not present
- * this points to an empty string.
- * parv[1]...parv[parc-1]
- * pointers to additional parameters
- * parv[parc] == NULL, *always*
- *
- * note: it is guaranteed that parv[0]..parv[parc-1] are all
- * non-NULL pointers.
- */
#include "config.h"
#include "client.h"
@@ -98,8 +42,15 @@
/* #include <assert.h> -- Now using assert in ircd_log.h */
-/*
- * ms_opmode - server message handler
+/** Handle an OPMODE message from a server connection.
+ *
+ * \a parv has the same elements as for ms_mode().
+ *
+ * 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_opmode(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
@@ -133,8 +84,15 @@
return 0;
}
-/*
- * mo_opmode - oper message handler
+/** Handle an OPMODE message from an operator.
+ *
+ * \a parv has the same elements as for m_mode().
+ *
+ * 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_opmode(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