… | |
… | |
3 | * |
3 | * |
4 | * Copyright © 2007 Pippijn van Steenhoven / The Ermyth Team |
4 | * Copyright © 2007 Pippijn van Steenhoven / The Ermyth Team |
5 | * Rights to this code are as documented in COPYING. |
5 | * Rights to this code are as documented in COPYING. |
6 | */ |
6 | */ |
7 | |
7 | |
8 | static char const rcsid[] = "$Id: global.C,v 1.6 2007/09/16 18:54:45 pippijn Exp $"; |
8 | static char const rcsid[] = "$Id: global.C,v 1.7 2007/09/22 14:27:30 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/system.h> |
13 | #include "uplink.h" |
14 | #include "uplink.h" |
14 | #include "internal.h" |
15 | #include "internal.h" |
15 | #include "datastream.h" |
16 | #include "datastream.h" |
16 | #include "authcookie.h" |
17 | #include "authcookie.h" |
17 | |
18 | |
… | |
… | |
74 | = emailtime |
75 | = emailtime |
75 | = 0; |
76 | = 0; |
76 | } |
77 | } |
77 | |
78 | |
78 | void |
79 | void |
79 | me_t::fini () |
80 | me_t::cleanup () |
80 | { |
81 | { |
81 | sfree (netname); |
82 | sfree (netname); |
82 | sfree (hidehostsuffix); |
83 | sfree (hidehostsuffix); |
83 | sfree (adminname); |
84 | sfree (adminname); |
84 | sfree (adminemail); |
85 | sfree (adminemail); |
|
|
86 | sfree (desc); |
|
|
87 | sfree (name); |
|
|
88 | sfree (numeric); |
85 | if (mta != NULL) |
89 | if (mta != NULL) |
86 | sfree (mta); |
90 | sfree (mta); |
|
|
91 | |
|
|
92 | netname = hidehostsuffix = adminemail = adminname = desc = name = numeric = mta = 0; |
87 | } |
93 | } |
88 | |
94 | |
89 | me_t & |
95 | me_t & |
90 | me_t::operator = (const me_t &rhs) |
96 | me_t::operator = (const me_t &rhs) |
91 | { |
97 | { |
… | |
… | |
93 | restarttime = rhs.restarttime; |
99 | restarttime = rhs.restarttime; |
94 | netname = sstrdup (rhs.netname); |
100 | netname = sstrdup (rhs.netname); |
95 | hidehostsuffix = sstrdup (rhs.hidehostsuffix); |
101 | hidehostsuffix = sstrdup (rhs.hidehostsuffix); |
96 | adminname = sstrdup (rhs.adminname); |
102 | adminname = sstrdup (rhs.adminname); |
97 | adminemail = sstrdup (rhs.adminemail); |
103 | adminemail = sstrdup (rhs.adminemail); |
|
|
104 | desc = sstrdup (rhs.desc); |
|
|
105 | name = sstrdup (rhs.name); |
|
|
106 | numeric = sstrdup (rhs.numeric); |
98 | mta = rhs.mta ? sstrdup (rhs.mta) : NULL; |
107 | mta = rhs.mta ? sstrdup (rhs.mta) : NULL; |
99 | maxlogins = rhs.maxlogins; |
108 | maxlogins = rhs.maxlogins; |
100 | maxusers = rhs.maxusers; |
109 | maxusers = rhs.maxusers; |
101 | maxnicks = rhs.maxnicks; |
110 | maxnicks = rhs.maxnicks; |
102 | maxchans = rhs.maxchans; |
111 | maxchans = rhs.maxchans; |