Merge branch 'authd-framework' of github.com:charybdis-ircd/charybdis into authd-framework

This commit is contained in:
Elizabeth Myers 2016-03-28 14:46:28 -05:00
commit ec2301263e
11 changed files with 22 additions and 42 deletions

2
.gitignore vendored
View file

@ -17,6 +17,7 @@ bandb/bantool
autom4te.cache
aclocal.m4
compile
confdefs.h
config.guess
config.sub
depcomp
@ -54,6 +55,7 @@ ircd/version.c
ircd/version.c.last
ssld/ssld
wsockd/wsockd
testsuite/ircd.pid.*
tools/charybdis-mkpasswd
tools/genssl
tools/mkpasswd

View file

@ -23,6 +23,7 @@
#loadmodule "extensions/extb_realname";
#loadmodule "extensions/extb_server";
#loadmodule "extensions/extb_ssl";
#loadmodule "extensions/extb_usermode";
#loadmodule "extensions/hurt";
#loadmodule "extensions/m_extendchans";
#loadmodule "extensions/m_findforwards";

View file

@ -61,6 +61,7 @@
* Realname (gecos) bans (+b $r:mask) -- extb_realname
* Server bans (+b $s:mask) -- extb_server
* SSL bans (+b $z) -- extb_ssl
* User mode bans (+b $u:modes) -- extb_usermode
* Helpops system (umode +H) -- helpops
* HURT system -- hurt
* New host mangling (umode +x) -- ip_cloaking_4.0
@ -95,6 +96,7 @@
#loadmodule "extensions/extb_realname";
#loadmodule "extensions/extb_server";
#loadmodule "extensions/extb_ssl";
#loadmodule "extensions/extb_usermode";
#loadmodule "extensions/helpops";
#loadmodule "extensions/hurt";
#loadmodule "extensions/ip_cloaking_4.0";

View file

@ -26,7 +26,7 @@ DECLARE_MODULE_AV2(extb_usermode, _modinit, _moddeinit, NULL, NULL, NULL, NULL,
static int
_modinit(void)
{
extban_table['m'] = eb_usermode;
extban_table['u'] = eb_usermode;
return 0;
}
@ -34,7 +34,7 @@ _modinit(void)
static void
_moddeinit(void)
{
extban_table['m'] = NULL;
extban_table['u'] = NULL;
}
static int eb_usermode(const char *data, struct Client *client_p,

View file

@ -82,7 +82,7 @@ extern void add_to_id_hash(const char *, struct Client *);
extern void del_from_id_hash(const char *name, struct Client *client);
extern struct Client *find_id(const char *name);
extern struct Channel *get_or_create_channel(struct Client *client_p, const char *chname, int *isnew);
extern struct Channel *get_or_create_channel(struct Client *client_p, const char *chname, bool *isnew);
extern void del_from_channel_hash(const char *name, struct Channel *chan);
extern struct Channel *find_channel(const char *name);

View file

@ -65,9 +65,9 @@ extern const unsigned long int datecode;
extern const char *ircd_version;
extern const char *logFileName;
extern const char *pidFileName;
extern bool dorehash;
extern bool dorehashbans;
extern bool doremotd;
extern volatile sig_atomic_t dorehash;
extern volatile sig_atomic_t dorehashbans;
extern volatile sig_atomic_t doremotd;
extern bool kline_queued;
extern bool server_state_foreground;
extern bool opers_see_all_users; /* sno_farconnect.so loaded, operspy without

View file

@ -405,7 +405,7 @@ find_channel(const char *name)
* block, if it didn't exist before).
*/
struct Channel *
get_or_create_channel(struct Client *client_p, const char *chname, int *isnew)
get_or_create_channel(struct Client *client_p, const char *chname, bool *isnew)
{
struct Channel *chptr;
int len;
@ -434,12 +434,12 @@ get_or_create_channel(struct Client *client_p, const char *chname, int *isnew)
if (chptr != NULL)
{
if (isnew != NULL)
*isnew = 0;
*isnew = false;
return chptr;
}
if(isnew != NULL)
*isnew = 1;
*isnew = true;
chptr = allocate_channel(s);
chptr->channelts = rb_current_time(); /* doesn't hurt to set it here */

View file

@ -94,9 +94,9 @@ rb_dlink_list local_oper_list; /* our opers, duplicated in lclient_list */
rb_dlink_list oper_list; /* network opers */
char **myargv;
bool dorehash = false;
bool dorehashbans = false;
bool doremotd = false;
volatile sig_atomic_t dorehash = false;
volatile sig_atomic_t dorehashbans = false;
volatile sig_atomic_t doremotd = false;
bool kline_queued = false;
bool server_state_foreground = false;
bool opers_see_all_users = false;

View file

@ -395,7 +395,7 @@ ms_join(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_
static struct Mode mode;
time_t oldts;
time_t newts;
int isnew;
bool isnew;
bool keep_our_modes = true;
rb_dlink_node *ptr, *next_ptr;
@ -512,7 +512,7 @@ ms_sjoin(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source
bool keep_our_modes = true;
bool keep_new_modes = true;
int fl;
int isnew;
bool isnew;
int mlen_uid;
int len_uid;
int len;

View file

@ -824,31 +824,6 @@ process_stats(mod_ctl_t * ctl, mod_ctl_buf_t * ctlb)
mod_cmd_write_queue(ctl, outstat, strlen(outstat) + 1); /* +1 is so we send the \0 as well */
}
static void
change_connid(mod_ctl_t *ctl, mod_ctl_buf_t *ctlb)
{
uint32_t id = buf_to_uint32(&ctlb->buf[1]);
uint32_t newid = buf_to_uint32(&ctlb->buf[5]);
conn_t *conn = conn_find_by_id(id);
lrb_assert(conn != NULL);
if(conn == NULL)
{
uint8_t buf[256];
int len;
buf[0] = 'D';
uint32_to_buf(&buf[1], newid);
sprintf((char *) &buf[5], "connid %d does not exist", id);
len = (strlen((char *) &buf[5]) + 1) + 5;
mod_cmd_write_queue(ctl, buf, len);
return;
}
rb_dlinkDelete(&conn->node, connid_hash(conn->id));
SetZipSSL(conn);
conn->id = newid;
}
#ifdef HAVE_LIBZ
static void
zlib_process(mod_ctl_t * ctl, mod_ctl_buf_t * ctlb)

View file

@ -3,6 +3,6 @@ testdir=`pwd`
prefix=`sed -n -e 's/^#define IRCD_PREFIX "\(.*\)"/\1/p' "$testdir/../include/setup.h"`
[ -d $prefix ] || { echo Unable to find installation prefix; exit 1; }
$prefix/bin/ircd -configfile $testdir/ircd.conf.1 -pidfile $testdir/ircd.pid.1
$prefix/bin/ircd -configfile $testdir/ircd.conf.2 -pidfile $testdir/ircd.pid.2
$prefix/bin/ircd -configfile $testdir/ircd.conf.3 -pidfile $testdir/ircd.pid.3
$prefix/bin/charybdis -configfile $testdir/ircd.conf.1 -pidfile $testdir/ircd.pid.1
$prefix/bin/charybdis -configfile $testdir/ircd.conf.2 -pidfile $testdir/ircd.pid.2
$prefix/bin/charybdis -configfile $testdir/ircd.conf.3 -pidfile $testdir/ircd.pid.3