diff options
Diffstat (limited to 'src/protocol/plexus.c')
-rw-r--r-- | src/protocol/plexus.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/protocol/plexus.c b/src/protocol/plexus.c index 2c14a1c34..00be78d3f 100644 --- a/src/protocol/plexus.c +++ b/src/protocol/plexus.c @@ -154,9 +154,13 @@ void plexus_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 '+': @@ -926,15 +930,11 @@ int anope_event_ping(char *source, int ac, char **av) int anope_event_away(char *source, int ac, char **av) { - if (ac) { - return MOD_CONT; - } - if (!source) { return MOD_CONT; } - m_away(source, av[0]); - return MOD_CONT; + m_away(source, (ac ? av[0] : NULL)); + return MOD_CONT; } int anope_event_kill(char *source, int ac, char **av) |