X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcorenetwork.cpp;h=ece012ebe27ae55639f76e4b3bc7ae6da3220e1f;hp=a35704414402710cc8798bf3815c66829d53b896;hb=029c6d402af7b00b320dd5ce48f230783a88957a;hpb=7082ea3159aaaea098b34c204d5123a3dca3753a diff --git a/src/core/corenetwork.cpp b/src/core/corenetwork.cpp index a3570441..ece012eb 100644 --- a/src/core/corenetwork.cpp +++ b/src/core/corenetwork.cpp @@ -333,7 +333,14 @@ void CoreNetwork::socketInitialized() { if(!server.password.isEmpty()) { putRawLine(serverEncode(QString("PASS %1").arg(server.password))); } - putRawLine(serverEncode(QString("NICK :%1").arg(identity->nicks()[0]))); + QString nick; + if(identity->nicks().isEmpty()) { + nick = "quassel"; + qWarning() << "CoreNetwork::socketInitialized(): no nicks supplied for identity Id" << identity->id(); + } else { + nick = identity->nicks()[0]; + } + putRawLine(serverEncode(QString("NICK :%1").arg(nick))); putRawLine(serverEncode(QString("USER %1 8 * :%2").arg(identity->ident(), identity->realName()))); }