mirror of
https://github.com/anope/anope.git
synced 2026-07-06 10:33:12 +02:00
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
This commit is contained in:
parent
f3315d9518
commit
51500715c0
@@ -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]
|
||||
|
||||
@@ -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 **
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
+6
-9
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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 */
|
||||
|
||||
+6
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user