summaryrefslogtreecommitdiff
path: root/src/commands/cmd_server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/cmd_server.cpp')
-rw-r--r--src/commands/cmd_server.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/commands/cmd_server.cpp b/src/commands/cmd_server.cpp
index 81f9e722c..811d59057 100644
--- a/src/commands/cmd_server.cpp
+++ b/src/commands/cmd_server.cpp
@@ -23,6 +23,13 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
CmdResult CommandServer::Handle (const std::vector<std::string>&, User *user)
{
- user->WriteNumeric(ERR_ALREADYREGISTERED, "%s :You are already registered. (Perhaps your IRC client does not have a /SERVER command).",user->nick.c_str());
+ if (user->registered == REG_ALL)
+ {
+ user->WriteNumeric(ERR_ALREADYREGISTERED, "%s :You are already registered. (Perhaps your IRC client does not have a /SERVER command).",user->nick.c_str());
+ }
+ else
+ {
+ user->WriteNumeric(ERR_NOTREGISTERED, "%s :You may not register as a server (servers have seperate ports from clients, change your config)",command.c_str());
+ }
return CMD_FAILURE;
}