diff options
author | special <special@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-01-09 13:43:12 +0000 |
---|---|---|
committer | special <special@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-01-09 13:43:12 +0000 |
commit | c2c963813bc5bb66be4ecff0522d80fa94474fd0 (patch) | |
tree | 86c599017dfea99685a5a7e2c9298f2b1fb87a24 | |
parent | 59bff82d237cc6f5010114019d5808a5c5dd0235 (diff) |
Made the real name value for /admin optional (line isn't displayed if not specified)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6281 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | docs/inspircd.conf.example | 4 | ||||
-rw-r--r-- | src/cmd_admin.cpp | 3 | ||||
-rw-r--r-- | src/configreader.cpp | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/docs/inspircd.conf.example b/docs/inspircd.conf.example index 25cd59a01..cef1c6080 100644 --- a/docs/inspircd.conf.example +++ b/docs/inspircd.conf.example @@ -61,8 +61,8 @@ #-#-#-#-#-#-#-#-#-#-#-#- ADMIN INFORMATION -#-#-#-#-#-#-#-#-#-#-#-# # # -# Describes the Server Administrator's real name, nick # -# and email address. # +# Describes the Server Administrator's real name (optionally), # +# nick, and email address. # # # # Syntax is as follows: # # <admin name="real name" # diff --git a/src/cmd_admin.cpp b/src/cmd_admin.cpp index 8c149eb3d..959cb8789 100644 --- a/src/cmd_admin.cpp +++ b/src/cmd_admin.cpp @@ -27,7 +27,8 @@ CmdResult cmd_admin::Handle (const char** parameters, int pcnt, userrec *user) if (!pcnt) { user->WriteServ("256 %s :Administrative info for %s",user->nick,ServerInstance->Config->ServerName); - user->WriteServ("257 %s :Name - %s",user->nick,ServerInstance->Config->AdminName); + if (*ServerInstance->Config->AdminName) + user->WriteServ("257 %s :Name - %s",user->nick,ServerInstance->Config->AdminName); user->WriteServ("258 %s :Nickname - %s",user->nick,ServerInstance->Config->AdminNick); user->WriteServ("258 %s :E-Mail - %s",user->nick,ServerInstance->Config->AdminEmail); } diff --git a/src/configreader.cpp b/src/configreader.cpp index 68904318f..d85bf3d8c 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -594,7 +594,7 @@ void ServerConfig::Read(bool bail, userrec* user) {"server", "name", "", new ValueContainerChar (this->ServerName), DT_CHARPTR, ValidateServerName}, {"server", "description", "Configure Me", new ValueContainerChar (this->ServerDesc), DT_CHARPTR, NoValidation}, {"server", "network", "Network", new ValueContainerChar (this->Network), DT_CHARPTR, NoValidation}, - {"admin", "name", "Miss Configured", new ValueContainerChar (this->AdminName), DT_CHARPTR, NoValidation}, + {"admin", "name", "", new ValueContainerChar (this->AdminName), DT_CHARPTR, NoValidation}, {"admin", "email", "Mis@configu.red", new ValueContainerChar (this->AdminEmail), DT_CHARPTR, NoValidation}, {"admin", "nick", "Misconfigured", new ValueContainerChar (this->AdminNick), DT_CHARPTR, NoValidation}, {"files", "motd", "", new ValueContainerChar (this->motd), DT_CHARPTR, ValidateMotd}, |