diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/inspircd.h | 9 | ||||
-rw-r--r-- | include/modules.h | 12 | ||||
-rw-r--r-- | include/server.h | 13 | ||||
-rw-r--r-- | include/users.h | 4 |
4 files changed, 14 insertions, 24 deletions
diff --git a/include/inspircd.h b/include/inspircd.h index a2815b8a5..d69d1b46b 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -446,15 +446,6 @@ class CoreExport InspIRCd */ bool BindSocket(int sockfd, int port, const char* addr, bool dolisten = true); - /** Gets the GECOS (description) field of the given server. - * If the servername is not that of the local server, the name - * is passed to handling modules which will attempt to determine - * the GECOS that bleongs to the given servername. - * @param servername The servername to find the description of - * @return The description of this server, or of the local server - */ - std::string GetServerDescription(const std::string& servername); - /** Find a user in the nick hash. * If the user cant be found in the nick hash check the uuid hash * @param nick The nickname to find diff --git a/include/modules.h b/include/modules.h index 7ceb9f631..0be1ea294 100644 --- a/include/modules.h +++ b/include/modules.h @@ -253,7 +253,7 @@ enum Implementation I_OnUserConnect, I_OnUserQuit, I_OnUserDisconnect, I_OnUserJoin, I_OnUserPart, I_OnSendSnotice, I_OnUserPreJoin, I_OnUserPreKick, I_OnUserKick, I_OnOper, I_OnInfo, I_OnWhois, I_OnUserPreInvite, I_OnUserInvite, I_OnUserPreMessage, I_OnUserPreNick, - I_OnUserMessage, I_OnMode, I_OnGetServerDescription, I_OnSyncUser, + I_OnUserMessage, I_OnMode, I_OnSyncUser, I_OnSyncChannel, I_OnDecodeMetaData, I_OnAcceptConnection, I_OnUserInit, I_OnChangeHost, I_OnChangeName, I_OnAddLine, I_OnDelLine, I_OnExpireLine, I_OnUserPostNick, I_OnPreMode, I_On005Numeric, I_OnKill, I_OnLoadModule, @@ -611,16 +611,6 @@ class CoreExport Module : public classbase, public usecountbase */ virtual void OnMode(User* user, User* usertarget, Channel* chantarget, const std::vector<std::string>& modes, const std::vector<TranslateType>& translate); - /** Allows modules to alter or create server descriptions - * Whenever a module requires a server description, for example for display in - * WHOIS, this function is called in all modules. You may change or define the - * description given in std::string &description. If you do, this description - * will be shown in the WHOIS fields. - * @param servername The servername being searched for - * @param description Alterable server description for this server - */ - virtual void OnGetServerDescription(const std::string &servername,std::string &description); - /** Allows modules to synchronize data which relates to users during a netburst. * When this function is called, it will be called from the module which implements * the linking protocol. This currently is m_spanningtree.so. diff --git a/include/server.h b/include/server.h index e6e96593d..3d8854734 100644 --- a/include/server.h +++ b/include/server.h @@ -26,6 +26,10 @@ class CoreExport Server : public classbase */ const std::string name; + /** The description of this server + */ + const std::string description; + /** True if this server is ulined */ bool uline; @@ -35,8 +39,8 @@ class CoreExport Server : public classbase bool silentuline; public: - Server(const std::string& srvname) - : name(srvname), uline(false), silentuline(false) { } + Server(const std::string& srvname, const std::string& srvdesc) + : name(srvname), description(srvdesc), uline(false), silentuline(false) { } /** * Returns the name of this server @@ -44,6 +48,11 @@ class CoreExport Server : public classbase */ const std::string& GetName() const { return name; } + /** Returns the description (GECOS) of this server + * @return The description of this server + */ + const std::string& GetDesc() const { return description; } + /** * Checks whether this server is ulined * @return True if this server is ulined, false otherwise. diff --git a/include/users.h b/include/users.h index bf4ba4de2..f8bfb5a6e 100644 --- a/include/users.h +++ b/include/users.h @@ -832,8 +832,8 @@ class CoreExport FakeUser : public User nick = srv->GetName(); } - FakeUser(const std::string& uid, const std::string& sname) - : User(uid, new Server(sname), USERTYPE_SERVER) + FakeUser(const std::string& uid, const std::string& sname, const std::string& sdesc) + : User(uid, new Server(sname, sdesc), USERTYPE_SERVER) { nick = sname; } |