- Q_UNUSED(prefix)
- Q_UNUSED(params)
- emit displayMsg(Message::Error, "", tr("Your desired nickname contains illegal characters!"));
- emit displayMsg(Message::Error, "", tr("Please use /nick <othernick> to continue your IRC-Session!"));
- // FIXME!
-
-// if(params.size() < 2) {
-// // handle unreal-ircd bug, where unreal ircd doesnt supply a TARGET in ERR_ERRONEUSNICKNAME during registration phase:
-// // nick @@@
-// // :irc.scortum.moep.net 432 @@@ :Erroneous Nickname: Illegal characters
-// // correct server reply:
-// // :irc.scortum.moep.net 432 * @@@ :Erroneous Nickname: Illegal characters
-// emit displayMsg(Message::Error, "", tr("There is a nickname in your identity's nicklist which contains illegal characters"));
-// emit displayMsg(Message::Error, "", tr("Due to a bug in Unreal IRCd (and maybe other irc-servers too) we're unable to determine the erroneous nick"));
-// emit displayMsg(Message::Error, "", tr("Please use: /nick <othernick> to continue or clean up your nicklist"));
-// } else {
-// QString errnick = params[0];
-// emit displayMsg(Message::Error, "", tr("Nick %1 contains illegal characters").arg(errnick));
-// // if there is a problem while connecting to the server -> we handle it
-// // TODO rely on another source...
-// if(currentServer.isEmpty()) {
-// QStringList desiredNicks = identity["NickList"].toStringList();
-// int nextNick = desiredNicks.indexOf(errnick) + 1;
-// if (desiredNicks.size() > nextNick) {
-// putCmd("NICK", QStringList(desiredNicks[nextNick]));
-// } else {
-// emit displayMsg(Message::Error, "", tr("No free and valid nicks in nicklist found. use: /nick <othernick> to continue"));
-// }
-// }
-// }
+ Q_UNUSED(prefix);
+
+ if(params.size() < 2) {
+ // handle unreal-ircd bug, where unreal ircd doesnt supply a TARGET in ERR_ERRONEUSNICKNAME during registration phase:
+ // nick @@@
+ // :irc.scortum.moep.net 432 @@@ :Erroneous Nickname: Illegal characters
+ // correct server reply:
+ // :irc.scortum.moep.net 432 * @@@ :Erroneous Nickname: Illegal characters
+ emit displayMsg(Message::Error, "", tr("There is a nickname in your identity's nicklist which contains illegal characters"));
+ emit displayMsg(Message::Error, "", tr("Due to a bug in Unreal IRCd (and maybe other irc-servers too) we're unable to determine the erroneous nick"));
+ emit displayMsg(Message::Error, "", tr("Please use: /nick <othernick> to continue or clean up your nicklist"));
+ } else {
+ QString errnick = params[0];
+ emit displayMsg(Message::Error, "", tr("Nick %1 contains illegal characters").arg(errnick));
+ tryNextNick(errnick);
+ }