memoserv.c File Reference

#include "services.h"
#include "pseudo.h"

Include dependency graph for memoserv.c:

Go to the source code of this file.

Functions

E void moduleAddMemoServCmds (void)
static void new_memo_mail (NickCore *nc, Memo *m)
E void rsend_notify (User *u, Memo *m, const char *chan)
void ms_init (void)
void memoserv (User *u, char *buf)
void check_memos (User *u)
MemoInfogetmemoinfo (const char *name, int *ischan, int *isforbid)
void memo_send (User *u, char *name, char *text, int z)
int delmemo (MemoInfo *mi, int num)

Variables

NickCorenclists [1024]


Function Documentation

void check_memos ( User u  ) 

check_memos: See if the given user has any unread memos, and send a NOTICE to that user if so (and if the appropriate flag is set).

Parameters:
u User Struct
Returns:
void

Definition at line 88 of file memoserv.c.

References alog(), debug, memo_::flags, nickcore_::flags, MemoInfo::memocount, MemoInfo::memomax, MemoInfo::memos, nickcore_::memos, MF_UNREAD, user_::na, nickalias_::nc, NI_MEMO_SIGNON, nick_recognized(), notice_lang(), memo_::number, and s_MemoServ.

Referenced by do_nick(), do_nickupdate(), and m_away().

int delmemo ( MemoInfo mi,
int  num 
)

Delete a memo by number.

Parameters:
mi Memoinfo struct
num Memo number to delete
Returns:
int 1 if the memo was found, else 0.

Definition at line 343 of file memoserv.c.

References MemoInfo::memocount, MemoInfo::memos, moduleCleanStruct(), memo_::moduleData, memo_::number, and memo_::text.

Referenced by del_memo_callback(), and do_cancel().

MemoInfo* getmemoinfo ( const char *  name,
int *  ischan,
int *  isforbid 
)

Return the MemoInfo corresponding to the given nick or channel name.

Parameters:
name Name to check
ischan - the result its a channel will be stored in here
isforbid - the result if its forbidden will be stored in here
Returns:
`ischan' 1 if the name was a channel name, else 0.

`isforbid' 1 if the name is forbidden, else 0.

Definition at line 146 of file memoserv.c.

References CI_VERBOTEN, cs_findchan(), findnick(), chaninfo_::flags, nickcore_::memos, chaninfo_::memos, nickalias_::nc, NS_VERBOTEN, and nickalias_::status.

Referenced by do_cancel(), and memo_send().

void memo_send ( User u,
char *  name,
char *  text,
int  z 
)

void memoserv ( User u,
char *  buf 
)

memoserv: Main MemoServ routine. Note that the User structure passed to the do_* routines will always be valid (non-NULL) and will always have a valid NickInfo pointer in the `ni' field.

Parameters:
u User Struct
buf Buffer containing the privmsg
Returns:
void

Definition at line 56 of file memoserv.c.

References anope_cmd_ctcp(), MEMOSERV, mod_run_cmd(), user_::na, user_::nick, notice_lang(), s_MemoServ, s_NickServ, skeleton, and stricmp().

Referenced by m_privmsg().

void moduleAddMemoServCmds ( void   ) 

Definition at line 28 of file memoserv.c.

References MemoServCoreModules, MemoServCoreNumber, and modules_core_init().

Referenced by ms_init().

void ms_init ( void   ) 

MemoServ initialization.

Returns:
void

Definition at line 40 of file memoserv.c.

References moduleAddMemoServCmds().

Referenced by init_secondary().

static void new_memo_mail ( NickCore nc,
Memo m 
) [static]

E void rsend_notify ( User u,
Memo m,
const char *  chan 
)


Variable Documentation

NickCore* nclists[1024]

Definition at line 21 of file memoserv.c.


Generated on Sun Oct 5 09:07:06 2008 for Anope by  doxygen 1.5.7.1