X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcommands%2Fcmd_server.cpp;h=811d59057507162559e76b6c449c5b83cc576f91;hb=2d4a319d961e3f9e6aa9f7926f9ed320d72de8da;hp=c7b413406513561fed331baba3cc2a023d1aef21;hpb=4b856bda135a08e800b96c970a10b0b6a34d433a;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/commands/cmd_server.cpp b/src/commands/cmd_server.cpp index c7b413406..811d59057 100644 --- a/src/commands/cmd_server.cpp +++ b/src/commands/cmd_server.cpp @@ -23,7 +23,13 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) CmdResult CommandServer::Handle (const std::vector&, User *user) { - user->WriteNumeric(666, "%s :You cannot identify as a server, you are a USER. IRC Operators informed.",user->nick.c_str()); - ServerInstance->SNO->WriteToSnoMask('A', "WARNING: %s attempted to issue a SERVER command and is registered as a user!", 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; }