X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/55f5eaa147365038762bcb594ceb3dca2173e5fe..ce60772db6eb54b5cc87bbaa5c3b5bf783d59be2:/src/s_conf.c diff --git a/src/s_conf.c b/src/s_conf.c index 2016997..ae83d7a 100644 --- a/src/s_conf.c +++ b/src/s_conf.c @@ -306,6 +306,8 @@ verify_access(struct Client *client_p, const char *username) { struct ConfItem *aconf; char non_ident[USERLEN + 1]; + char reasonbuf[BUFSIZE]; + char *reason; if(IsGotId(client_p)) { @@ -376,9 +378,18 @@ verify_access(struct Client *client_p, const char *username) { if(ConfigFileEntry.kline_with_reason) { + if(aconf->created) + { + snprintf(reasonbuf, sizeof reasonbuf, "%s (%s)", + aconf->passwd, + smalldate(aconf->created)); + reason = reasonbuf; + } + else + reason = aconf->passwd; sendto_one(client_p, form_str(ERR_YOUREBANNEDCREEP), - me.name, client_p->name, aconf->passwd); + me.name, client_p->name, reason); } add_reject(client_p, aconf->user, aconf->host); return (BANNED_CLIENT); @@ -682,6 +693,7 @@ set_default_conf(void) ConfigFileEntry.default_operstring = rb_strdup("is an IRC operator"); ConfigFileEntry.default_adminstring = rb_strdup("is a Server Administrator"); ConfigFileEntry.default_operhost = rb_strdup(""); + ConfigFileEntry.static_quit = rb_strdup(""); ConfigFileEntry.servicestring = rb_strdup("is a Network Service"); ConfigFileEntry.default_umodes = UMODE_INVISIBLE; @@ -695,6 +707,7 @@ set_default_conf(void) ConfigFileEntry.nick_delay = 900; /* 15 minutes */ ConfigFileEntry.target_change = YES; ConfigFileEntry.anti_spam_exit_message_time = 0; + ConfigFileEntry.use_part_messages = YES; ConfigFileEntry.ts_warn_delta = TS_WARN_DELTA_DEFAULT; ConfigFileEntry.ts_max_delta = TS_MAX_DELTA_DEFAULT; ConfigFileEntry.client_exit = YES; @@ -718,6 +731,7 @@ set_default_conf(void) ConfigFileEntry.pace_wait_simple = 1; ConfigFileEntry.short_motd = NO; ConfigFileEntry.no_oper_flood = NO; + ConfigFileEntry.true_no_oper_flood = NO; ConfigFileEntry.fname_userlog = NULL; ConfigFileEntry.fname_fuserlog = NULL; ConfigFileEntry.fname_operlog = NULL; @@ -751,7 +765,7 @@ set_default_conf(void) ConfigChannel.autochanmodes = rb_strdup("nt"); ConfigChannel.exemptchanops = rb_strdup(""); ConfigChannel.use_halfop = YES; - ConfigChannel.use_owner = YES; + ConfigChannel.use_admin = YES; ConfigChannel.use_except = YES; ConfigChannel.use_invex = YES; ConfigChannel.use_knock = YES; @@ -1127,11 +1141,19 @@ get_printable_kline(struct Client *source_p, struct ConfItem *aconf, char **user, char **oper_reason) { static char null[] = ""; + static char reasonbuf[BUFSIZE]; *host = EmptyString(aconf->host) ? null : aconf->host; - *reason = EmptyString(aconf->passwd) ? null : aconf->passwd; *user = EmptyString(aconf->user) ? null : aconf->user; + *reason = EmptyString(aconf->passwd) ? null : aconf->passwd; + if(aconf->created) + { + rb_snprintf(reasonbuf, sizeof reasonbuf, "%s (%s)", + *reason, smalldate(aconf->created)); + *reason = reasonbuf; + } + if(EmptyString(aconf->spasswd) || !IsOper(source_p)) *oper_reason = NULL; else