*/
#include "stdinc.h"
-#include "tools.h"
#include "channel.h"
#include "class.h"
#include "client.h"
#include "ircd.h"
#include "hostmask.h"
#include "numeric.h"
-#include "commio.h"
#include "s_conf.h"
#include "s_newconf.h"
#include "s_log.h"
const char *dlhost;
char *oper_reason;
char *reason = def;
- struct irc_sockaddr_storage daddr;
+ struct rb_sockaddr_storage daddr;
char cidr_form_host[HOSTLEN + 1];
struct ConfItem *aconf;
int bits;
aconf = make_conf();
aconf->status = CONF_DLINE;
- DupString(aconf->host, dlhost);
+ aconf->host = rb_strdup(dlhost);
/* Look for an oper reason */
if((oper_reason = strchr(reason, '|')) != NULL)
oper_reason++;
if(!EmptyString(oper_reason))
- DupString(aconf->spasswd, oper_reason);
+ aconf->spasswd = rb_strdup(oper_reason);
}
if(tdline_time > 0)
rb_snprintf(dlbuffer, sizeof(dlbuffer),
"Temporary D-line %d min. - %s (%s)",
(int) (tdline_time / 60), reason, current_date);
- DupString(aconf->passwd, dlbuffer);
- aconf->hold = CurrentTime + tdline_time;
+ aconf->passwd = rb_strdup(dlbuffer);
+ aconf->hold = rb_current_time() + tdline_time;
add_temp_dline(aconf);
if(EmptyString(oper_reason))
else
{
rb_snprintf(dlbuffer, sizeof(dlbuffer), "%s (%s)", reason, current_date);
- DupString(aconf->passwd, dlbuffer);
+ aconf->passwd = rb_strdup(dlbuffer);
add_conf_by_address(aconf->host, CONF_DLINE, NULL, aconf);
write_confitem(DLINE_TYPE, source_p, NULL, aconf->host, reason,
oper_reason, current_date, 0);
{
if (aconf == ptr->data)
{
- dlinkDestroy(ptr, &temp_dlines[i]);
+ rb_dlinkDestroy(ptr, &temp_dlines[i]);
delete_one_address_conf(aconf->host, aconf);
return YES;
}