summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-13 20:31:11 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-13 20:31:11 +0000
commitb4be0c94ab5fb7e5a7a799a195c78de072a5e315 (patch)
tree48dee3440b9bf1227f39ca2539d7fe55ad53df8b /include
parentace3d85982f99ab04318ce705fd29fec5ffd7320 (diff)
Module API changes to use Membership* where sensible
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11699 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r--include/channels.h10
-rw-r--r--include/membership.h1
-rw-r--r--include/modules.h27
3 files changed, 14 insertions, 24 deletions
diff --git a/include/channels.h b/include/channels.h
index ec52661d6..f71ad53a3 100644
--- a/include/channels.h
+++ b/include/channels.h
@@ -81,12 +81,6 @@ enum UserChannelModes {
*/
class CoreExport Channel : public Extensible
{
- private:
-
- /** Pointer to creator object
- */
- InspIRCd* ServerInstance;
-
/** Connect a Channel to a User
*/
static Channel* ForceChan(InspIRCd* Instance, Channel* Ptr, User* user, const std::string &privs, bool bursting, bool created);
@@ -100,6 +94,10 @@ class CoreExport Channel : public Extensible
int maxbans;
public:
+ /** Pointer to creator object
+ */
+ InspIRCd* ServerInstance;
+
/** Creates a channel record and initialises it with default values
* @throw Nothing at present.
*/
diff --git a/include/membership.h b/include/membership.h
index 95267915c..dcaa5e1e1 100644
--- a/include/membership.h
+++ b/include/membership.h
@@ -28,6 +28,7 @@ struct Membership : public Extensible
{
return modes.find(m) != std::string::npos;
}
+ unsigned int getRank();
};
typedef std::map<User*, Membership*> UserMembList;
diff --git a/include/modules.h b/include/modules.h
index 89de183b7..0fdecbe15 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -510,34 +510,27 @@ class CoreExport Module : public Extensible
/** Called when a user joins a channel.
* The details of the joining user are available to you in the parameter User *user,
* and the details of the channel they have joined is available in the variable Channel *channel
- * @param user The user who is joining
- * @param channel The channel being joined
- * @param silent Change this to true if you want to conceal the JOIN command from the other users
- * of the channel (useful for modules such as auditorium)
+ * @param memb The channel membership being created
* @param sync This is set to true if the JOIN is the result of a network sync and the remote user is being introduced
* to a channel due to the network sync.
* @param created This is true if the join created the channel
*/
- virtual void OnUserJoin(User* user, Channel* channel, bool sync, bool &silent, bool created);
+ virtual void OnUserJoin(Membership* memb, bool sync, bool created, CUList& except_list);
/** Called after a user joins a channel
* Identical to OnUserJoin, but called immediately afterwards, when any linking module has
* seen the join.
- * @param user The user who is joining
- * @param channel The channel being joined
+ * @param memb The channel membership created
*/
- virtual void OnPostJoin(User* user, Channel* channel);
+ virtual void OnPostJoin(Membership*);
/** Called when a user parts a channel.
* The details of the leaving user are available to you in the parameter User *user,
* and the details of the channel they have left is available in the variable Channel *channel
- * @param user The user who is parting
- * @param channel The channel being parted
+ * @param memb The channel membership being destroyed
* @param partmessage The part message, or an empty string (may be modified)
- * @param silent Change this to true if you want to conceal the PART command from the other users
- * of the channel (useful for modules such as auditorium)
*/
- virtual void OnUserPart(User* user, Channel* channel, std::string &partmessage, bool &silent);
+ virtual void OnUserPart(Membership* memb, std::string &partmessage, CUList& except_list);
/** Called on rehash.
* This method is called prior to a /REHASH or when a SIGHUP is received from the operating
@@ -610,7 +603,7 @@ class CoreExport Module : public Extensible
* @param reason The kick reason
* @return 1 to prevent the kick, 0 to continue normally, -1 to explicitly allow the kick regardless of normal operation
*/
- virtual ModResult OnUserPreKick(User* source, User* user, Channel* chan, const std::string &reason);
+ virtual ModResult OnUserPreKick(User* source, Membership* memb, const std::string &reason);
/** Called whenever a user is kicked.
* If this method is called, the kick is already underway and cannot be prevented, so
@@ -619,10 +612,8 @@ class CoreExport Module : public Extensible
* @param user The user being kicked
* @param chan The channel the user is being kicked from
* @param reason The kick reason
- * @param silent Change this to true if you want to conceal the PART command from the other users
- * of the channel (useful for modules such as auditorium)
*/
- virtual void OnUserKick(User* source, User* user, Channel* chan, const std::string &reason, bool &silent);
+ virtual void OnUserKick(User* source, Membership* memb, const std::string &reason, CUList& except_list);
/** Called whenever a user opers locally.
* The User will contain the oper mode 'o' as this function is called after any modifications
@@ -1406,7 +1397,7 @@ class CoreExport Module : public Extensible
* For example NAMESX, channel mode +u and +I, and UHNAMES. If the nick is set to an empty string by any
* module, then this will cause the nickname not to be displayed at all.
*/
- virtual void OnNamesListItem(User* issuer, User* user, Channel* channel, std::string &prefixes, std::string &nick);
+ virtual void OnNamesListItem(User* issuer, Membership* item, std::string &prefixes, std::string &nick);
virtual ModResult OnNumeric(User* user, unsigned int numeric, const std::string &text);