]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - src/substitution.c
Send numeric 735 on MLOCK policy-restricted mode changes that are ignored.
[irc/rqf/shadowircd.git] / src / substitution.c
index 5cef86b09a914eb262b04241e86cd8e14f46f15c..708dce23c83f89b975bf11f571acbf1de5bf75d6 100644 (file)
@@ -35,7 +35,9 @@
 
 #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'.
@@ -57,10 +59,10 @@ struct substitution_variable
  */
 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);
 }
@@ -136,7 +138,7 @@ char *substitution_parse(const char *fmt, rb_dlink_list *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;
                                }