mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 11:09:04 -04:00
Added cmode_s, skeleton mode handler for channel mode +s.
The naming convention for this dir is as follows: cmode_* -> channel modes umode_* -> user modes. Case sensitive mode letters on the end of the name such as cmode_s etc. Note, this dir can only hold the core RFC modes, so we won't get name collisions e.g. S and s. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4123 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
598aedf098
commit
4cb72aee73
@ -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
|
||||
|
||||
|
19
src/modes/cmode_s.cpp
Normal file
19
src/modes/cmode_s.cpp
Normal file
@ -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;
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user