summaryrefslogtreecommitdiff
path: root/src/botserv.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/botserv.c')
-rw-r--r--src/botserv.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/botserv.c b/src/botserv.c
index 5d4173d20..3f535783a 100644
--- a/src/botserv.c
+++ b/src/botserv.c
@@ -585,17 +585,17 @@ static UserData *get_user_data(Channel *c, User *u)
time_t now = time(NULL);
/* Checks whether data is obsolete */
- if (now - uc->ud->last_use > Config.BSKeepData)
+ if (now - uc->ud.last_use > Config.BSKeepData)
{
- if (uc->ud->lastline)
- delete [] uc->ud->lastline;
+ if (uc->ud.lastline)
+ delete [] uc->ud.lastline;
/* We should not free and realloc, but reset to 0
instead. */
- memset(uc->ud, 0, sizeof(UserData));
- uc->ud->last_use = now;
+ memset(&uc->ud, 0, sizeof(UserData));
+ uc->ud.last_use = now;
}
- return uc->ud;
+ return &uc->ud;
}
}