Anope IRC Services  Version 1.8
Functions
ms_read.c File Reference
#include "module.h"
Include dependency graph for ms_read.c:

Go to the source code of this file.

Functions

static int do_read (User *u)
 
static int read_memo_callback (User *u, int num, va_list args)
 
static int read_memo (User *u, int index, MemoInfo *mi, const char *chan)
 
static void myMemoServHelp (User *u)
 
void rsend_notify (User *u, Memo *m, const char *chan)
 
int AnopeInit (int argc, char **argv)
 
void AnopeFini (void)
 

Function Documentation

void AnopeFini ( void  )

Unload the module

Definition at line 48 of file ms_read.c.

int AnopeInit ( int  argc,
char **  argv 
)

Create the command, and tell anope about it.

Parameters
argcArgument count
argvArgument list
Returns
MOD_CONT to allow the module, MOD_STOP to stop it

Definition at line 30 of file ms_read.c.

References c, CORE, createCommand(), do_read(), MEMOSERV, MOD_CONT, MOD_UNIQUE, moduleAddAuthor(), moduleAddCommand(), moduleAddVersion(), moduleSetMemoHelp(), moduleSetType(), and myMemoServHelp().

static int do_read ( User u)
static

The /ms read command.

Parameters
uThe user who issued the command
MOD_CONTto continue processing other modules, MOD_STOP to stop processing.

Definition at line 69 of file ms_read.c.

References CA_MEMO, check_access(), CI_VERBOTEN, cs_findchan(), memo_::flags, chaninfo_::flags, MemoInfo::memocount, MemoInfo::memos, nickcore_::memos, chaninfo_::memos, MF_UNREAD, MOD_CONT, user_::na, nickalias_::nc, nick_identified(), notice_lang(), process_numlist(), read_memo(), read_memo_callback(), s_MemoServ, s_NickServ, stricmp(), and syntax_error().

Referenced by AnopeInit().

static void myMemoServHelp ( User u)
static

Add the help response to anopes /ms help output.

Parameters
uThe user who is requesting help

Definition at line 59 of file ms_read.c.

References notice_lang(), and s_MemoServ.

Referenced by AnopeInit().

static int read_memo ( User u,
int  index,
MemoInfo mi,
const char *  chan 
)
static

Read a memo

Parameters
uUser Struct
intIndex number
miMemoInfo struct
chanChannel Name
Returns
1 on success, 0 if failed

Definition at line 174 of file ms_read.c.

References memo_::flags, MemoInfo::memocount, MemoInfo::memos, MF_RECEIPT, MF_UNREAD, notice_lang(), memo_::number, rsend_notify(), s_MemoServ, memo_::sender, strftime_lang(), memo_::text, and memo_::time.

Referenced by do_read(), and read_memo_callback().

static int read_memo_callback ( User u,
int  num,
va_list  args 
)
static

Read a memo callback function

Parameters
uUser Struct
intIndex number
va_listvariable arguements
Returns
result of read_memo()

Definition at line 152 of file ms_read.c.

References MemoInfo::memocount, MemoInfo::memos, memo_::number, and read_memo().

Referenced by do_read().

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