summaryrefslogtreecommitdiff
path: root/src/protocol/unreal32.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocol/unreal32.c')
-rw-r--r--src/protocol/unreal32.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/protocol/unreal32.c b/src/protocol/unreal32.c
index 5790cb5f6..77641e094 100644
--- a/src/protocol/unreal32.c
+++ b/src/protocol/unreal32.c
@@ -427,9 +427,13 @@ void unreal_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 '+':
@@ -1173,15 +1177,11 @@ int anope_event_436(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;
}
/*