summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-04 13:41:17 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-04 13:41:17 +0000
commitdea017b159f24701cf5e4b402b1e50bd63862352 (patch)
treeae4371fbc70ec133abced802f17057d15b4a6b7e /src
parente9a6ab44bf17e5fe61d76964b9cb09d42f0d627c (diff)
Added support for module-based chanmodes with parameters and the ability to query the mode states.
Created test case in m_testcommand module where a mode with one parameter can be set/removed on channels git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@375 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_testcommand.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/modules/m_testcommand.cpp b/src/modules/m_testcommand.cpp
index 3b6b646a9..b65430c5a 100644
--- a/src/modules/m_testcommand.cpp
+++ b/src/modules/m_testcommand.cpp
@@ -55,7 +55,7 @@ class ModuleTestCommand : public Module
Srv->AddCommand("WOOT",handle_woot,0,1);
// Add a mode +Z for channels with no parameters
- Srv->AddExtendedMode('Z',MT_CHANNEL,false,0,0);
+ Srv->AddExtendedMode('Z',MT_CHANNEL,false,1,0);
}
virtual bool OnExtendedMode(userrec* user, chanrec* chan, char modechar, int type, bool mode_on, string_list &params)
@@ -80,6 +80,16 @@ class ModuleTestCommand : public Module
return 1;
}
+ virtual void OnUserJoin(userrec* user, chanrec* channel)
+ {
+ Srv->Log(DEBUG,"OnUserJoin triggered");
+ if (channel->IsCustomModeSet('Z'))
+ {
+ std::string param = channel->GetModeParameter('Z');
+ Srv->Log(DEBUG,"Custom mode is set on this channel! Parameter="+param);
+ }
+ }
+
virtual ~ModuleTestCommand()
{
delete Srv;