Committer : entrope
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Commit time: 2004-09-11 02:06:15 UTC
Modified files:
ChangeLog ircd/channel.c ircd/ircd.c ircd/numnicks.c
Log message:
Fix oplevel, chkconf and ipv6 bugs.
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.454 ircu2.10/ChangeLog:1.455
--- ircu2.10/ChangeLog:1.454 Fri Sep 10 16:02:53 2004
+++ ircu2.10/ChangeLog Fri Sep 10 19:06:04 2004
@@ -1,5 +1,16 @@
2004-09-10 Michael Poole <[EMAIL PROTECTED]>
+ * ircd/channel.c (send_channel_modes): Only send oplevels for
+ channels that actually use them -- for -A channels, send chanops
+ as :o even if OPLEVELS is enabled.
+
+ * ircd/ircd.c: Fix -k (chkconf mode) and show in usage help.
+
+ * ircd/numnicks.c (base64toip): Fill in the right number of 0
+ words when we see _ in a base64-encoded IPv6 address.
+
+2004-09-10 Michael Poole <[EMAIL PROTECTED]>
+
* ircd/ircd.c: Add -k as a chkconf-like option to exit after
reading the configuration file.
Index: ircu2.10/ircd/channel.c
diff -u ircu2.10/ircd/channel.c:1.95 ircu2.10/ircd/channel.c:1.96
--- ircu2.10/ircd/channel.c:1.95 Sun Aug 22 16:54:22 2004
+++ ircu2.10/ircd/channel.c Fri Sep 10 19:06:04 2004
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: channel.c,v 1.95 2004/08/22 23:54:22 entrope Exp $
+ * $Id: channel.c,v 1.96 2004/09/11 02:06:04 entrope Exp $
*/
#include "config.h"
@@ -840,7 +840,7 @@
int opped_members_index = 0;
struct Membership** opped_members = NULL;
int last_oplevel = 0;
- int feat_oplevels = feature_bool(FEAT_OPLEVELS);
+ int feat_oplevels = (chptr->mode.mode & MODE_APASS) != 0;
assert(0 != cptr);
assert(0 != chptr);
Index: ircu2.10/ircd/ircd.c
diff -u ircu2.10/ircd/ircd.c:1.69 ircu2.10/ircd/ircd.c:1.70
--- ircu2.10/ircd/ircd.c:1.69 Fri Sep 10 16:02:56 2004
+++ ircu2.10/ircd/ircd.c Fri Sep 10 19:06:04 2004
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: ircd.c,v 1.69 2004/09/10 23:02:56 entrope Exp $
+ * $Id: ircd.c,v 1.70 2004/09/11 02:06:04 entrope Exp $
*/
#include "config.h"
@@ -86,7 +86,7 @@
enum {
BOOT_DEBUG = 1,
BOOT_TTY = 2,
- BOOT_CHKCONF = 3
+ BOOT_CHKCONF = 4
};
@@ -511,8 +511,8 @@
break;
default:
- printf("Usage: ircd [-f config] [-h servername] [-x loglevel] [-ntv]\n");
- printf("\n -n -t\t Don't detach\n -v\t display version\n\n");
+ printf("Usage: ircd [-f config] [-h servername] [-x loglevel] [-ntvk]\n");
+ printf("\n -n -t\t Don't detach\n -v\t display version\n -k\t exit after
checking config\n\n");
printf("Server not started.\n");
exit(1);
}
@@ -523,11 +523,6 @@
* daemon_init
*--------------------------------------------------------------------------*/
static void daemon_init(int no_fork) {
- if (!init_connection_limits())
- exit(9);
-
- close_connections(!(thisServer.bootopt & (BOOT_DEBUG | BOOT_TTY)));
-
if (no_fork)
return;
@@ -643,6 +638,11 @@
!check_file_access(configfile, 'C', R_OK))
return 4;
+ if (!init_connection_limits())
+ return 9;
+
+ close_connections(!(thisServer.bootopt & (BOOT_DEBUG | BOOT_TTY)));
+
event_init(MAXCONNECTIONS);
setup_signals();
Index: ircu2.10/ircd/numnicks.c
diff -u ircu2.10/ircd/numnicks.c:1.18 ircu2.10/ircd/numnicks.c:1.19
--- ircu2.10/ircd/numnicks.c:1.18 Wed Aug 18 21:00:52 2004
+++ ircu2.10/ircd/numnicks.c Fri Sep 10 19:06:04 2004
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: numnicks.c,v 1.18 2004/08/19 04:00:52 entrope Exp $
+ * $Id: numnicks.c,v 1.19 2004/09/11 02:06:04 entrope Exp $
*/
#include "config.h"
@@ -427,7 +427,7 @@
do {
if (*input == '_') {
unsigned int left;
- for (left = (strlen(input) - 1) / 3; left; left--)
+ for (left = (25 - strlen(input)) / 3; left; left--)
addr->in6_16[pos++] = 0;
input++;
} else {
----------------------- End of diff -----------------------