* See: http://www.inspircd.org/wiki/index.php/Credits
*
* This program is free but copyrighted software; see
* See: http://www.inspircd.org/wiki/index.php/Credits
*
* This program is free but copyrighted software; see
* '$', and you dont know what $ means, then you can compare it to these three values to determine
* its worth against them. For example if '$' had a value of 15000, you would know it is of higher
* status than voice, but lower status than halfop.
* '$', and you dont know what $ means, then you can compare it to these three values to determine
* its worth against them. For example if '$' had a value of 15000, you would know it is of higher
* status than voice, but lower status than halfop.
* and the rank values OP_VALUE, HALFOP_VALUE and VOICE_VALUE respectively. Any prefixes you define should have unique values proportional
* to these three defaults or proportional to another mode in a module you depend on. See src/cmode_o.cpp as an example.
*/
* and the rank values OP_VALUE, HALFOP_VALUE and VOICE_VALUE respectively. Any prefixes you define should have unique values proportional
* to these three defaults or proportional to another mode in a module you depend on. See src/cmode_o.cpp as an example.
*/
- ModeHandler(InspIRCd* Instance, char modeletter, int parameters_on, int parameters_off, bool listmode, ModeType type, bool operonly, char mprefix = 0);
+ ModeHandler(InspIRCd* Instance, char modeletter, int parameters_on, int parameters_off, bool listmode, ModeType type, bool operonly, char mprefix = 0, char prefixrequired = '%');
* Get the 'value' of this modes prefix.
* determines which to display when there are multiple.
* The mode with the highest value is ranked first. See the
* Get the 'value' of this modes prefix.
* determines which to display when there are multiple.
* The mode with the highest value is ranked first. See the
* @param adding This value is true when the mode is being set, or false when it is being unset.
* @return MODEACTION_ALLOW to allow the mode, or MODEACTION_DENY to prevent the mode, also see the description of 'parameter'.
*/
* @param adding This value is true when the mode is being set, or false when it is being unset.
* @return MODEACTION_ALLOW to allow the mode, or MODEACTION_DENY to prevent the mode, also see the description of 'parameter'.
*/
- virtual ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string ¶meter, bool adding); /* Can change the mode parameter as its a ref */
+ virtual ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool servermode = false); /* Can change the mode parameter as its a ref */
/**
* If your mode is a listmode, then this method will be called for displaying an item list, e.g. on MODE #channel +modechar
* without any parameter or other modes in the command.
* @param user The user issuing the command
* @param channel The channel they're requesting an item list of (e.g. a banlist, or an exception list etc)
*/
/**
* If your mode is a listmode, then this method will be called for displaying an item list, e.g. on MODE #channel +modechar
* without any parameter or other modes in the command.
* @param user The user issuing the command
* @param channel The channel they're requesting an item list of (e.g. a banlist, or an exception list etc)
*/
/**
* If your mode is a listmode, this method will be called to display an empty list (just the end of list numeric)
* @param user The user issuing the command
* @param channel The channel tehy're requesting an item list of (e.g. a banlist, or an exception list etc)
*/
/**
* If your mode is a listmode, this method will be called to display an empty list (just the end of list numeric)
* @param user The user issuing the command
* @param channel The channel tehy're requesting an item list of (e.g. a banlist, or an exception list etc)
*/
* @param channel The channel we are checking against
* @return True if the other side wins the merge, false if we win the merge for this mode.
*/
* @param channel The channel we are checking against
* @return True if the other side wins the merge, false if we win the merge for this mode.
*/
- virtual bool CheckTimeStamp(time_t theirs, time_t ours, const std::string &their_param, const std::string &our_param, chanrec* channel);
+ virtual bool CheckTimeStamp(time_t theirs, time_t ours, const std::string &their_param, const std::string &our_param, Channel* channel);
* the current setting for this mode set locally, when the bool is true, or, the parameter given.
* This allows the local server to enforce our locally set parameters back to a remote server.
*/
* the current setting for this mode set locally, when the bool is true, or, the parameter given.
* This allows the local server to enforce our locally set parameters back to a remote server.
*/
- virtual ModePair ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string ¶meter);
+ virtual ModePair ModeSet(User* source, User* dest, Channel* channel, const std::string ¶meter);
* your mode properly from each user.
* @param user The user which the server wants to remove your mode from
*/
* your mode properly from each user.
* @param user The user which the server wants to remove your mode from
*/
* your mode properly from each channel. Note that in the case of listmodes, you should remove the entire list of items.
* @param channel The channel which the server wants to remove your mode from
*/
* your mode properly from each channel. Note that in the case of listmodes, you should remove the entire list of items.
* @param channel The channel which the server wants to remove your mode from
*/
* @return True to allow the mode change to go ahead, false to abort it. If you abort the
* change, the mode handler (and ModeWatcher::AfterMode()) will never see the mode change.
*/
* @return True to allow the mode change to go ahead, false to abort it. If you abort the
* change, the mode handler (and ModeWatcher::AfterMode()) will never see the mode change.
*/
- virtual bool BeforeMode(userrec* source, userrec* dest, chanrec* channel, std::string ¶meter, bool adding, ModeType type);
+ virtual bool BeforeMode(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, ModeType type, bool servermode = false);
/**
* After the mode character has been processed by the ModeHandler, this method will be called.
* @param source The sender of the mode
/**
* After the mode character has been processed by the ModeHandler, this method will be called.
* @param source The sender of the mode
* @param adding True if the mode is being added and false if it is being removed
* @type The mode type, either MODETYPE_USER or MODETYPE_CHANNEL
*/
* @param adding True if the mode is being added and false if it is being removed
* @type The mode type, either MODETYPE_USER or MODETYPE_CHANNEL
*/
- virtual void AfterMode(userrec* source, userrec* dest, chanrec* channel, const std::string ¶meter, bool adding, ModeType type);
+ virtual void AfterMode(User* source, User* dest, Channel* channel, const std::string ¶meter, bool adding, ModeType type, bool servermode = false);
- void DisplayCurrentModes(userrec *user, userrec* targetuser, chanrec* targetchannel, const char* text);
+ void DisplayCurrentModes(User *user, User* targetuser, Channel* targetchannel, const char* text);
/** The string representing the last set of modes to be parsed.
* Use GetLastParse() to get this value, to be used for display purposes.
/** The string representing the last set of modes to be parsed.
* Use GetLastParse() to get this value, to be used for display purposes.
/** Used to check if user 'd' should be allowed to do operation 'MASK' on channel 'chan'.
* for example, should 'user A' be able to 'op' on 'channel B'.
*/
/** Used to check if user 'd' should be allowed to do operation 'MASK' on channel 'chan'.
* for example, should 'user A' be able to 'op' on 'channel B'.
*/
- userrec* SanityChecks(userrec *user,const char *dest,chanrec *chan,int status);
+ User* SanityChecks(User *user,const char *dest,Channel *chan,int status);
* @return Last parsed string, as seen by users.
*/
const std::string& GetLastParse();
* @return Last parsed string, as seen by users.
*/
const std::string& GetLastParse();
- /** Add a mode to the mode parser. The modeletter parameter
- * is purely to save on doing a lookup in the function, as
- * strictly it could be obtained via ModeHandler::GetModeChar().
+ /** Add a mode to the mode parser.
/** Delete a mode from the mode parser.
* When a mode is deleted, the mode handler will be called
* for every user (if it is a user mode) or for every channel
/** Delete a mode from the mode parser.
* When a mode is deleted, the mode handler will be called
* for every user (if it is a user mode) or for every channel
* they would be from a MODE command.
* @param pcnt The number of items in the parameters array
* @param user The user setting or removing the modes. When the modes are set
* they would be from a MODE command.
* @param pcnt The number of items in the parameters array
* @param user The user setting or removing the modes. When the modes are set
- void Process(const char** parameters, int pcnt, userrec *user, bool servermode);
+ void Process(const char* const* parameters, int pcnt, User *user, bool servermode);
* @param channel The channel name to look up the privilages of the user for
* @return The mode string.
*/
* @param channel The channel name to look up the privilages of the user for
* @return The mode string.
*/