#include "stdinc.h"
#include "s_user.h"
-#include "irc_string.h"
+#include "snomask.h"
+#include "match.h"
+#include "substitution.h"
/*
* Simple mappings for $foo -> 'bar'.
*/
void substitution_append_var(rb_dlink_list *varlist, const char *name, const char *value)
{
- struct substitution_variable *tmp = MyMalloc(sizeof(struct substitution_variable));
+ struct substitution_variable *tmp = rb_malloc(sizeof(struct substitution_variable));
- DupString(tmp->name, name);
- DupString(tmp->value, value);
+ tmp->name = rb_strdup(name);
+ tmp->value = rb_strdup(value);
rb_dlinkAddAlloc(tmp, varlist);
}
if (!strcasecmp(varname, val->name))
{
- strlcpy(bptr, val->value, BUFSIZE - (bptr - buf));
+ rb_strlcpy(bptr, val->value, BUFSIZE - (bptr - buf));
bptr += strlen(val->value);
break;
}