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

Go to the source code of this file.


static int do_list (User *u)
static int list_memo_callback (User *u, int num, va_list args)
static int list_memo (User *u, int index, MemoInfo *mi, int *sent_header, int new, const char *chan)
static void myMemoServHelp (User *u)
int AnopeInit (int argc, char **argv)
void AnopeFini (void)

Function Documentation

void AnopeFini ( void  )

Unload the module

Definition at line 46 of file ms_list.c.

int AnopeInit ( int  argc,
char **  argv 

Create the command, and tell anope about it.

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

Definition at line 28 of file ms_list.c.

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

static int do_list ( User u)

List the memos (if any) for the source nick or given channel.

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

Definition at line 67 of file ms_list.c.

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

Referenced by AnopeInit().

static int list_memo ( User u,
int  index,
MemoInfo mi,
int *  sent_header,
int  new,
const char *  chan 

Display a single memo entry, possibly printing the header first.

uUser Struct
intMemo index
miMemoInfo Struct
send_headerIf we are to send the headers
newIf we are listing new memos
chanChannel name

Definition at line 165 of file ms_list.c.

References memo_::flags, MemoInfo::memocount, MemoInfo::memos, MF_UNREAD, user_::nick, notice_lang(), memo_::number, s_MemoServ, memo_::sender, strftime_lang(), and memo_::time.

Referenced by do_list(), and list_memo_callback().

static int list_memo_callback ( User u,
int  num,
va_list  args 

list memno callback function

uUser Struct
intMemo number
va_listList of arguements
result form list_memo()

Definition at line 140 of file ms_list.c.

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

Referenced by do_list().

static void myMemoServHelp ( User u)

Add the help response to anopes /ms help output.

uThe user who is requesting help

Definition at line 57 of file ms_list.c.

References notice_lang(), and s_MemoServ.

Referenced by AnopeInit().