summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortrystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b <trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2005-01-17 04:31:45 +0000
committertrystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b <trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2005-01-17 04:31:45 +0000
commit1ef4a60c466c3be777863af32375f4a0489e6f79 (patch)
treea7f52cc13e75dd256bfc9a8117a86ca5fc9f20c4 /src
parent4797b990aac2d4ec665b5573270e1f571eea2c69 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/actions.c8
-rw-r--r--src/users.c1
2 files changed, 7 insertions, 2 deletions
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. */