1
0
mirror of https://github.com/anope/anope.git synced 2026-07-08 23:33:11 +02:00

BUILD : 1.7.12 (945) BUGS : 405 410 NOTES : Fixed: first user on HelpChannel always got +h, even if it had no access at all; enforcers had incorrect user when only user was specified; missing quitmessage when catching unknown signals

git-svn-id: svn://svn.anope.org/anope/trunk@945 31f1291d-b8d6-0310-a050-a5561fc1590b


git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@674 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b
2005-12-11 09:48:57 +00:00
parent da183c9107
commit 86ccb584dd
6 changed files with 25 additions and 12 deletions
+3 -4
View File
@@ -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);
+1 -1
View File
@@ -1089,7 +1089,7 @@ int read_config(int reload)
NSEnforcerHost = ServiceHost;
} else {
*s++ = 0;
NSEnforcerUser = temp_userhost;
NSEnforcerUser = temp_nsuserhost;
NSEnforcerHost = s;
}
}
+9 -4
View File
@@ -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);
+2 -2
View File
@@ -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;