Committer : entrope
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Commit time: 2006-07-14 22:48:02 UTC
Modified files:
ChangeLog ircd/m_time.c ircd/m_tmpl.c ircd/m_uping.c
ircd/m_user.c ircd/m_userhost.c ircd/m_userip.c ircd/m_version.c
Log message:
Doxygenate m_[tuv]*.c
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.795 ircu2.10/ChangeLog:1.796
--- ircu2.10/ChangeLog:1.795 Wed Jul 12 19:50:57 2006
+++ ircu2.10/ChangeLog Fri Jul 14 15:47:52 2006
@@ -1,3 +1,35 @@
+2006-07-14 Michael Poole <[EMAIL PROTECTED]>
+
+ * ircd/m_time.c (m_functions): Delete duplicative comment.
+ (m_time): Write doxygen comment.
+
+ * ircd/m_tmpl.c (m_functions): Delete duplicative comment.
+ (m_tmpl): Write doxygen comment.
+ (ms_tmpl): Write doxygen comment.
+ (mo_tmpl): Write doxygen comment.
+ (mv_tmpl): Write doxygen comment.
+ (mr_tmpl): New function.
+
+ * ircd/m_uping.c (m_functions): Delete duplicative comment.
+ (ms_uping): Write doxygen comment.
+ (mo_uping): Write doxygen comment.
+
+ * ircd/m_user.c (m_functions): Delete duplicative comment.
+ (m_user): Write doxygen comment. Change parv[4] to parv[argc-1].
+
+ * ircd/m_userhost.c (m_functions): Delete duplicative comment.
+ (userhost_formatter): Write doxygen comment.
+ (m_userhost): Write doxygen comment.
+
+ * ircd/m_userip.c (m_functions): Delete duplicative comment.
+ (userip_formatter): Write doxygen comment.
+ (m_userip): Write doxygen comment.
+
+ * ircd/m_version.c (m_functions): Delete duplicative comment.
+ (m_version): Write doxygen comment.
+ (mo_version): Write doxygen comment.
+ (ms_version): Write doxygen comment.
+
2006-07-12 Michael Poole <[EMAIL PROTECTED]>
* ircd/m_set.c (m_functions): Delete duplicative comment.
Index: ircu2.10/ircd/m_time.c
diff -u ircu2.10/ircd/m_time.c:1.8 ircu2.10/ircd/m_time.c:1.9
--- ircu2.10/ircd/m_time.c:1.8 Fri Dec 10 21:14:03 2004
+++ ircu2.10/ircd/m_time.c Fri Jul 14 15:47:52 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_time.c,v 1.8 2004/12/11 05:14:03 klmitch Exp $
+ * $Id: m_time.c,v 1.9 2006/07/14 22:47:52 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"
@@ -96,11 +40,16 @@
/* #include <assert.h> -- Now using assert in ircd_log.h */
-/*
- * m_time - generic message handler
+/** Handle a TIME message from some connection.
+ *
+ * \a parv has the following elements:
+ * \li \a parv[1] (optional) is the server to query
*
- * parv[0] = sender prefix
- * parv[1] = servername
+ * See @ref m_functions for discussion of the arguments.
+ * @param[in] cptr Client that sent us the message.
+ * @param[in] sptr Original source of message.
+ * @param[in] parc Number of arguments.
+ * @param[in] parv Argument vector.
*/
int m_time(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
Index: ircu2.10/ircd/m_tmpl.c
diff -u ircu2.10/ircd/m_tmpl.c:1.4 ircu2.10/ircd/m_tmpl.c:1.5
--- ircu2.10/ircd/m_tmpl.c:1.4 Fri Dec 10 21:14:03 2004
+++ ircu2.10/ircd/m_tmpl.c Fri Jul 14 15:47:52 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_tmpl.c,v 1.4 2004/12/11 05:14:03 klmitch Exp $
+ * $Id: m_tmpl.c,v 1.5 2006/07/14 22:47:52 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"
@@ -93,36 +37,92 @@
/* #include <assert.h> -- Now using assert in ircd_log.h */
-/*
- * m_tmpl - generic message handler
+/** Handle a message from a normal client.
+ *
+ * \a parv has the following elements:
+ * \li \a parv[1] ...
+ * \li \a parv[2] et cetera
+ * \li \a parv[\a parc - 1] and so forth
+ *
+ * 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_tmpl(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
return 0;
}
-/*
- * ms_tmpl - server message handler
+/** Handle a message from a server
+ *
+ * \a parv has the following elements:
+ * \li \a parv[1] ...
+ * \li \a parv[2] et cetera
+ * \li \a parv[\a parc - 1] and so forth
+ *
+ * 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_tmpl(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
return 0;
}
-/*
- * mo_tmpl - oper message handler
+/** Handle a message from an operator
+ *
+ * \a parv has the following elements:
+ * \li \a parv[1] ...
+ * \li \a parv[2] et cetera
+ * \li \a parv[\a parc - 1] and so forth
+ *
+ * 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_tmpl(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
return 0;
}
-
-/*
- * mv_tmpl - service message handler
+/** Handle a message from a service
+ *
+ * \a parv has the following elements:
+ * \li \a parv[1] ...
+ * \li \a parv[2] et cetera
+ * \li \a parv[\a parc - 1] and so forth
+ *
+ * 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 mv_tmpl(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
return 0;
}
+/** Handle a message from an unregistered client
+ *
+ * \a parv has the following elements:
+ * \li \a parv[1] ...
+ * \li \a parv[2] et cetera
+ * \li \a parv[\a parc - 1] and so forth
+ *
+ * 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_tmpl(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
+{
+ return 0;
+}
Index: ircu2.10/ircd/m_uping.c
diff -u ircu2.10/ircd/m_uping.c:1.8 ircu2.10/ircd/m_uping.c:1.9
--- ircu2.10/ircd/m_uping.c:1.8 Fri Dec 10 21:14:03 2004
+++ ircu2.10/ircd/m_uping.c Fri Jul 14 15:47:52 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_uping.c,v 1.8 2004/12/11 05:14:03 klmitch Exp $
+ * $Id: m_uping.c,v 1.9 2006/07/14 22:47:52 entrope Exp $
*/
-/*
- * m_functions execute protocol messages on this server:
- *
- * cptr is always NON-NULL, pointing to a *LOCAL* client
- * structure (with an open socket connected!). This
- * identifies the physical socket where the message
- * originated (or which caused the m_function to be
- * executed--some m_functions may call others...).
- *
- * sptr is the source of the message, defined by the
- * prefix part of the message if present. If not
- * or prefix not found, then sptr==cptr.
- *
- * (!IsServer(cptr)) => (cptr == sptr), because
- * prefixes are taken *only* from servers...
- *
- * (IsServer(cptr))
- * (sptr == cptr) => the message didn't
- * have the prefix.
- *
- * (sptr != cptr && IsServer(sptr) means
- * the prefix specified servername. (?)
- *
- * (sptr != cptr && !IsServer(sptr) means
- * that message originated from a remote
- * user (not local).
- *
- * combining
- *
- * (!IsServer(sptr)) means that, sptr can safely
- * taken as defining the target structure of the
- * message in this server.
- *
- * *Always* true (if 'parse' and others are working correct):
- *
- * 1) sptr->from == cptr (note: cptr->from == cptr)
- *
- * 2) MyConnect(sptr) <=> sptr == cptr (e.g. sptr
- * *cannot* be a local connection, unless it's
- * actually cptr!). [MyConnect(x) should probably
- * be defined as (x == x->from) --msa ]
- *
- * parc number of variable parameter strings (if zero,
- * parv is allowed to be NULL)
- *
- * parv a NULL terminated list of parameter pointers,
- *
- * parv[0], sender (prefix string), if not present
- * this points to an empty string.
- * parv[1]...parv[parc-1]
- * pointers to additional parameters
- * parv[parc] == NULL, *always*
- *
- * note: it is guaranteed that parv[0]..parv[parc-1] are all
- * non-NULL pointers.
- */
#include "config.h"
#include "client.h"
@@ -101,16 +45,20 @@
#include <stdlib.h>
#include <string.h>
-/*
- * ms_uping - server message handler
- *
+/** Handle a UPING message from a server.
* m_uping -- by Run
*
- * parv[0] = sender prefix
- * parv[1] = pinged server
- * parv[2] = port
- * parv[3] = hunted server
- * parv[4] = number of requested pings
+ * \a parv has the following elements:
+ * \li \a parv[1] is the target server to uping
+ * \li \a parv[2] is the port number to uping
+ * \li \a parv[3] is the server that should send the upings
+ * \li \a parv[4] is the number of upings 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_uping(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
@@ -158,16 +106,22 @@
return 0;
}
-/*
- * mo_uping - oper message handler
+/** Handle a UPING message from an operator.
*
* m_uping -- by Run
*
- * parv[0] = sender prefix
- * parv[1] = pinged server
- * parv[2] = port
- * parv[3] = hunted server
- * parv[4] = number of requested pings
+ *
+ * \a parv has the following elements:
+ * \li \a parv[1] is the target server to uping
+ * \li \a parv[2] (optional) is the port number to uping
+ * \li \a parv[3] (optional) is the server that should send the upings
+ * \li \a parv[4] (optional) is the number of upings 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_uping(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
Index: ircu2.10/ircd/m_user.c
diff -u ircu2.10/ircd/m_user.c:1.10 ircu2.10/ircd/m_user.c:1.11
--- ircu2.10/ircd/m_user.c:1.10 Thu Apr 6 20:27:50 2006
+++ ircu2.10/ircd/m_user.c Fri Jul 14 15:47:52 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_user.c,v 1.10 2006/04/07 03:27:50 entrope Exp $
+ * $Id: m_user.c,v 1.11 2006/07/14 22:47:52 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"
@@ -101,14 +45,19 @@
#include <stdlib.h>
#include <string.h>
-/*
- * m_user
+/** Handle a USER message from an unregistered connection
*
- * parv[0] = sender prefix
- * parv[1] = username (login name, account)
- * parv[2] = host name (ignored)
- * parv[3] = server name (ignored)
- * parv[4] = users real name info
+ * \a parv has the following elements:
+ * \li \a parv[1] is the username (sometimes called ident, login or account)
+ * \li \a parv[2] is ignored (used to be the client's hostname)
+ * \li \a parv[3] is ignored (used to be the server's name)
+ * \li \a parv[\a parc - 1] is the realname information
+ *
+ * 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_user(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
{
@@ -137,7 +86,7 @@
else
username = "NoUser";
- info = (EmptyString(parv[4])) ? "No Info" : parv[4];
+ info = (EmptyString(parv[parc - 1])) ? "No Info" : parv[parc - 1];
return auth_set_user(cli_auth(cptr), username, info);
}
Index: ircu2.10/ircd/m_userhost.c
diff -u ircu2.10/ircd/m_userhost.c:1.15 ircu2.10/ircd/m_userhost.c:1.16
--- ircu2.10/ircd/m_userhost.c:1.15 Thu Apr 21 18:39:07 2005
+++ ircu2.10/ircd/m_userhost.c Fri Jul 14 15:47:52 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_userhost.c,v 1.15 2005/04/22 01:39:07 klmitch Exp $
+ * $Id: m_userhost.c,v 1.16 2006/07/14 22:47:52 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"
@@ -92,6 +36,11 @@
/* #include <assert.h> -- Now using assert in ircd_log.h */
+/** Prepare one client's hostname information for another client.
+ * @param[in] cptr Client whose information should be displayed
+ * @param[in] sptr Client who should get the information
+ * @param[in,out] mb Message buffer to append display to.
+ */
static void userhost_formatter(struct Client* cptr, struct Client *sptr,
struct MsgBuf* mb)
{
assert(IsUser(cptr));
@@ -108,8 +57,16 @@
cli_user(cptr)->host : cli_user(cptr)->realhost);
}
-/*
- * m_userhost - generic message handler
+/** Handle a USERHOST message from a local client.
+ *
+ * \a parv has the following elements:
+ * \li \a parv[1] is a comma-separated list of nicknames to search for
+ *
+ * See @ref m_functions for discussion of the arguments.
+ * @param[in] cptr Client that sent us the message.
+ * @param[in] sptr Original source of message.
+ * @param[in] parc Number of arguments.
+ * @param[in] parv Argument vector.
*/
int m_userhost(struct Client* cptr, struct Client* sptr, int parc, char*
parv[])
{
Index: ircu2.10/ircd/m_userip.c
diff -u ircu2.10/ircd/m_userip.c:1.15 ircu2.10/ircd/m_userip.c:1.16
--- ircu2.10/ircd/m_userip.c:1.15 Thu Apr 21 18:39:08 2005
+++ ircu2.10/ircd/m_userip.c Fri Jul 14 15:47:52 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_userip.c,v 1.15 2005/04/22 01:39:08 klmitch Exp $
+ * $Id: m_userip.c,v 1.16 2006/07/14 22:47:52 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"
@@ -93,6 +37,11 @@
/* #include <assert.h> -- Now using assert in ircd_log.h */
+/** Prepare one client's IP information for another client.
+ * @param[in] cptr Client whose information should be displayed
+ * @param[in] sptr Client who should get the information
+ * @param[in,out] mb Message buffer to append display to.
+ */
static void userip_formatter(struct Client* cptr, struct Client *sptr, struct
MsgBuf* mb)
{
assert(IsUser(cptr));
@@ -110,8 +59,16 @@
ircd_ntoa(&cli_ip(cptr)));
}
-/*
- * m_userip - generic message handler
+/** Handle a USERIP message from a local client.
+ *
+ * \a parv has the following elements:
+ * \li \a parv[1] is a comma-separated list of nicknames to search for
+ *
+ * See @ref m_functions for discussion of the arguments.
+ * @param[in] cptr Client that sent us the message.
+ * @param[in] sptr Original source of message.
+ * @param[in] parc Number of arguments.
+ * @param[in] parv Argument vector.
*/
int m_userip(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
Index: ircu2.10/ircd/m_version.c
diff -u ircu2.10/ircd/m_version.c:1.17 ircu2.10/ircd/m_version.c:1.18
--- ircu2.10/ircd/m_version.c:1.17 Mon Oct 17 20:20:53 2005
+++ ircu2.10/ircd/m_version.c Fri Jul 14 15:47:52 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_version.c,v 1.17 2005/10/18 03:20:53 entrope Exp $
+ * $Id: m_version.c,v 1.18 2006/07/14 22:47:52 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,11 +43,16 @@
/* #include <assert.h> -- Now using assert in ircd_log.h */
-/*
- * m_version - generic message handler
+/** Handle a VERSION message from a normal client.
+ *
+ * \a parv has the following elements:
+ * \li \a parc[1] is the server to query (must be me)
*
- * parv[0] = sender prefix
- * parv[1] = servername
+ * See @ref m_functions for discussion of the arguments.
+ * @param[in] cptr Client that sent us the message.
+ * @param[in] sptr Original source of message.
+ * @param[in] parc Number of arguments.
+ * @param[in] parv Argument vector.
*/
int m_version(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
@@ -119,11 +68,16 @@
return 0;
}
-/*
- * mo_version - oper message handler
+/** Handle a VERSION message from an operator.
*
- * parv[0] = sender prefix
- * parv[1] = servername
+ * \a parv has the following elements:
+ * \li \a parc[1] 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 mo_version(struct Client* cptr, struct Client* sptr, int parc, char*
parv[])
{
@@ -152,11 +106,16 @@
return 0;
}
-/*
- * ms_version - server message handler
+/** Handle a VERSION message from a server.
+ *
+ * \a parv has the following elements:
+ * \li \a parc[1] is the server to query
*
- * parv[0] = sender prefix
- * parv[1] = servername
+ * See @ref m_functions for discussion of the arguments.
+ * @param[in] cptr Client that sent us the message.
+ * @param[in] sptr Original source of message.
+ * @param[in] parc Number of arguments.
+ * @param[in] parv Argument vector.
*/
int ms_version(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