diff options
author | Adam <Adam@anope.org> | 2013-01-21 18:03:31 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-01-21 18:03:31 -0500 |
commit | 51c049e1a738e9124bab3961f35b830906517421 (patch) | |
tree | 9d9f1b6a62aab954ce26820bfad54e7ff470b803 /src | |
parent | 93472f84bd98def2cd96fb46c4f45607d1366635 (diff) |
Really fix Channel::GetModes
Diffstat (limited to 'src')
-rw-r--r-- | src/channels.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/channels.cpp b/src/channels.cpp index 5b487a347..43c4283c1 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -827,9 +827,11 @@ Anope::string Channel::GetModes(bool complete, bool plus) if (complete && !it->second.empty()) { - ChannelModeParam *cmp = anope_dynamic_static_cast<ChannelModeParam *>(cm); + ChannelModeParam *cmp = NULL; + if (cm->type == MODE_PARAM) + cmp = anope_dynamic_static_cast<ChannelModeParam *>(cm); - if (plus || !cmp->minus_no_arg) + if (plus || !cmp || !cmp->minus_no_arg) params += " " + it->second; } } |