summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDukePyrolator <DukePyrolator@anope.org>2012-04-08 12:43:34 +0200
committerDukePyrolator <DukePyrolator@anope.org>2012-04-08 12:43:34 +0200
commitdeb5196101bb14d6656fb89b9ec9e5f8b96eb31d (patch)
tree733001e6fc4af6cb2a42915d586e448dde742f77 /include
parent9e1fda2a44dee120e26acc6e51fbe779eea97712 (diff)
Added Chanstats. It uses a new, improved database format and is not compatible with current phpdenora or magirc installations.
Diffstat (limited to 'include')
-rw-r--r--include/account.h4
-rw-r--r--include/channels.h6
-rw-r--r--include/modules.h9
-rw-r--r--include/regchannel.h4
4 files changed, 16 insertions, 7 deletions
diff --git a/include/account.h b/include/account.h
index 5cc8c1459..18bdcc876 100644
--- a/include/account.h
+++ b/include/account.h
@@ -97,6 +97,8 @@ enum NickCoreFlag
/* If set means the nick core does not have their email addrses confirmed.
*/
NI_UNCONFIRMED,
+ /* Chanstats are enabled for this user */
+ NI_STATS,
NI_END
};
@@ -104,7 +106,7 @@ enum NickCoreFlag
const Anope::string NickCoreFlagStrings[] = {
"BEGIN", "KILLPROTECT", "SECURE", "MSG", "MEMO_HARDMAX", "MEMO_SIGNON", "MEMO_RECEIVE",
"PRIVATE", "HIDE_EMAIL", "HIDE_MASK", "HIDE_QUIT", "KILL_QUICK", "KILL_IMMED",
- "MEMO_MAIL", "HIDE_STATUS", "SUSPENDED", "AUTOOP", "FORBIDDEN", "UNCONFIRMED", ""
+ "MEMO_MAIL", "HIDE_STATUS", "SUSPENDED", "AUTOOP", "FORBIDDEN", "UNCONFIRMED", "STATS", ""
};
class CoreExport NickAlias : public Base, public Extensible, public Flags<NickNameFlag, NS_END>, public Serializable
diff --git a/include/channels.h b/include/channels.h
index eadde3df5..43da37f51 100644
--- a/include/channels.h
+++ b/include/channels.h
@@ -135,18 +135,20 @@ class CoreExport Channel : public Base, public Extensible, public Flags<ChannelF
std::pair<ModeList::iterator, ModeList::iterator> GetModeList(ChannelModeName Name);
/** Set a mode internally on a channel, this is not sent out to the IRCd
+ * @param setter The setter
* @param cm The mode
* @param param The param
* @param EnforceMLock true if mlocks should be enforced, false to override mlock
*/
- void SetModeInternal(ChannelMode *cm, const Anope::string &param = "", bool EnforceMLock = true);
+ void SetModeInternal(User *setter, ChannelMode *cm, const Anope::string &param = "", bool EnforceMLock = true);
/** Remove a mode internally on a channel, this is not sent out to the IRCd
+ * @param setter The Setter
* @param cm The mode
* @param param The param
* @param EnforceMLock true if mlocks should be enforced, false to override mlock
*/
- void RemoveModeInternal(ChannelMode *cm, const Anope::string &param = "", bool EnforceMLock = true);
+ void RemoveModeInternal(User *setter, ChannelMode *cm, const Anope::string &param = "", bool EnforceMLock = true);
/** Set a mode on a channel
* @param bi The client setting the modes
diff --git a/include/modules.h b/include/modules.h
index 4869ba3db..78ab24486 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -439,9 +439,10 @@ class CoreExport Module : public Extensible
/** Called when a new topic is set
* @param c The channel
+ * @param setter The user who set the new topic
* @param topic The new topic
*/
- virtual void OnTopicUpdated(Channel *c, const Anope::string &topic) { }
+ virtual void OnTopicUpdated(Channel *c, User *setter, const Anope::string &topic) { }
/** Called before a channel expires
* @param ci The channel
@@ -847,19 +848,21 @@ class CoreExport Module : public Extensible
/** Called when a mode is set on a channel
* @param c The channel
+ * @param setter The user who is setting the mode
* @param Name The mode name
* @param param The mode param, if there is one
* @return EVENT_STOP to make mlock/secureops etc checks not happen
*/
- virtual EventReturn OnChannelModeSet(Channel *c, ChannelModeName Name, const Anope::string &param) { return EVENT_CONTINUE; }
+ virtual EventReturn OnChannelModeSet(Channel *c, User *setter, ChannelModeName Name, const Anope::string &param) { return EVENT_CONTINUE; }
/** Called when a mode is unset on a channel
* @param c The channel
+ * @param setter the user who is unsetting the mode
* @param Name The mode name
* @param param The mode param, if there is one
* @return EVENT_STOP to make mlock/secureops etc checks not happen
*/
- virtual EventReturn OnChannelModeUnset(Channel *c, ChannelModeName Name, const Anope::string &param) { return EVENT_CONTINUE; }
+ virtual EventReturn OnChannelModeUnset(Channel *c, User *setter, ChannelModeName Name, const Anope::string &param) { return EVENT_CONTINUE; }
/** Called when a mode is set on a user
* @param u The user
diff --git a/include/regchannel.h b/include/regchannel.h
index d7c6a8492..cc7246097 100644
--- a/include/regchannel.h
+++ b/include/regchannel.h
@@ -57,6 +57,8 @@ enum ChannelInfoFlag
* is set or not
*/
CI_PERSIST,
+ /* Chanstats are enabled */
+ CI_STATS,
CI_END
};
@@ -64,7 +66,7 @@ enum ChannelInfoFlag
const Anope::string ChannelInfoFlagStrings[] = {
"BEGIN", "KEEPTOPIC", "SECUREOPS", "PRIVATE", "TOPICLOCK", "RESTRICTED",
"PEACE", "SECURE", "NO_EXPIRE", "MEMO_HARDMAX", "SECUREFOUNDER",
- "SIGNKICK", "SIGNKICK_LEVEL", "SUSPENDED", "PERSIST", ""
+ "SIGNKICK", "SIGNKICK_LEVEL", "SUSPENDED", "PERSIST", "STATS", ""
};
/** Flags for badwords