summaryrefslogtreecommitdiff
path: root/src/protocol/ratbox.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocol/ratbox.c')
-rw-r--r--src/protocol/ratbox.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/protocol/ratbox.c b/src/protocol/ratbox.c
index 8059ae1fe..b0887f001 100644
--- a/src/protocol/ratbox.c
+++ b/src/protocol/ratbox.c
@@ -154,9 +154,13 @@ void ratbox_set_umode(User * user, int ac, char **av)
while (*modes) {
- add ? (user->mode |= umodes[(int) *modes]) : (user->mode &=
- ~umodes[(int)
- *modes]);
+ /* This looks better, much better than "add ? (do_add) : (do_remove)".
+ * At least this is readable without paying much attention :) -GD
+ */
+ if (add)
+ user->mode |= umodes[(int) *modes];
+ else
+ user->mode &= ~umodes[(int) *modes];
switch (*modes++) {
case '+':
@@ -997,15 +1001,11 @@ int anope_event_away(char *source, int ac, char **av)
{
User *u = NULL;
- if (ac) {
- return MOD_CONT;
- }
-
if (UseTS6) {
u = find_byuid(source);
}
-
- m_away((UseTS6 ? (u ? u->nick : source) : source), av[0]);
+
+ m_away((UseTS6 ? (u ? u->nick : source) : source), (ac ? av[0] : NULL));
return MOD_CONT;
}