summaryrefslogtreecommitdiff
path: root/src/channels.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/channels.cpp')
-rw-r--r--src/channels.cpp26
1 files changed, 11 insertions, 15 deletions
diff --git a/src/channels.cpp b/src/channels.cpp
index 4b1bc5309..21af27177 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -70,22 +70,18 @@ bool chanrec::IsModeSet(char mode)
std::string chanrec::GetModeParameter(char mode)
{
- if (mode == 'k')
+ switch (mode)
{
- return this->key;
- }
- else if (mode == 'l')
- {
- return ConvToStr(this->limit);
- }
- else
- {
- CustomModeList::iterator n = custom_mode_params.find(mode);
- if (n != custom_mode_params.end())
- {
- return n->second;
- }
- return "";
+ case 'k':
+ return this->key;
+ case 'l':
+ return ConvToStr(this->limit);
+ default:
+ CustomModeList::iterator n = custom_mode_params.find(mode);
+ if (n != custom_mode_params.end())
+ return n->second;
+ return "";
+ break;
}
}