summaryrefslogtreecommitdiff
path: root/src/botserv.c
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-22 02:31:23 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-22 02:31:23 +0000
commitfb5d7d181578bcba25327dfd4c2d5727fa71ce33 (patch)
treefafebdfc364d887136587397d01d7431afc2a77a /src/botserv.c
parent16e667a2cecf9492954333fc7949b6636072f941 (diff)
Properly initialized new objects when needed so they don't contain garbage data.
Also, converted line endings in os_ignore_db from CR+LF to LF. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1784 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/botserv.c')
-rw-r--r--src/botserv.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/botserv.c b/src/botserv.c
index 371294c8c..404c8cefc 100644
--- a/src/botserv.c
+++ b/src/botserv.c
@@ -620,6 +620,8 @@ static BanData *get_ban_data(Channel * c, User * u)
bd = new BanData;
bd->mask = sstrdup(mask);
bd->last_use = now;
+ for (int x = 0; x < TTB_SIZE; ++x)
+ bd->ttb[x] = 0;
bd->prev = NULL;
bd->next = c->bd;
@@ -662,6 +664,10 @@ static UserData *get_user_data(Channel * c, User * u)
} else {
user->ud = new UserData;
user->ud->last_use = time(NULL);
+ user->ud->lines = 0;
+ user->ud->last_start = 0;
+ user->ud->lastline = NULL;
+ user->ud->times = 0;
return user->ud;
}
}