summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2010-03-20 04:59:38 +0000
committerAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2010-03-20 04:59:38 +0000
commit51351aac2b7e993de3610c406af1218d32a2811f (patch)
tree452919cf896b89063894d5ff4af7a7e676d54c00 /include
parentba4c7d813808cad3dd79bfb58025b61506482252 (diff)
Added in support for OperServ and MemoServ into SQL
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2822 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'include')
-rw-r--r--include/modules.h74
-rw-r--r--include/services.h10
2 files changed, 80 insertions, 4 deletions
diff --git a/include/modules.h b/include/modules.h
index 4a94cd830..945641511 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -777,6 +777,47 @@ class CoreExport Module
*/
virtual void OnDefconLevel(int level) { }
+ /** Called before an akill is added
+ * @param u The user adding the akill
+ * @param ak The akill
+ * @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to halt the command and not process it
+ */
+ virtual EventReturn OnAddAkill(User *u, Akill *ak) { return EVENT_CONTINUE; }
+
+ /** Called before an akill is deleted
+ * @param u The user removing the akill
+ * @param ak The akill, can be NULL for all akills!
+ */
+ virtual void OnDelAkill(User *u, Akill *ak) { }
+
+ /** Called after an exception has been added
+ * @param u The user who added it
+ * @param ex The exception
+ * @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to halt the command and not process it
+ */
+ virtual EventReturn OnExceptionAdd(User *u, Exception *ex) { return EVENT_CONTINUE; }
+
+ /** Called before an exception is deleted
+ * @param u The user who is deleting it
+ * @param ex The exceotion
+ */
+ virtual void OnExceptionDel(User *u, Exception *ex) { }
+
+ /** Called before a SXLine is added
+ * @param u The user adding the SXLine
+ * @param sx The SXLine
+ * @param Type The type of SXLine this is
+ * @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to halt the command and not process it
+ */
+ virtual EventReturn OnAddSXLine(User *u, SXLine *sx, SXLineType Type) { return EVENT_CONTINUE; }
+
+ /** Called before a SXLine is deleted
+ * @param u The user deleting the SXLine
+ * @param sx The SXLine, can be NULL for all SXLines
+ * @param Type The type of SXLine this is
+ */
+ virtual void OnDelSXLine(User *u, SXLine *sx, SXLineType Type) { }
+
/** Called when a server quits
* @param server The server
*/
@@ -990,6 +1031,34 @@ class CoreExport Module
*/
virtual void OnSetVhost(NickAlias *na) { }
+ /** Called when a memo is sent
+ * @param u The user sending the memo
+ * @param nc The nickcore of who the memo was sent to
+ * @param m The memo
+ */
+ virtual void OnMemoSend(User *u, NickCore *nc, Memo *m) { }
+
+ /** Called when a memo is sent
+ * @param u The user sending the memo
+ * @param ci The channel the memo was sent to
+ * @param m The memo
+ */
+ virtual void OnMemoSend(User *u, ChannelInfo *ci, Memo *m) { }
+
+ /** Called when a memo is deleted
+ * @param nc The nickcore of the memo being deleted
+ * @param mi The memo info
+ * @param number What memo number is being deleted, can be 0 for all memos
+ */
+ virtual void OnMemoDel(NickCore *nc, MemoInfo *mi, int number) { }
+
+ /** Called when a memo is deleted
+ * @param ci The channel of the memo being deleted
+ * @param mi The memo info
+ * @param number What memo number is being deleted, can be 0 for all memos
+ */
+ virtual void OnMemoDel(ChannelInfo *ci, MemoInfo *mi, int number) { }
+
/** Called when a mode is set on a channel
* @param c The channel
* @param Name The mode name
@@ -1081,14 +1150,15 @@ enum Implementation
I_OnHostServHelp, I_OnSetVhost, I_OnDeleteVhost,
/* MemoServ */
- I_OnMemoServHelp,
+ I_OnMemoServHelp, I_OnMemoSend, I_OnMemoDel,
/* Users */
I_OnPreUserConnect, I_OnUserConnect, I_OnUserNickChange, I_OnUserQuit, I_OnUserLogoff, I_OnPreJoinChannel,
I_OnJoinChannel, I_OnPrePartChannel, I_OnPartChannel,
/* OperServ */
- I_OnOperServHelp, I_OnDefconLevel,
+ I_OnOperServHelp, I_OnDefconLevel, I_OnAddAkill, I_OnDelAkill, I_OnExceptionAdd, I_OnExceptionDel,
+ I_OnAddSXLine, I_OnDelSXLine,
/* Database */
I_OnPostLoadDatabases, I_OnSaveDatabase, I_OnLoadDatabase, I_OnBackupDatabase,
diff --git a/include/services.h b/include/services.h
index 10304c757..e924a5238 100644
--- a/include/services.h
+++ b/include/services.h
@@ -362,7 +362,6 @@ struct EList;
typedef struct bandata_ BanData;
typedef struct mailinfo_ MailInfo;
typedef struct akill_ Akill;
-typedef struct sxline_ SXLine;
typedef struct exception_ Exception;
typedef struct session_ Session;
@@ -842,7 +841,14 @@ struct akill_ {
/* Structure for OperServ SGLINE and SZLINE commands */
-struct sxline_ {
+enum SXLineType
+{
+ SX_SGLINE,
+ SX_SQLINE,
+ SX_SZLINE
+};
+
+struct SXLine {
char *mask;
char *by;
char *reason;