diff options
-rw-r--r-- | src/modes/Makefile | 2 | ||||
-rw-r--r-- | src/modes/cmode_s.cpp | 19 |
2 files changed, 20 insertions, 1 deletions
diff --git a/src/modes/Makefile b/src/modes/Makefile index 10afd15d8..35ec4b915 100644 --- a/src/modes/Makefile +++ b/src/modes/Makefile @@ -3,7 +3,7 @@ CC = i am cornholio CXXFLAGS = -I../../include ${FLAGS} all: ../../include/base.h ../../include/modules.h ../../include/inspircd.h ../../include/channels.h ../../include/users.h ../../include/globals.h ../../include/inspircd_config.h ../../include/mode.h $(CPPFILES) - $(CC) -pipe -export-dynamic -c $(CPPFILES) + $(CC) -pipe $(CXXFLAGS) -export-dynamic -c $(CPPFILES) ar r modeclasses.a *.o ranlib modeclasses.a diff --git a/src/modes/cmode_s.cpp b/src/modes/cmode_s.cpp new file mode 100644 index 000000000..16c446eec --- /dev/null +++ b/src/modes/cmode_s.cpp @@ -0,0 +1,19 @@ +#include "inspircd.h" +#include "mode.h" +#include "channels.h" +#include "users.h" + +class ModeChannelSecret : public ModeHandler +{ + public: + ModeChannelSecret() : ModeHandler('s', 0, 0, 0, MODETYPE_CHANNEL, false) + { + } + + ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string ¶meter, bool adding) + { + channel->modes[CM_SECRET] = adding; + return MODEACTION_ALLOW; + } +}; + |