#include "blacklist.h"
#include "substitution.h"
#include "chmode.h"
+#include "s_assert.h"
static void report_and_set_user_flags(struct Client *, struct ConfItem *);
void user_welcome(struct Client *source_p);
sendto_one_numeric(source_p, RPL_LUSERCLIENT, form_str(RPL_LUSERCLIENT),
(Count.total - Count.invisi),
- Count.invisi, rb_dlink_list_length(&global_serv_list));
+ Count.invisi,
+ (int)rb_dlink_list_length(&global_serv_list));
if(rb_dlink_list_length(&oper_list) > 0)
sendto_one_numeric(source_p, RPL_LUSEROP,
if(rb_dlink_list_length(&unknown_list) > 0)
sendto_one_numeric(source_p, RPL_LUSERUNKNOWN,
form_str(RPL_LUSERUNKNOWN),
- rb_dlink_list_length(&unknown_list));
+ (int)rb_dlink_list_length(&unknown_list));
if(rb_dlink_list_length(&global_channel_list) > 0)
sendto_one_numeric(source_p, RPL_LUSERCHANNELS,
rb_dlink_list_length(&global_channel_list));
sendto_one_numeric(source_p, RPL_LUSERME, form_str(RPL_LUSERME),
- rb_dlink_list_length(&lclient_list),
- rb_dlink_list_length(&serv_list));
+ (int)rb_dlink_list_length(&lclient_list),
+ (int)rb_dlink_list_length(&serv_list));
sendto_one_numeric(source_p, RPL_LOCALUSERS,
form_str(RPL_LOCALUSERS),
- rb_dlink_list_length(&lclient_list),
+ (int)rb_dlink_list_length(&lclient_list),
Count.max_loc,
- rb_dlink_list_length(&lclient_list),
+ (int)rb_dlink_list_length(&lclient_list),
Count.max_loc);
sendto_one_numeric(source_p, RPL_GLOBALUSERS, form_str(RPL_GLOBALUSERS),
else
encr = source_p->localClient->passwd;
- if(strcmp(encr, aconf->passwd))
+ if(encr == NULL || strcmp(encr, aconf->passwd))
{
ServerStats.is_ref++;
sendto_one(source_p, form_str(ERR_PASSWDMISMATCH), me.name, source_p->name);
*modeval = '\0';
}
+ /* Resend away message to away-notify enabled clients. */
+ if (target_p->user->away)
+ sendto_common_channels_local_butone(target_p, CLICAP_AWAY_NOTIFY, ":%s!%s@%s AWAY :%s",
+ target_p->name, target_p->username, target_p->host,
+ target_p->user->away);
+
if(MyClient(target_p) && changed_case)
sendto_one(target_p, ":%s!%s@%s NICK %s",
target_p->name, target_p->username, target_p->host, nick);
+
+ /* TODO: send some snotes to SNO_NCHANGE/SNO_CCONN/SNO_CCONNEXT? */
}
else if(changed_case)
{
sendto_common_channels_local(target_p, NOCAPS, ":%s!%s@%s NICK :%s",
target_p->name, target_p->username,
target_p->host, nick);
+
+ if(MyConnect(target_p))
+ sendto_realops_snomask(SNO_NCHANGE, L_ALL,
+ "Nick change: From %s to %s [%s@%s]",
+ target_p->name, nick,
+ target_p->username, target_p->host);
}
rb_strlcpy(target_p->username, user, sizeof target_p->username);