summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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 */