diff options
author | Adam <Adam@anope.org> | 2011-11-03 02:28:29 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-11-03 02:28:29 -0400 |
commit | ca33ac608d77229f651aea6566aee9847b9aac2e (patch) | |
tree | 01aa175b5a855dd834e788b23bab0407db052d4c | |
parent | 302989bed13ee11bca08d8f7997d03f44d492c8a (diff) |
Bug #1354 - Allow mode chars to be used for channel prefixs in services.conf
-rw-r--r-- | data/botserv.example.conf | 2 | ||||
-rw-r--r-- | data/chanserv.example.conf | 2 | ||||
-rw-r--r-- | data/global.example.conf | 2 | ||||
-rw-r--r-- | data/hostserv.example.conf | 2 | ||||
-rw-r--r-- | data/memoserv.example.conf | 2 | ||||
-rw-r--r-- | data/nickserv.example.conf | 2 | ||||
-rw-r--r-- | data/operserv.example.conf | 2 | ||||
-rw-r--r-- | src/config.cpp | 4 | ||||
-rw-r--r-- | src/servers.cpp | 4 |
9 files changed, 20 insertions, 2 deletions
diff --git a/data/botserv.example.conf b/data/botserv.example.conf index 076c2a22e..dcb637a46 100644 --- a/data/botserv.example.conf +++ b/data/botserv.example.conf @@ -44,6 +44,8 @@ service * An optional comma separated list of channels this service should join. Outside * of log channels this is not very useful, as the service will just idle in the * specified channels, and will not accept any types of commands. + * + * Prefixes may be given to the channels in the form of mode character or prefix symbol. */ #channels = "@#services,#mychan" } diff --git a/data/chanserv.example.conf b/data/chanserv.example.conf index 3f5c8ce69..3ebf2672e 100644 --- a/data/chanserv.example.conf +++ b/data/chanserv.example.conf @@ -44,6 +44,8 @@ service * An optional comma separated list of channels this service should join. Outside * of log channels this is not very useful, as the service will just idle in the * specified channels, and will not accept any types of commands. + * + * Prefixes may be given to the channels in the form of mode character or prefix symbol. */ #channels = "@#services,#mychan" } diff --git a/data/global.example.conf b/data/global.example.conf index b23365359..234c86810 100644 --- a/data/global.example.conf +++ b/data/global.example.conf @@ -44,6 +44,8 @@ service * An optional comma separated list of channels this service should join. Outside * of log channels this is not very useful, as the service will just idle in the * specified channels, and will not accept any types of commands. + * + * Prefixes may be given to the channels in the form of mode character or prefix symbol. */ #channels = "@#services,#mychan" } diff --git a/data/hostserv.example.conf b/data/hostserv.example.conf index 7e6156374..768602d28 100644 --- a/data/hostserv.example.conf +++ b/data/hostserv.example.conf @@ -44,6 +44,8 @@ service * An optional comma separated list of channels this service should join. Outside * of log channels this is not very useful, as the service will just idle in the * specified channels, and will not accept any types of commands. + * + * Prefixes may be given to the channels in the form of mode character or prefix symbol. */ #channels = "@#services,#mychan" } diff --git a/data/memoserv.example.conf b/data/memoserv.example.conf index b9e328891..5bf6a0d33 100644 --- a/data/memoserv.example.conf +++ b/data/memoserv.example.conf @@ -44,6 +44,8 @@ service * An optional comma separated list of channels this service should join. Outside * of log channels this is not very useful, as the service will just idle in the * specified channels, and will not accept any types of commands. + * + * Prefixes may be given to the channels in the form of mode character or prefix symbol. */ #channels = "@#services,#mychan" } diff --git a/data/nickserv.example.conf b/data/nickserv.example.conf index 6a3ff595a..f9216f766 100644 --- a/data/nickserv.example.conf +++ b/data/nickserv.example.conf @@ -44,6 +44,8 @@ service * An optional comma separated list of channels this service should join. Outside * of log channels this is not very useful, as the service will just idle in the * specified channels, and will not accept any types of commands. + * + * Prefixes may be given to the channels in the form of mode character or prefix symbol. */ #channels = "@#services,#mychan" } diff --git a/data/operserv.example.conf b/data/operserv.example.conf index f30c187e5..29d4fd559 100644 --- a/data/operserv.example.conf +++ b/data/operserv.example.conf @@ -44,6 +44,8 @@ service * An optional comma separated list of channels this service should join. Outside * of log channels this is not very useful, as the service will just idle in the * specified channels, and will not accept any types of commands. + * + * Prefixes may be given to the channels in the form of mode character or prefix symbol. */ #channels = "@#services,#mychan" } diff --git a/src/config.cpp b/src/config.cpp index bbfb6890d..b6fd37b57 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -972,7 +972,9 @@ static bool DoServices(ServerConfig *config, const Anope::string &, const Anope: /* Set the new modes */ for (unsigned j = 0; j < want_modes.length(); ++j) { - ChannelMode *cm = ModeManager::FindChannelModeByChar(ModeManager::GetStatusChar(want_modes[j])); + ChannelMode *cm = ModeManager::FindChannelModeByChar(want_modes[j]); + if (cm == NULL) + cm = ModeManager::FindChannelModeByChar(ModeManager::GetStatusChar(want_modes[j])); if (cm && cm->Type == MODE_STATUS) c->SetMode(bi, cm, bi->nick); } diff --git a/src/servers.cpp b/src/servers.cpp index 835d1595b..582fb6908 100644 --- a/src/servers.cpp +++ b/src/servers.cpp @@ -70,7 +70,9 @@ Server::Server(Server *uplink, const Anope::string &name, unsigned hops, const A Anope::string want_modes = bi->botchannels[i].substr(0, h); for (unsigned j = 0; j < want_modes.length(); ++j) { - ChannelMode *cm = ModeManager::FindChannelModeByChar(ModeManager::GetStatusChar(want_modes[j])); + ChannelMode *cm = ModeManager::FindChannelModeByChar(want_modes[j]); + if (cm == NULL) + cm = ModeManager::FindChannelModeByChar(ModeManager::GetStatusChar(want_modes[j])); if (cm && cm->Type == MODE_STATUS) c->SetModeInternal(cm, bi->nick); } |