Fix welcome message trigger

This commit is contained in:
Les De Ridder 2017-03-22 17:00:24 +01:00
parent db4300eb76
commit 5c67c483ab
No known key found for this signature in database
GPG Key ID: 5EC132DFA85DB372
1 changed files with 4 additions and 2 deletions

View File

@ -202,7 +202,7 @@ class Connection
//TODO: Check validity etc.
nick = newNick;
if(!wasRegistered)
if(!wasRegistered && registered)
{
sendWelcome();
}
@ -222,13 +222,15 @@ class Connection
return;
}
auto wasRegistered = registered;
//TODO: Maybe do something with the unused parameter?
user = message.parameters[0];
modes = modeMaskToModes(message.parameters[1]);
realname = message.parameters[3];
hostname = getHost();
if(registered)
if(!wasRegistered && registered)
{
sendWelcome();
}