Committer : entrope
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Commit time: 2006-07-14 23:31:09 UTC
Modified files:
ChangeLog ircd/m_wallchops.c ircd/m_wallops.c ircd/m_wallusers.c
ircd/m_wallvoices.c ircd/m_whois.c ircd/m_whowas.c
Log message:
Doxygenate m_w*.c
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.796 ircu2.10/ChangeLog:1.797
--- ircu2.10/ChangeLog:1.796 Fri Jul 14 15:47:52 2006
+++ ircu2.10/ChangeLog Fri Jul 14 16:30:59 2006
@@ -1,5 +1,36 @@
2006-07-14 Michael Poole <[EMAIL PROTECTED]>
+ * ircd/m_wallchops.c (m_functions): Delete duplicative comment.
+ (m_wallchops): Write doxygen comment.
+ (ms_wallchops): Write doxygen comment.
+
+ * ircd/m_wallops.c (m_functions): Delete duplicative comment.
+ (ms_wallops): Write doxygen comment. Change parv[1] to
+ parv[parc-1].
+ (mo_wallops): Write doxygen comment. Change parv[1] to
+ parv[parc-1].
+
+ * ircd/m_wallusers.c (m_functions): Delete duplicative comment.
+ (ms_wallusers): Write doxygen comment. Change parv[1] to
+ parv[parc-1].
+ (mo_wallusers): Write doxygen comment. Change parv[1] to
+ parv[parc-1].
+
+ * ircd/m_wallvoices.c (m_functions): Delete duplicative comment.
+ (m_wallvoices): Write doxygen comment.
+ (ms_wallvoices): Write doxygen comment.
+
+ * ircd/m_whois.c (m_functions): Delete duplicative comment.
+ (do_whois): Convert comment to doxygen format and elaborate.
+ (do_wilds): Convert comment to doxygen format and elaborate.
+ (m_whois): Write doxygen comment.
+ (ms_whois): Write doxygen comment.
+
+ * ircd/m_whowas.c (m_functions): Delete duplicative comment.
+ (m_whowas): Convert comment to doxygen format.
+
+2006-07-14 Michael Poole <[EMAIL PROTECTED]>
+
* ircd/m_time.c (m_functions): Delete duplicative comment.
(m_time): Write doxygen comment.
@@ -15,7 +46,7 @@
(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].
+ (m_user): Write doxygen comment. Change parv[4] to parv[parc-1].
* ircd/m_userhost.c (m_functions): Delete duplicative comment.
(userhost_formatter): Write doxygen comment.
Index: ircu2.10/ircd/m_wallchops.c
diff -u ircu2.10/ircd/m_wallchops.c:1.10 ircu2.10/ircd/m_wallchops.c:1.11
--- ircu2.10/ircd/m_wallchops.c:1.10 Mon Jun 26 19:39:59 2006
+++ ircu2.10/ircd/m_wallchops.c Fri Jul 14 16:30:59 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_wallchops.c,v 1.10 2006/06/27 02:39:59 entrope Exp $
+ * $Id: m_wallchops.c,v 1.11 2006/07/14 23:30:59 entrope Exp $
*/
-/*
- * m_functions execute protocol messages on this server:
- *
- * cptr is always NON-NULL, pointing to a *LOCAL* client
- * structure (with an open socket connected!). This
- * identifies the physical socket where the message
- * originated (or which caused the m_function to be
- * executed--some m_functions may call others...).
- *
- * sptr is the source of the message, defined by the
- * prefix part of the message if present. If not
- * or prefix not found, then sptr==cptr.
- *
- * (!IsServer(cptr)) => (cptr == sptr), because
- * prefixes are taken *only* from servers...
- *
- * (IsServer(cptr))
- * (sptr == cptr) => the message didn't
- * have the prefix.
- *
- * (sptr != cptr && IsServer(sptr) means
- * the prefix specified servername. (?)
- *
- * (sptr != cptr && !IsServer(sptr) means
- * that message originated from a remote
- * user (not local).
- *
- * combining
- *
- * (!IsServer(sptr)) means that, sptr can safely
- * taken as defining the target structure of the
- * message in this server.
- *
- * *Always* true (if 'parse' and others are working correct):
- *
- * 1) sptr->from == cptr (note: cptr->from == cptr)
- *
- * 2) MyConnect(sptr) <=> sptr == cptr (e.g. sptr
- * *cannot* be a local connection, unless it's
- * actually cptr!). [MyConnect(x) should probably
- * be defined as (x == x->from) --msa ]
- *
- * parc number of variable parameter strings (if zero,
- * parv is allowed to be NULL)
- *
- * parv a NULL terminated list of parameter pointers,
- *
- * parv[0], sender (prefix string), if not present
- * this points to an empty string.
- * parv[1]...parv[parc-1]
- * pointers to additional parameters
- * parv[parc] == NULL, *always*
- *
- * note: it is guaranteed that parv[0]..parv[parc-1] are all
- * non-NULL pointers.
- */
#include "config.h"
#include "channel.h"
@@ -96,8 +40,17 @@
/* #include <assert.h> -- Now using assert in ircd_log.h */
-/*
- * m_wallchops - local generic message handler
+/** Handle a WALLCHOPS message from a local connection.
+ *
+ * \a parv has the following elements:
+ * \li \a parv[1] is the name of the channel to which to send
+ * \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_wallchops(struct Client* cptr, struct Client* sptr, int parc, char*
parv[])
{
@@ -130,8 +83,17 @@
return 0;
}
-/*
- * ms_wallchops - server message handler
+/** Handle a WALLCHOPS message from a server connection.
+ *
+ * \a parv has the following elements:
+ * \li \a parv[1] is the name of the channel to which to send
+ * \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_wallchops(struct Client* cptr, struct Client* sptr, int parc, char*
parv[])
{
Index: ircu2.10/ircd/m_wallops.c
diff -u ircu2.10/ircd/m_wallops.c:1.9 ircu2.10/ircd/m_wallops.c:1.10
--- ircu2.10/ircd/m_wallops.c:1.9 Fri Dec 10 21:14:03 2004
+++ ircu2.10/ircd/m_wallops.c Fri Jul 14 16:30:59 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_wallops.c,v 1.9 2004/12/11 05:14:03 klmitch Exp $
+ * $Id: m_wallops.c,v 1.10 2006/07/14 23:30:59 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,15 +35,22 @@
/* #include <assert.h> -- Now using assert in ircd_log.h */
-
-/*
- * ms_wallops - server message handler
+/** Handle a WALLOPS message from a server.
+ *
+ * \a parv has the following elements:
+ * \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_wallops(struct Client* cptr, struct Client* sptr, int parc, char*
parv[])
{
char *message;
- message = parc > 1 ? parv[1] : 0;
+ message = parc > 1 ? parv[parc - 1] : 0;
if (EmptyString(message))
return need_more_params(sptr, "WALLOPS");
@@ -108,14 +59,22 @@
return 0;
}
-/*
- * mo_wallops - oper message handler
+/** Handle a WALLOPS message from an operator.
+ *
+ * \a parv has the following elements:
+ * \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_wallops(struct Client* cptr, struct Client* sptr, int parc, char*
parv[])
{
char *message;
- message = parc > 1 ? parv[1] : 0;
+ message = parc > 1 ? parv[parc - 1] : 0;
if (EmptyString(message))
return need_more_params(sptr, "WALLOPS");
Index: ircu2.10/ircd/m_wallusers.c
diff -u ircu2.10/ircd/m_wallusers.c:1.6 ircu2.10/ircd/m_wallusers.c:1.7
--- ircu2.10/ircd/m_wallusers.c:1.6 Fri Dec 10 21:14:03 2004
+++ ircu2.10/ircd/m_wallusers.c Fri Jul 14 16:30:59 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_wallusers.c,v 1.6 2004/12/11 05:14:03 klmitch Exp $
+ * $Id: m_wallusers.c,v 1.7 2006/07/14 23:30:59 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,15 +35,22 @@
/* #include <assert.h> -- Now using assert in ircd_log.h */
-
-/*
- * ms_wallusers - server message handler
+/** Handle a WALLUSERS message from a server.
+ *
+ * \a parv has the following elements:
+ * \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_wallusers(struct Client* cptr, struct Client* sptr, int parc, char*
parv[])
{
char *message;
- message = parc > 1 ? parv[1] : 0;
+ message = parc > 1 ? parv[parc - 1] : 0;
/*
* XXX - PROTOCOL ERROR (shouldn't happen)
@@ -112,14 +63,22 @@
return 0;
}
-/*
- * mo_wallusers - oper message handler
+/** Handle a WALLUSERS message from an operator.
+ *
+ * \a parv has the following elements:
+ * \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_wallusers(struct Client* cptr, struct Client* sptr, int parc, char*
parv[])
{
char *message;
- message = parc > 1 ? parv[1] : 0;
+ message = parc > 1 ? parv[parc - 1] : 0;
if (EmptyString(message))
return need_more_params(sptr, "WALLUSERS");
Index: ircu2.10/ircd/m_wallvoices.c
diff -u ircu2.10/ircd/m_wallvoices.c:1.7 ircu2.10/ircd/m_wallvoices.c:1.8
--- ircu2.10/ircd/m_wallvoices.c:1.7 Mon Jun 26 19:39:59 2006
+++ ircu2.10/ircd/m_wallvoices.c Fri Jul 14 16:30:59 2006
@@ -19,65 +19,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: m_wallvoices.c,v 1.7 2006/06/27 02:39:59 entrope Exp $
+ * $Id: m_wallvoices.c,v 1.8 2006/07/14 23:30:59 entrope Exp $
*/
-/*
- * m_functions execute protocol messages on this server:
- *
- * cptr is always NON-NULL, pointing to a *LOCAL* client
- * structure (with an open socket connected!). This
- * identifies the physical socket where the message
- * originated (or which caused the m_function to be
- * executed--some m_functions may call others...).
- *
- * sptr is the source of the message, defined by the
- * prefix part of the message if present. If not
- * or prefix not found, then sptr==cptr.
- *
- * (!IsServer(cptr)) => (cptr == sptr), because
- * prefixes are taken *only* from servers...
- *
- * (IsServer(cptr))
- * (sptr == cptr) => the message didn't
- * have the prefix.
- *
- * (sptr != cptr && IsServer(sptr) means
- * the prefix specified servername. (?)
- *
- * (sptr != cptr && !IsServer(sptr) means
- * that message originated from a remote
- * user (not local).
- *
- * combining
- *
- * (!IsServer(sptr)) means that, sptr can safely
- * taken as defining the target structure of the
- * message in this server.
- *
- * *Always* true (if 'parse' and others are working correct):
- *
- * 1) sptr->from == cptr (note: cptr->from == cptr)
- *
- * 2) MyConnect(sptr) <=> sptr == cptr (e.g. sptr
- * *cannot* be a local connection, unless it's
- * actually cptr!). [MyConnect(x) should probably
- * be defined as (x == x->from) --msa ]
- *
- * parc number of variable parameter strings (if zero,
- * parv is allowed to be NULL)
- *
- * parv a NULL terminated list of parameter pointers,
- *
- * parv[0], sender (prefix string), if not present
- * this points to an empty string.
- * parv[1]...parv[parc-1]
- * pointers to additional parameters
- * parv[parc] == NULL, *always*
- *
- * note: it is guaranteed that parv[0]..parv[parc-1] are all
- * non-NULL pointers.
- */
#include "config.h"
#include "channel.h"
@@ -95,8 +39,17 @@
/* #include <assert.h> -- Now using assert in ircd_log.h */
-/*
- * m_wallvoices - local generic message handler
+/** Handle a WALLVOICES message from a local client.
+ *
+ * \a parv has the following elements:
+ * \li \a parv[1] is the name of the channel to which to send
+ * \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_wallvoices(struct Client* cptr, struct Client* sptr, int parc, char*
parv[])
{
@@ -129,8 +82,17 @@
return 0;
}
-/*
- * ms_wallvoices - server message handler
+/** Handle a WALLVOICES message from a server.
+ *
+ * \a parv has the following elements:
+ * \li \a parv[1] is the name of the channel to which to send
+ * \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_wallvoices(struct Client* cptr, struct Client* sptr, int parc, char*
parv[])
{
Index: ircu2.10/ircd/m_whois.c
diff -u ircu2.10/ircd/m_whois.c:1.39 ircu2.10/ircd/m_whois.c:1.40
--- ircu2.10/ircd/m_whois.c:1.39 Mon Jun 26 17:11:17 2006
+++ ircu2.10/ircd/m_whois.c Fri Jul 14 16:30:59 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_whois.c,v 1.39 2006/06/27 00:11:17 entrope Exp $
+ * $Id: m_whois.c,v 1.40 2006/07/14 23:30:59 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"
@@ -126,8 +70,10 @@
* up.
*/
-/*
- * Send whois information for acptr to sptr
+/** Send whois information for \a acptr to \a sptr.
+ * @param[in] sptr Client requesting information
+ * @param[in] acptr Client whose information is requested
+ * @param[in] parc 2 for a "normal" whois, >=3 for a remote whois
*/
static void do_whois(struct Client* sptr, struct Client *acptr, int parc)
{
@@ -228,9 +174,12 @@
}
}
-/*
- * Search and return as many people as matched by the wild 'nick'.
- * returns the number of people found (or, obviously, 0, if none where
+/** Search and return as many people as matched by the wild 'nick'.
+ * @param[in] sptr Client searching for other clients
+ * @param[in] nick Nickname mask to search for
+ * @param[in] count Number of clients previously found
+ * @param[in] parc Value passed to do_whois
+ * @return The number of people found (or, obviously, 0, if none were
* found).
*/
static int do_wilds(struct Client* sptr, char *nick, int count, int parc)
@@ -336,16 +285,17 @@
return found;
}
-/*
- * m_whois - generic message handler
- *
- * parv[0] = sender prefix
- * parv[1] = nickname masklist
- *
- * or
+/** Handle a WHOIS message from a local client
*
- * parv[1] = target server, or a nickname representing a server to target.
- * parv[2] = nickname masklist
+ * \a parv has the following elements:
+ * \li \a parv[1] (optional) is the target's nickname if a remote WHOIS is
requested
+ * \li \a parv[N+1] is the target's nickname, or a comma-separated mask 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_whois(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
@@ -434,16 +384,17 @@
return 0;
}
-/*
- * ms_whois - server message handler
- *
- * parv[0] = sender prefix
- * parv[1] = nickname masklist
- *
- * or
+/** Handle a WHOIS message from a server.
*
- * parv[1] = target server, or a nickname representing a server to target.
- * parv[2] = nickname masklist
+ * \a parv has the following elements:
+ * \li \a parv[1] is the numnick of the server to query
+ * \li \a parv[N+1] is the target's nickname, or a comma-separated mask 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_whois(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
Index: ircu2.10/ircd/m_whowas.c
diff -u ircu2.10/ircd/m_whowas.c:1.13 ircu2.10/ircd/m_whowas.c:1.14
--- ircu2.10/ircd/m_whowas.c:1.13 Thu Apr 6 20:27:50 2006
+++ ircu2.10/ircd/m_whowas.c Fri Jul 14 16:30:59 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_whowas.c,v 1.13 2006/04/07 03:27:50 entrope Exp $
+ * $Id: m_whowas.c,v 1.14 2006/07/14 23:30:59 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,13 +43,22 @@
/* #include <assert.h> -- Now using assert in ircd_log.h */
#include <stdlib.h>
-/*
- * m_whowas - generic message handler
+/** Handle a WHOWAS message from some connection.
*
- * parv[0] = sender prefix
- * parv[1] = nickname queried
- * parv[2] = maximum returned items (optional, default is unlimited)
- * parv[3] = remote server target (Opers only, max returned items 20)
+ * \a parv has the following elements:
+ * \li \a parv[1] is the nickname to look for
+ * \li \a parv[2] (optional) is the maximum number of results to show
+ * \li \a parv[3] (optional; opers only) is the name of a server to
+ * ask, or numnick if the message comes from a server
+ *
+ * For local queries, the default result limit is unlimited. For
+ * remote queries, the default result limit is 20.
+ *
+ * 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_whowas(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