#include "parse.h"
#include "modules.h"
#include "bandbi.h"
+#include "operhash.h"
static int mo_dline(struct Client *, struct Client *, int, const char **);
static int me_dline(struct Client *, struct Client *, int, const char **);
{
struct ConfItem *aconf;
char *oper_reason;
- char dlbuffer[IRCD_BUFSIZE];
struct rb_sockaddr_storage daddr;
int t = AF_INET, ty, b;
const char *creason;
aconf->status = CONF_DLINE;
aconf->created = rb_current_time();
aconf->host = rb_strdup(dlhost);
+ aconf->passwd = rb_strdup(reason);
+ aconf->info.oper = operhash_add(get_oper_name(source_p));
/* Look for an oper reason */
if((oper_reason = strchr(reason, '|')) != NULL)
if(tdline_time > 0)
{
- rb_snprintf(dlbuffer, sizeof(dlbuffer),
- "Temporary D-line %d min. - %s",
- (int) (tdline_time / 60), reason);
- aconf->passwd = rb_strdup(dlbuffer);
aconf->hold = rb_current_time() + tdline_time;
add_temp_dline(aconf);
}
else
{
- aconf->passwd = rb_strdup(reason);
add_conf_by_address(aconf->host, CONF_DLINE, NULL, NULL, aconf);
bandb_add(BANDB_DLINE, source_p, aconf->host, NULL,