summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortrystan 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
committertrystan 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
commit51500715c08a7b07c1a79da5411bb9d1e5ac3fed (patch)
tree676251a3d125a6896e8cfc776d6dd57818b2fe09 /src
parentf3315d951813945b0746f6d57e1a104ba3c8bfaf (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
Diffstat (limited to 'src')
-rw-r--r--src/channels.c15
-rw-r--r--src/config.c18
-rw-r--r--src/servers.c13
3 files changed, 37 insertions, 9 deletions
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 */