diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2003-04-19 12:41:44 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2003-04-19 12:41:44 +0000 |
commit | e1cc6b33f4e5510f65d8cfeb62b0f31d567e1bbf (patch) | |
tree | 26e091df454f728198dc58b3bd1aef39ff64148f /src/inspircd.cpp | |
parent | 7493cbb6b96253da72eae375acc7b4d0d309122c (diff) |
Added more code for custom channel/user modes via modules
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@175 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r-- | src/inspircd.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 621ca21c5..79e3c8b73 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -1892,6 +1892,37 @@ void process_modes(char **parameters,userrec* user,chanrec *chan,int status, int chan->c_private = mdir; break; + default: + string_list p; + p.clear(); + if (ModeDefined(modelist[ptr],MT_CHANNEL)) + { + if ((ModeDefinedOn(modelist[ptr],MT_CHANNEL)>0) && (mdir)) + { + p.push_back(parameters[param]); + } + if ((ModeDefinedOff(modelist[ptr],MT_CHANNEL)>0) && (!mdir)) + { + p.push_back(parameters[param]); + } + for (int i = 0; i <= MODCOUNT; i++) + { + if (modules[i]->OnExtendedMode(user,chan,modechar,MT_CHANNEL,mdir,p)) + { + strcat(outlist,modelist[ptr]); + chan->SetCustomMode(modelist[ptr],mdir); + // include parameters in output if mode has them + if ((ModeDefinedOn(modelist[ptr],MT_CHANNEL)>0) || + (ModeDefinedOff(modelist[ptr],MT_CHANNEL)>0)) + { + chan->SetCustomModeParam(modelist[ptr],parameters[param],mdir); + strcpy(outpars[pc++],parameters[param++]); + } + } + } + } + break; + } } } |