summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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. */