Permalink
Browse files

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

  • Loading branch information...
1 parent 04b2d8f commit a09d6449754676552d1049e84e37621a6cebaa3d @DarthGandalf DarthGandalf committed Sep 7, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/ClientCommand.cpp
@@ -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.");

0 comments on commit a09d644

Please sign in to comment.