#include "whowas.h"
#include "rb_radixtree.h"
#include "sslproc.h"
+#include "s_assert.h"
static const char stats_desc[] =
"Provides the STATS command to inspect various server/network information";
static void
stats_connect(struct Client *source_p)
{
- static char buf[5];
+ static char buf[BUFSIZE];
struct server_conf *server_p;
char *s;
rb_dlink_node *ptr;
{
if(ServerConfAutoconn(server_p))
*s++ = 'A';
+ if(ServerConfSCTP(server_p))
+ *s++ = 'M';
if(ServerConfSSL(server_p))
*s++ = 'S';
if(ServerConfTb(server_p))
get_printable_kline(source_p, aconf, &host, &pass, &user, &oper_reason);
sendto_one_numeric(source_p, RPL_STATSKLINE,
- form_str(RPL_STATSKLINE), aconf->flags & CONF_FLAGS_TEMPORARY ? 'k' : 'K',
+ form_str(RPL_STATSKLINE), (aconf->flags & CONF_FLAGS_TEMPORARY) ? 'k' : 'K',
host, user, pass, oper_reason ? "|" : "",
oper_reason ? oper_reason : "");
}
get_printable_kline(source_p, aconf, &host, &pass, &user, &oper_reason);
sendto_one_numeric(source_p, RPL_STATSKLINE, form_str(RPL_STATSKLINE),
- aconf->flags & CONF_FLAGS_TEMPORARY ? 'k' : 'K',
+ (aconf->flags & CONF_FLAGS_TEMPORARY) ? 'k' : 'K',
host, user, pass, oper_reason ? "|" : "",
oper_reason ? oper_reason : "");
}
{
rb_dictionary_iter iter;
struct Message *msg;
- struct alias_entry *amsg;
RB_DICTIONARY_FOREACH(msg, &iter, cmd_dict)
{
rb_dictionary_iter iter;
struct BlacklistStats *stats;
+ if(bl_stats == NULL)
+ return;
+
RB_DICTIONARY_FOREACH(stats, &iter, bl_stats)
{
/* use RPL_STATSDEBUG for now -- jilles */
{
target_p = oper_ptr->data;
- if(IsOperInvis(target_p) && !IsOper(source_p))
+ if(!SeesOper(target_p, source_p))
continue;
if(target_p->user->away)