From 66ce827f4044ee1bea08ed33bdedf15a3632a71d Mon Sep 17 00:00:00 2001 From: Daniel De Graaf Date: Tue, 9 Feb 2010 14:03:36 -0600 Subject: Add support for parsing named mode changes from +Z to core --- src/channels.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/channels.cpp') 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 = ""; @@ -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); -- cgit v1.3.1-10-gc9f91