From 1ef4a60c466c3be777863af32375f4a0489e6f79 Mon Sep 17 00:00:00 2001 From: "trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b" Date: Mon, 17 Jan 2005 04:31:45 +0000 Subject: BUILD : 1.7.7 (549) BUGS : N/A NOTES : Fixes a segfault with the last commit git-svn-id: svn://svn.anope.org/anope/trunk@549 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@402 5417fbe8-f217-4b02-8779-1006273d7864 --- src/actions.c | 8 ++++++-- src/users.c | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/actions.c b/src/actions.c index 1078ebe3f..9a4a2c23e 100644 --- a/src/actions.c +++ b/src/actions.c @@ -245,8 +245,12 @@ char *common_get_vident(User * u) /* ptlink hack since there is no user mode for vhost, simply compare the host to the vhost struct memember */ - } else if (stricmp(u->vident, u->username)) { - return u->vident; + } else if (u->vident) { + if (stricmp(u->vident, u->username)) { + return u->vident; + } else { + return u->username; + } } else { return u->username; } diff --git a/src/users.c b/src/users.c index ec158bce1..74d78bf58 100644 --- a/src/users.c +++ b/src/users.c @@ -510,6 +510,7 @@ User *do_nick(const char *source, char *nick, char *username, char *host, user->my_signon = time(NULL); user->vhost = vhost ? sstrdup(vhost) : sstrdup(host); user->uid = uid; /* p10 stuff */ + user->vident = sstrdup(username); if (CheckClones) { /* Check to see if it looks like clones. */ -- cgit