summaryrefslogtreecommitdiff
path: root/include/servers.h
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-04-07 23:46:44 -0500
committerAdam <Adam@anope.org>2013-04-07 23:46:44 -0500
commitfb7fef7a849342ab8463743497e781c5c3e6ae88 (patch)
tree5d230a68b6eed70c7b4f718410dd62fea779654c /include/servers.h
parent36602224b8b1a11326a224779d16bcb12f0ed532 (diff)
Optimizations of much of the more commonly used code
Diffstat (limited to 'include/servers.h')
-rw-r--r--include/servers.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/servers.h b/include/servers.h
index d8b01626f..bf0acb523 100644
--- a/include/servers.h
+++ b/include/servers.h
@@ -33,6 +33,10 @@ namespace Servers
*/
extern CoreExport Server* GetUplink();
+ /* Server maps by name and id */
+ extern CoreExport Anope::map<Server *> ByName;
+ extern CoreExport Anope::map<Server *> ByID;
+
/* CAPAB/PROTOCTL given by the uplink */
extern CoreExport std::set<Anope::string> Capab;
}
@@ -169,10 +173,10 @@ class CoreExport Server : public Extensible
/** Find a server
* @param name The name or SID/numeric
- * @param s The server list to search for this server on, defaults to our Uplink
+ * @param name_only set to true to only look up by name, not SID
* @return The server
*/
- static Server *Find(const Anope::string &name, Server *s = NULL);
+ static Server *Find(const Anope::string &name, bool name_only = false);
};
#endif // SERVERS_H