summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortrystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b <trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2004-12-05 07:37:15 +0000
committertrystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b <trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2004-12-05 07:37:15 +0000
commit0df82a3dcf7c525dc6a6195e09f2b893802736ce (patch)
tree33e173236c9a9e972afb22150a6af99d4c3d47f0 /src
parenta7a948262a15f7c5788415ee70507ca6054155d2 (diff)
BUILD : 1.7.6 (477) BUGS : N/A NOTES : list.c and mail.c are doxygen ready now
git-svn-id: svn://svn.anope.org/anope/trunk@477 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@331 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r--src/list.c12
-rw-r--r--src/mail.c72
2 files changed, 67 insertions, 17 deletions
diff --git a/src/list.c b/src/list.c
index 4374324c7..80ff0d1cf 100644
--- a/src/list.c
+++ b/src/list.c
@@ -16,6 +16,12 @@
/*************************************************************************/
+/**
+ * List all register nicks
+ * @param ac Number of Arguments
+ * @param av Array if Arguments
+ * @return void
+ */
void do_listnicks(int ac, char **av)
{
int count = 0; /* Count only rather than display? */
@@ -96,6 +102,12 @@ are given, detailed information about those nicks is displayed.\n\
/*************************************************************************/
+/**
+ * List all register channels
+ * @param ac Number of Arguments
+ * @param av Array if Arguments
+ * @return void
+ */
void do_listchans(int ac, char **av)
{
int count = 0; /* Count only rather than display? */
diff --git a/src/mail.c b/src/mail.c
index 2ba0462c8..407896122 100644
--- a/src/mail.c
+++ b/src/mail.c
@@ -15,16 +15,24 @@
#include "services.h"
#include "language.h"
-/* Begins to send a mail. Must be followed by a MailEnd call.
+/*************************************************************************/
+
+/**
+ * Begins to send a mail. Must be followed by a MailEnd call.
* Returns NULL if the call failed. Error messages are
* automatically sent to the user.
+ * @param u the User struct
+ * @param nr NickReqest Struct
+ * @param subject Subject of the email
+ * @param service Service to respond with
+ * @return MailInfo struct
*/
-
MailInfo *MailRegBegin(User * u, NickRequest * nr, char *subject,
char *service)
{
- if (!u || !nr || !subject)
+ if (!u || !nr || !subject || !service) {
return NULL;
+ }
if (!UseMail) {
notice_lang(service, u, MAIL_DISABLED);
@@ -60,15 +68,23 @@ MailInfo *MailRegBegin(User * u, NickRequest * nr, char *subject,
return NULL;
}
-/* Begins to send a mail. Must be followed by a MailEnd call.
+/*************************************************************************/
+
+/**
+ * Begins to send a mail. Must be followed by a MailEnd call.
* Returns NULL if the call failed. Error messages are
* automatically sent to the user.
+ * @param u the User struct
+ * @param nc NickCore Struct
+ * @param subject Subject of the email
+ * @param service Service to respond with
+ * @return MailInfo struct
*/
-
MailInfo *MailBegin(User * u, NickCore * nc, char *subject, char *service)
{
- if (!u || !nc || !subject)
+ if (!u || !nc || !subject || !service) {
return NULL;
+ }
if (!UseMail) {
notice_lang(service, u, MAIL_DISABLED);
@@ -107,8 +123,13 @@ MailInfo *MailBegin(User * u, NickCore * nc, char *subject, char *service)
return NULL;
}
-/* new function to send memo mails */
+/*************************************************************************/
+/**
+ * new function to send memo mails
+ * @param nc NickCore Struct
+ * @return MailInfo struct
+ */
MailInfo *MailMemoBegin(NickCore * nc)
{
@@ -145,19 +166,26 @@ MailInfo *MailMemoBegin(NickCore * nc)
return NULL;
}
-/* Finish to send the mail. Cleanup everything. */
-
-/* - param checking modified because we don't
- have an user sending this mail.
- Certus, 02.04.2004 */
+/*************************************************************************/
+/**
+ * Finish to send the mail. Cleanup everything.
+ * @param mail MailInfo Struct
+ * @return void
+ */
void MailEnd(MailInfo * mail)
{
- if (!mail || !mail->pipe) /* removed sender check */
+ /* - param checking modified because we don't
+ have an user sending this mail.
+ Certus, 02.04.2004 */
+
+ if (!mail || !mail->pipe) { /* removed sender check */
return;
+ }
- if (!mail->recipient && !mail->recip)
+ if (!mail->recipient && !mail->recip) {
return;
+ }
pclose(mail->pipe);
@@ -173,8 +201,14 @@ void MailEnd(MailInfo * mail)
free(mail);
}
-/* Resets the MailDelay protection */
+/*************************************************************************/
+/**
+ * Resets the MailDelay protection.
+ * @param u the User struct
+ * @param nc NickCore Struct
+ * @return void
+ */
void MailReset(User * u, NickCore * nc)
{
if (u)
@@ -183,14 +217,18 @@ void MailReset(User * u, NickCore * nc)
nc->lastmail = 0;
}
-/* Checks whether we have a valid, common e-mail address.
+/*************************************************************************/
+
+/**
+ * Checks whether we have a valid, common e-mail address.
* This is NOT entirely RFC compliant, and won't be so, because I said
* *common* cases. ;) It is very unlikely that e-mail addresses that
* are really being used will fail the check.
*
* FIXME: rewrite this a bit cleaner.
+ * @param email Email to Validate
+ * @return int
*/
-
int MailValidate(const char *email)
{
int i, j, has_period = 0, len;