summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/channels.c7
-rw-r--r--src/config.c2
-rw-r--r--src/main.c13
-rw-r--r--src/users.c4
4 files changed, 15 insertions, 11 deletions
diff --git a/src/channels.c b/src/channels.c
index 7f4867c40..f1add79e3 100644
--- a/src/channels.c
+++ b/src/channels.c
@@ -326,10 +326,9 @@ void chan_set_user_status(Channel * chan, User * user, int16 status)
alog("debug: setting user status (%d) on %s for %s", status,
user->nick, chan->name);
- if (HelpChannel && ircd->supporthelper
- && (status == CUS_OP || status == (CUS_PROTECT | CUS_OP)
- || status == (CUS_OWNER | CUS_OP))
- && !stricmp(chan->name, HelpChannel)) {
+ if (HelpChannel && ircd->supporthelper && (status & CUS_OP)
+ && (stricmp(chan->name, HelpChannel) == 0)
+ && (!chan->ci || check_access(user, chan->ci, CA_AUTOOP))) {
if (debug) {
alog("debug: %s being given +h for having %d status in %s",
user->nick, status, chan->name);
diff --git a/src/config.c b/src/config.c
index f66e76f58..2e4e0e1dd 100644
--- a/src/config.c
+++ b/src/config.c
@@ -1089,7 +1089,7 @@ int read_config(int reload)
NSEnforcerHost = ServiceHost;
} else {
*s++ = 0;
- NSEnforcerUser = temp_userhost;
+ NSEnforcerUser = temp_nsuserhost;
NSEnforcerHost = s;
}
}
diff --git a/src/main.c b/src/main.c
index e274e2504..beb488d23 100644
--- a/src/main.c
+++ b/src/main.c
@@ -276,7 +276,7 @@ static void services_shutdown(void)
}
send_event(EVENT_SHUTDOWN, 1, EVENT_STOP);
disconn(servsock);
- modules_unload_all(true); /* Only legitimate use of this function */
+ modules_unload_all(true); /* Only legitimate use of this function */
}
/*************************************************************************/
@@ -285,6 +285,11 @@ static void services_shutdown(void)
void sighandler(int signum)
{
+ /* We set the quit message to something default, just to be sure it is
+ * always set when we need it. It seems some signals slip through to the
+ * QUIT code without having a valid quitmsg. -GD
+ */
+ quitmsg = sstrdup("Signal Received");
if (started) {
#ifndef _WIN32
if (signum == SIGHUP) { /* SIGHUP = save databases and restart */
@@ -356,7 +361,7 @@ void sighandler(int signum)
inbuf[448] = 0;
}
wallops(NULL, "PANIC! buffer = %s\r\n", inbuf);
- modules_unload_all(false);
+ modules_unload_all(false);
} else if (waiting < 0) {
/* This is static on the off-chance we run low on stack */
static char buf[BUFSIZE];
@@ -414,7 +419,7 @@ void sighandler(int signum)
}
wallops(NULL, "PANIC! %s (%s)", buf, strsignal(signum));
alog("PANIC! %s (%s)", buf, strsignal(signum));
- modules_unload_all(false);
+ modules_unload_all(false);
}
}
@@ -436,7 +441,7 @@ void sighandler(int signum)
if (signum == SIGSEGV) {
do_backtrace(1);
- modules_unload_all(false); /* probably cant do this, but might as well try, we have nothing left to loose */
+ modules_unload_all(false); /* probably cant do this, but might as well try, we have nothing left to loose */
}
/* Should we send the signum here as well? -GD */
send_event(EVENT_SIGNAL, 1, quitmsg);
diff --git a/src/users.c b/src/users.c
index 539de2089..d62fba853 100644
--- a/src/users.c
+++ b/src/users.c
@@ -385,11 +385,11 @@ User *find_byuid(const char *uid)
u = first_uid();
while (u) {
next = next_uid();
- if(u->uid) {
+ if (u->uid) {
if (!stricmp(uid, u->uid)) {
return u;
}
- }
+ }
u = next;
}
return NULL;