diff options
author | trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b <trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2004-12-03 07:48:01 +0000 |
---|---|---|
committer | trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b <trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2004-12-03 07:48:01 +0000 |
commit | 51500715c08a7b07c1a79da5411bb9d1e5ac3fed (patch) | |
tree | 676251a3d125a6896e8cfc776d6dd57818b2fe09 | |
parent | f3315d951813945b0746f6d57e1a104ba3c8bfaf (diff) |
BUILD : 1.7.6 (471) BUGS : N/A NOTES : Redid Services Mode stuff to be config option called UlineServers this allows you to state what servers can set channel modes and we are to respecet the mode. Gotta clean this up some more in a bit
git-svn-id: svn://svn.anope.org/anope/trunk@471 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@325 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r-- | Changes | 2 | ||||
-rw-r--r-- | Changes.conf | 9 | ||||
-rw-r--r-- | data/example.conf | 8 | ||||
-rw-r--r-- | include/extern.h | 6 | ||||
-rw-r--r-- | src/channels.c | 15 | ||||
-rw-r--r-- | src/config.c | 18 | ||||
-rw-r--r-- | src/servers.c | 13 | ||||
-rw-r--r-- | version.log | 7 |
8 files changed, 67 insertions, 11 deletions
@@ -8,7 +8,7 @@ Provided by Anope Dev. <dev@anope.org> - 2004 11/19 F Wrong string and missing registered nick check in bot change. [#221] Provided by Trystan <trystan@nomadirc.net> - 2004 -12/02 A Support for +S (services clients) mode to override channel modes [ #00] +12/02 A Support for other Ulines Servers (NeoStats/SolarStats) [ #00] 11/28 A Support for Unreal's version of SVSHOLD [ #00] 11/28 A /OS SET LIST to list the set options [ #00] 11/27 A Solid IRCD support (Solid IRCD 3.4.6 or later) [ #00] diff --git a/Changes.conf b/Changes.conf index 18e759627..4127edd37 100644 --- a/Changes.conf +++ b/Changes.conf @@ -11,6 +11,15 @@ Anope Version S V N NSAddAccessOnReg +# UlineServers [OPTIONAL] +# +# A list of ulined servers on your network, these servers are assumed they +# can set channel modes and we will not attempt to take them from them +# WARNING: do not put your user servers in this option + +UlineServers "stats.your.network, proxy.your.network" + + ** MODIFIED CONFIGURATION DIRECTIVES ** ** DELETED CONFIGURATION DIRECTIVES ** diff --git a/data/example.conf b/data/example.conf index 1d865918c..49d751adc 100644 --- a/data/example.conf +++ b/data/example.conf @@ -497,6 +497,14 @@ GlobalOnCycleUP "Services are now back online - have a nice day" # to be a Service Admin in Anope #UnRestrictSAdmin +# UlineServers [OPTIONAL] +# +# A list of ulined servers on your network, these servers are assumed they +# can set channel modes and we will not attempt to take them from them +# WARNING: do not put your user servers in this option + +UlineServers "stats.your.network, proxy.your.network" + ########################################################################### # # Mail-related options diff --git a/include/extern.h b/include/extern.h index 584fda133..338cccf64 100644 --- a/include/extern.h +++ b/include/extern.h @@ -451,6 +451,10 @@ E char *ExceptionDBName; E char *SessionLimitDetailsLoc; E char *SessionLimitExceeded; +E char *UlineServers; +E char **Ulines; +E int NumUlines; + #ifdef USE_RDB E int rdb_init(); E int rdb_open(); @@ -826,6 +830,8 @@ E uint32 uplink_capab; E Server *first_server(int flags); E Server *next_server(int flags); +E int is_ulined(char *server); + E Server *new_server(Server * uplink, const char *name, const char *desc, uint16 flags, char *suid); diff --git a/src/channels.c b/src/channels.c index c29887f97..5fd2340d1 100644 --- a/src/channels.c +++ b/src/channels.c @@ -236,16 +236,13 @@ void chan_set_modes(const char *source, Channel * chan, int ac, char **av, if (add) { /* - Okay everyones biggest complaint is that NeoStats or any other - services clients are flagged as services but we still strip their - channel modes when strict is enabled. This lets them keep the mode and - we update our internal user/channel struct - TSL + if they are in the uline server list we assume they can + have the mode - yes woke up in the middle of the night to + add this.. - TSL */ - if (ircd->servicesmode) { - if (user->mode & ircd->servicesmode) { - chan_set_user_status(chan, user, cum->status); - continue; - } + if (is_ulined(user->server->name)) { + chan_set_user_status(chan, user, cum->status); + continue; } /* Fixes bug #68 diff --git a/src/config.c b/src/config.c index 9c89141f1..5e1f69591 100644 --- a/src/config.c +++ b/src/config.c @@ -329,6 +329,10 @@ int Numeric; int UnRestrictSAdmin; +char *UlineServers; +char **Ulines; +int NumUlines; + /*************************************************************************/ /* Deprecated directive (dep_) and value checking (chk_) functions: */ @@ -665,6 +669,7 @@ Directive directives[] = { {"GlobalOnDefconMore", {{PARAM_SET, PARAM_RELOAD, &GlobalOnDefconMore}}}, {"DefconMessage", {{PARAM_STRING, PARAM_RELOAD, &DefconMessage}}}, + {"UlineServers", {{PARAM_STRING, PARAM_RELOAD, &UlineServers}}}, }; /*************************************************************************/ @@ -1197,6 +1202,19 @@ int read_config(int reload) } while ((s = strtok(NULL, " "))); } + /* Ulines */ + + if (UlineServers) { + NumUlines = 0; + + s = strtok(UlineServers, " "); + do { + NumUlines++; + Ulines = realloc(Ulines, sizeof(char *) * NumUlines); + Ulines[NumUlines - 1] = sstrdup(s); + } while ((s = strtok(NULL, " "))); + } + /* Host Setters building... :P */ HostNumber = 0; /* always zero it, even if we have no setters */ if (HostSetter) { diff --git a/src/servers.c b/src/servers.c index 4cd04e8eb..65e67c19d 100644 --- a/src/servers.c +++ b/src/servers.c @@ -443,4 +443,17 @@ void capab_parse(int ac, char **av) } } +int is_ulined(char *server) +{ + int j; + + for (j = 0; j < NumUlines; j++) { + if (stricmp(Ulines[j], server) == 0) { + return 1; + } + } + + return 0; +} + /* EOF */ diff --git a/version.log b/version.log index 689d398a1..e621b55fa 100644 --- a/version.log +++ b/version.log @@ -8,10 +8,15 @@ VERSION_MAJOR="1" VERSION_MINOR="7" VERSION_PATCH="6" -VERSION_BUILD="470" +VERSION_BUILD="471" # $Log$ # +# BUILD : 1.7.6 (471) +# BUGS : N/A +# NOTES : Redid Services Mode stuff to be config option called UlineServers this allows you to state what servers can set +# channel modes and we are to respecet the mode. Gotta clean this up some more in a bit +# # BUILD : 1.7.6 (470) # BUGS : N/A # NOTES : add mode.. not remove mode.. from the previous commit |