1
0
mirror of https://github.com/anope/anope.git synced 2026-07-05 18:43:12 +02:00

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
This commit is contained in:
cyberbotx
2008-11-22 02:31:23 +00:00
parent 16e667a2ce
commit fb5d7d1815
10 changed files with 585 additions and 550 deletions
+6
View File
@@ -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;
}
}