Anope IRC Services  Version 1.8
ms_send.c
Go to the documentation of this file.
1 /* MemoServ core functions
2  *
3  * (C) 2003-2014 Anope Team
4  * Contact us at team@anope.org
5  *
6  * Please read COPYING and README for further details.
7  *
8  * Based on the original code of Epona by Lara.
9  * Based on the original code of Services by Andy Church.
10  *
11  *
12  */
13 /*************************************************************************/
14 
15 #include "module.h"
16 
17 static int do_send(User * u);
18 static void myMemoServHelp(User * u);
19 
26 int AnopeInit(int argc, char **argv)
27 {
28  Command *c;
29 
30  moduleAddAuthor("Anope");
32  (VERSION_STRING);
34  c = createCommand("SEND", do_send, NULL, MEMO_HELP_SEND, -1, -1, -1,
35  -1);
38 
39  return MOD_CONT;
40 }
41 
45 void AnopeFini(void)
46 {
47 
48 }
49 
50 
51 
56 static void myMemoServHelp(User * u)
57 {
58  notice_lang(s_MemoServ, u, MEMO_HELP_CMD_SEND);
59 }
60 
66 static int do_send(User * u)
67 {
68  char *name = strtok(NULL, " ");
69  char *text = strtok(NULL, "");
70  int z = 0;
71  memo_send(u, name, text, z);
72  return MOD_CONT;
73 }
static int do_send(User *u)
Definition: ms_send.c:66
MDE void moduleAddAuthor(const char *author)
Definition: modules.c:1772
E void notice_lang(char *source, User *dest, int message,...)
Definition: send.c:169
MDE void moduleSetType(MODType type)
Definition: modules.c:818
MDE void moduleSetMemoHelp(void(*func)(User *u))
Definition: modules.c:2102
E char * s_MemoServ
Definition: extern.h:286
void AnopeFini(void)
Definition: ms_send.c:45
MDE void moduleAddVersion(const char *version)
Definition: modules.c:1760
Command * c
Definition: ns_recover.c:17
#define MOD_CONT
Definition: modules.h:54
int AnopeInit(int argc, char **argv)
Definition: ms_send.c:26
static void myMemoServHelp(User *u)
Definition: ms_send.c:56
#define MEMOSERV
Definition: modules.h:58
Definition: modules.h:99
MDE Command * createCommand(const char *name, int(*func)(User *u), int(*has_priv)(User *u), int help_all, int help_reg, int help_oper, int help_admin, int help_root)
Definition: modules.c:987
E void memo_send(User *u, char *name, char *text, int z)
Definition: memoserv.c:198
MDE int moduleAddCommand(CommandHash *cmdTable[], Command *c, int pos)
Definition: modules.c:1082
#define MOD_UNIQUE
Definition: module.h:11