diff options
| author | 2010-02-09 14:03:36 -0600 | |
|---|---|---|
| committer | 2010-08-03 17:32:35 -0400 | |
| commit | 66ce827f4044ee1bea08ed33bdedf15a3632a71d (patch) | |
| tree | 537877d6163883159718ed9e7661d62971e8fcd0 /src/channels.cpp | |
| parent | Actually sending mode changes to local users is helpful (diff) | |
Add support for parsing named mode changes from +Z to core
Diffstat (limited to 'src/channels.cpp')
| -rw-r--r-- | src/channels.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/channels.cpp b/src/channels.cpp index 3048164cb..eee55ef7d 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -736,10 +736,10 @@ char* Channel::ChanModes(bool showkey) if (!mh) continue; char mc = mh->GetModeChar(); - if (IsModeSet(id) && mc) + if (IsModeSet(id)) { - *offset++ = mc; extparam.clear(); + *offset++ = mc ? mc : 'Z'; if (mc == 'k' && !showkey) { extparam = "<key>"; @@ -748,6 +748,13 @@ char* Channel::ChanModes(bool showkey) { extparam = this->GetModeParameter(mh); } + if (!mc) + { + if (extparam.empty()) + extparam = mh->name; + else + extparam = mh->name + "=" + extparam; + } if (!extparam.empty()) { charlcat(sparam,' ',MAXBUF); |
