summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-11-01 02:07:35 -0400
committerAdam <Adam@anope.org>2013-11-01 02:07:35 -0400
commitc710625cd3b728acd2788eb319bd23bada798495 (patch)
tree7554545ebe6899bbede33fed3ee4c4d5da3852e9
parentac2f8bf64d9182d0a51cdc362990315ad0a2ba9f (diff)
Use Config::GetClient for looking up services for command{} blocks which lessens the insanity of renaming services
-rw-r--r--data/botserv.example.conf2
-rw-r--r--data/chanserv.example.conf2
-rw-r--r--data/example.conf11
-rw-r--r--data/global.example.conf2
-rw-r--r--data/hostserv.example.conf2
-rw-r--r--data/memoserv.example.conf2
-rw-r--r--data/nickserv.example.conf2
-rw-r--r--data/operserv.example.conf2
-rw-r--r--data/stats.standalone.example.conf11
-rw-r--r--src/config.cpp2
10 files changed, 10 insertions, 28 deletions
diff --git a/data/botserv.example.conf b/data/botserv.example.conf
index 40853e4d7..14839da15 100644
--- a/data/botserv.example.conf
+++ b/data/botserv.example.conf
@@ -4,12 +4,12 @@
/*
* First, create the service.
- * Note that an easy way to rename this service is to define{} the client name to something else.
*/
service
{
/*
* The name of the BotServ client.
+ * If you change this value, you probably want to change the client directive in the configuration for the botserv module too.
*/
nick = "BotServ"
diff --git a/data/chanserv.example.conf b/data/chanserv.example.conf
index 84d3be57b..b95e1951c 100644
--- a/data/chanserv.example.conf
+++ b/data/chanserv.example.conf
@@ -4,12 +4,12 @@
/*
* First, create the service.
- * Note that an easy way to rename this service is to define{} the client name to something else.
*/
service
{
/*
* The name of the ChanServ client.
+ * If you change this value, you probably want to change the client directive in the configuration for the chanserv module too.
*/
nick = "ChanServ"
diff --git a/data/example.conf b/data/example.conf
index 795ac809d..894fd8363 100644
--- a/data/example.conf
+++ b/data/example.conf
@@ -80,16 +80,7 @@
* [OPTIONAL] Defines
*
* You can define values to other values, which can be used to easily change
- * every value in the configuration. For example, use:
- *
- * define
- * {
- * name = "ChanServ"
- * value = "ChannelServ"
- * }
- *
- * To replace every occurrence of ChanServ with ChannelServ in the configuration file,
- * and in every included configuration file (such as chanserv.example.conf).
+ * many values in the configuration. at once.
*/
/*
diff --git a/data/global.example.conf b/data/global.example.conf
index 3b2470a5c..09534dae7 100644
--- a/data/global.example.conf
+++ b/data/global.example.conf
@@ -4,12 +4,12 @@
/*
* First, create the service.
- * Note that an easy way to rename this service is to define{} the client name to something else.
*/
service
{
/*
* The name of the Global client.
+ * If you change this value, you probably want to change the client directive in the configuration for the global module too.
*/
nick = "Global"
diff --git a/data/hostserv.example.conf b/data/hostserv.example.conf
index 95957b7c1..e95b876ce 100644
--- a/data/hostserv.example.conf
+++ b/data/hostserv.example.conf
@@ -4,12 +4,12 @@
/*
* First, create the service.
- * Note that an easy way to rename this service is to define{} the client name to something else.
*/
service
{
/*
* The name of the HostServ client.
+ * If you change this value, you probably want to change the client directive in the configuration for the hostserv module too.
*/
nick = "HostServ"
diff --git a/data/memoserv.example.conf b/data/memoserv.example.conf
index 6e4fd1e8d..1ab45514e 100644
--- a/data/memoserv.example.conf
+++ b/data/memoserv.example.conf
@@ -4,12 +4,12 @@
/*
* First, create the service.
- * Note that an easy way to rename this service is to define{} the client name to something else.
*/
service
{
/*
* The name of the MemoServ client.
+ * If you change this value, you probably want to change the client directive in the configuration for the memoserv module too.
*/
nick = "MemoServ"
diff --git a/data/nickserv.example.conf b/data/nickserv.example.conf
index 4791af26a..03d473a20 100644
--- a/data/nickserv.example.conf
+++ b/data/nickserv.example.conf
@@ -4,12 +4,12 @@
/*
* First, create the service.
- * Note that an easy way to rename this service is to define{} the client name to something else.
*/
service
{
/*
* The name of the NickServ client.
+ * If you change this value, you probably want to change the client directive in the configuration for the nickserv module too.
*/
nick = "NickServ"
diff --git a/data/operserv.example.conf b/data/operserv.example.conf
index 24d0538df..c81cf0e61 100644
--- a/data/operserv.example.conf
+++ b/data/operserv.example.conf
@@ -4,12 +4,12 @@
/*
* First, create the service.
- * Note that an easy way to rename this service is to define{} the client name to something else.
*/
service
{
/*
* The name of the OperServ client.
+ * If you change this value, you probably want to change the client directive in the configuration for the operserv module too.
*/
nick = "OperServ"
diff --git a/data/stats.standalone.example.conf b/data/stats.standalone.example.conf
index 45526f389..7ba985e19 100644
--- a/data/stats.standalone.example.conf
+++ b/data/stats.standalone.example.conf
@@ -80,16 +80,7 @@
* [OPTIONAL] Defines
*
* You can define values to other values, which can be used to easily change
- * every value in the configuration. For example, use:
- *
- * define
- * {
- * name = "ChanServ"
- * value = "ChannelServ"
- * }
- *
- * To replace every occurrence of ChanServ with ChannelServ in the configuration file,
- * and in every included configuration file (such as chanserv.example.conf).
+ * many values in the configuration. at once.
*/
/*
diff --git a/src/config.cpp b/src/config.cpp
index f3931571f..0d43db81d 100644
--- a/src/config.cpp
+++ b/src/config.cpp
@@ -433,7 +433,7 @@ Conf::Conf() : Block("")
ValidateNotEmpty("command", "name", nname);
ValidateNotEmpty("command", "command", cmd);
- BotInfo *bi = BotInfo::Find(service, true);
+ BotInfo *bi = this->GetClient(service);
if (!bi)
continue;