summaryrefslogtreecommitdiff
path: root/src/modes
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-07 21:53:22 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-07 21:53:22 +0000
commit2bd16cd84fd6d534d837cab955a1e5c6d75edf38 (patch)
treeacf02ff262321e5e6562c0f653cb2df628496f1f /src/modes
parent21480d6f6500637f63ea620eefbab03f69f7cfee (diff)
Tidier than a trinary op
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4153 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modes')
-rw-r--r--src/modes/cmode_b.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/modes/cmode_b.cpp b/src/modes/cmode_b.cpp
index aa57c74d0..0fe26c83c 100644
--- a/src/modes/cmode_b.cpp
+++ b/src/modes/cmode_b.cpp
@@ -29,7 +29,14 @@ ModeAction ModeChannelBan::OnModeChange(userrec* source, userrec* dest, chanrec*
{
int status = cstatus(source, channel);
/* Call the correct method depending on wether we're adding or removing the mode */
- adding ? parameter = this->AddBan(source, parameter, channel, status) : parameter = this->DelBan(source, parameter, channel, status);
+ if (adding)
+ {
+ parameter = this->AddBan(source, parameter, channel, status);
+ }
+ else
+ {
+ parameter = this->DelBan(source, parameter, channel, status);
+ }
/* If the method above 'ate' the parameter by reducing it to an empty string, then
* it won't matter wether we return ALLOW or DENY here, as an empty string overrides
* the return value and is always MODEACTION_DENY if the mode is supposed to have