From f4d202cdbbcaa9e17c21e3f74d7816f58b2ffc6a Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 26 Jul 2006 21:54:36 +0000 Subject: Add extra method to mode handler, ModeHandler::ModeSet(). Returns a std::pair. if the bool is true, the mode is set, and the second item in the pair is the parameter set on it, if any If the bool is false, the mode is not set, and the parameter given is returned as the second item of the pair To be used in mode bouncing, to build a safe set of bounced modes (dont ask yet) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4549 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/modes/cmode_h.h | 1 + include/modes/cmode_k.h | 1 + include/modes/cmode_l.h | 1 + include/modes/cmode_o.h | 1 + include/modes/cmode_v.h | 1 + 5 files changed, 5 insertions(+) (limited to 'include/modes') diff --git a/include/modes/cmode_h.h b/include/modes/cmode_h.h index 1cec864d1..963052180 100644 --- a/include/modes/cmode_h.h +++ b/include/modes/cmode_h.h @@ -9,5 +9,6 @@ class ModeChannelHalfOp : public ModeHandler ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string ¶meter, bool adding); std::string AddHalfOp(userrec *user,const char *dest,chanrec *chan,int status); std::string DelHalfOp(userrec *user,const char *dest,chanrec *chan,int status); + std::pair ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string ¶meter); }; diff --git a/include/modes/cmode_k.h b/include/modes/cmode_k.h index f855afee9..bcb67b945 100644 --- a/include/modes/cmode_k.h +++ b/include/modes/cmode_k.h @@ -5,4 +5,5 @@ class ModeChannelKey : public ModeHandler public: ModeChannelKey(); ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string ¶meter, bool adding); + std::pair ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string ¶meter); }; diff --git a/include/modes/cmode_l.h b/include/modes/cmode_l.h index d13bd0459..3eb332c7f 100644 --- a/include/modes/cmode_l.h +++ b/include/modes/cmode_l.h @@ -5,4 +5,5 @@ class ModeChannelLimit : public ModeHandler public: ModeChannelLimit(); ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string ¶meter, bool adding); + std::pair ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string ¶meter); }; diff --git a/include/modes/cmode_o.h b/include/modes/cmode_o.h index cf223b97f..ad34f501c 100644 --- a/include/modes/cmode_o.h +++ b/include/modes/cmode_o.h @@ -9,5 +9,6 @@ class ModeChannelOp : public ModeHandler ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string ¶meter, bool adding); std::string AddOp(userrec *user,const char *dest,chanrec *chan,int status); std::string DelOp(userrec *user,const char *dest,chanrec *chan,int status); + std::pair ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string ¶meter); }; diff --git a/include/modes/cmode_v.h b/include/modes/cmode_v.h index 8cf1ad994..f61f183c5 100644 --- a/include/modes/cmode_v.h +++ b/include/modes/cmode_v.h @@ -9,5 +9,6 @@ class ModeChannelVoice : public ModeHandler ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string ¶meter, bool adding); std::string AddVoice(userrec *user,const char *dest,chanrec *chan,int status); std::string DelVoice(userrec *user,const char *dest,chanrec *chan,int status); + std::pair ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string ¶meter); }; -- cgit v1.2.3