… | |
… | |
3 | * Rights to this code are documented in doc/pod/license.pod. |
3 | * Rights to this code are documented in doc/pod/license.pod. |
4 | * |
4 | * |
5 | * Copyright © 2005-2007 Atheme Project (http://www.atheme.org) |
5 | * Copyright © 2005-2007 Atheme Project (http://www.atheme.org) |
6 | */ |
6 | */ |
7 | |
7 | |
8 | static char const rcsid[] = "$Id: conf.C,v 1.6 2007/08/29 21:01:18 pippijn Exp $"; |
8 | static char const rcsid[] = "$Id: conf.C,v 1.7 2007/08/30 19:56:24 pippijn Exp $"; |
9 | |
9 | |
10 | #include "atheme.h" |
10 | #include "atheme.h" |
11 | #include <ermyth/crypto.h> |
11 | #include <ermyth/crypto.h> |
12 | #include <ermyth/database.h> |
12 | #include <ermyth/database.h> |
13 | #include <ermyth/module.h> |
13 | #include <ermyth/module.h> |
… | |
… | |
879 | { |
879 | { |
880 | if (privs == NULL) |
880 | if (privs == NULL) |
881 | privs = sstrdup (ce->vardata<char *> ()); |
881 | privs = sstrdup (ce->vardata<char *> ()); |
882 | else |
882 | else |
883 | { |
883 | { |
884 | newprivs = alloc<char> (strlen (privs) + 1 + strlen (ce->vardata<char *> ()) + 1); |
884 | newprivs = salloc<char> (strlen (privs) + 1 + strlen (ce->vardata<char *> ()) + 1); |
885 | strcpy (newprivs, privs); |
885 | strcpy (newprivs, privs); |
886 | strcat (newprivs, " "); |
886 | strcat (newprivs, " "); |
887 | strcat (newprivs, ce->vardata<char *> ()); |
887 | strcat (newprivs, ce->vardata<char *> ()); |
888 | sfree (privs); |
888 | sfree (privs); |
889 | privs = newprivs; |
889 | privs = newprivs; |
… | |
… | |
907 | { |
907 | { |
908 | if (privs == NULL) |
908 | if (privs == NULL) |
909 | privs = sstrdup (conf_p->ce_varname); |
909 | privs = sstrdup (conf_p->ce_varname); |
910 | else |
910 | else |
911 | { |
911 | { |
912 | newprivs = alloc<char> (strlen (privs) + 1 + strlen (conf_p->ce_varname) + 1); |
912 | newprivs = salloc<char> (strlen (privs) + 1 + strlen (conf_p->ce_varname) + 1); |
913 | strcpy (newprivs, privs); |
913 | strcpy (newprivs, privs); |
914 | strcat (newprivs, " "); |
914 | strcat (newprivs, " "); |
915 | strcat (newprivs, conf_p->ce_varname); |
915 | strcat (newprivs, conf_p->ce_varname); |
916 | sfree (privs); |
916 | sfree (privs); |
917 | privs = newprivs; |
917 | privs = newprivs; |