summaryrefslogtreecommitdiff
path: root/src/protocol/shadowircd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocol/shadowircd.c')
-rw-r--r--src/protocol/shadowircd.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/protocol/shadowircd.c b/src/protocol/shadowircd.c
index 6471e1dbe..f07bcd918 100644
--- a/src/protocol/shadowircd.c
+++ b/src/protocol/shadowircd.c
@@ -157,9 +157,13 @@ void shadowircd_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 '+':
@@ -1007,13 +1011,9 @@ int anope_event_away(char *source, int ac, char **av)
{
User *u = NULL;
- if (ac) {
- return MOD_CONT;
- }
-
u = find_byuid(source);
- m_away(u->nick, av[0]);
+ m_away(u->nick, (ac ? av[0] : NULL));
return MOD_CONT;
}