Fix error message for /znc addnetwork irc.network.net

This commit is contained in:
Alexey Sokolov
2013-09-07 16:02:50 +04:00
parent 04b2d8fabf
commit a09d644975

View File

@@ -477,6 +477,10 @@ void CClient::UserCommand(CString& sLine) {
PutStatus("Usage: AddNetwork <name>");
return;
}
if (!CIRCNetwork::IsValidNetwork(sNetwork)) {
PutStatus("Network name should be alphanumeric");
return;
}
if (m_pUser->AddNetwork(sNetwork)) {
PutStatus("Network added. Use /znc JumpNetwork " + sNetwork + ", or connect to ZNC with username " + m_pUser->GetUserName() + "/" + sNetwork + " (instead of just " + m_pUser->GetUserName() + ") to connect to it.");