ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/ermyth/src/account.C
(Generate patch)

Comparing ermyth/src/account.C (file contents):
Revision 1.6 by pippijn, Wed Sep 5 11:23:15 2007 UTC vs.
Revision 1.7 by pippijn, Sun Sep 9 20:05:52 2007 UTC

1/** 1/**
2 * account.C: Account management 2 * account.C: Account management
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 © 2007 Pippijn van Steenhoven / The Ermyth Team 5 * Copyright © 2007 Pippijn van Steenhoven / The Ermyth Team (http://ermyth.schmorp.de)
6 * Copyright © 2005-2007 Atheme Project (http://www.atheme.org) 6 * Copyright © 2005-2007 Atheme Project (http://www.atheme.org)
7 */ 7 */
8 8
9static char const rcsid[] = "$Id: account.C,v 1.6 2007/09/05 11:23:15 pippijn Exp $"; 9static char const rcsid[] = "$Id: account.C,v 1.7 2007/09/09 20:05:52 pippijn Exp $";
10 10
11#include <boost/foreach.hpp> 11#include <boost/foreach.hpp>
12 12
13#include "atheme.h" 13#include "atheme.h"
14#include <account/myuser.h> 14#include <account/myuser.h>
116 continue; 116 continue;
117 } 117 }
118 118
119 snoop (_("EXPIRE: \2%s\2 from \2%s\2"), mn->nick, mn->owner->name); 119 snoop (_("EXPIRE: \2%s\2 from \2%s\2"), mn->nick, mn->owner->name);
120 slog (LG_REGISTER, "expire_check(): expiring nick %s (unused %ds, account %s)", mn->nick, NOW - mn->lastseen, mn->owner->name); 120 slog (LG_REGISTER, "expire_check(): expiring nick %s (unused %ds, account %s)", mn->nick, NOW - mn->lastseen, mn->owner->name);
121 object_unref (mn); 121 mn->refcnt_dec ();
122 } 122 }
123 } 123 }
124 } 124 }
125 125
126 if (chansvs.expiry != 0) 126 if (chansvs.expiry != 0)
127 { 127 {
128 foreach (mychan_pair &mp, mclist) 128 foreach (mychan_t::pair_type &mp, mychan_t::map)
129 { 129 {
130 mc = mp.second; 130 mc = mp.second;
131 if ((NOW - mc->used) >= 86400 - 3660) 131 if ((NOW - mc->used) >= 86400 - 3660)
132 { 132 {
133 /* keep last used time accurate to 133 /* keep last used time accurate to
177 mu->del_metadata ("private:alias:parent"); 177 mu->del_metadata ("private:alias:parent");
178 } 178 }
179 179
180 if (!nicksvs.no_nick_ownership) 180 if (!nicksvs.no_nick_ownership)
181 { 181 {
182 mn = mynick_find (mu->name); 182 mn = mynick_t::find (mu->name);
183 if (mn == NULL) 183 if (mn == NULL)
184 { 184 {
185 slog (LG_REGISTER, "db_check(): adding missing nick %s", mu->name); 185 slog (LG_REGISTER, "db_check(): adding missing nick %s", mu->name);
186 mn = mynick_add (mu, mu->name); 186 mn = mynick_t::create (mu, mu->name);
187 mn->registered = mu->registered; 187 mn->registered = mu->registered;
188 mn->lastseen = mu->lastlogin; 188 mn->lastseen = mu->lastlogin;
189 } 189 }
190 else if (mn->owner != mu) 190 else if (mn->owner != mu)
191 { 191 {
192 slog (LG_REGISTER, "db_check(): replacing nick %s owned by %s with %s", mn->nick, mn->owner->name, mu->name); 192 slog (LG_REGISTER, "db_check(): replacing nick %s owned by %s with %s", mn->nick, mn->owner->name, mu->name);
193 object_unref (mn); 193 mn->refcnt_dec ();
194 mn = mynick_add (mu, mu->name); 194 mn = mynick_t::create (mu, mu->name);
195 mn->registered = mu->registered; 195 mn->registered = mu->registered;
196 mn->lastseen = mu->lastlogin; 196 mn->lastseen = mu->lastlogin;
197 } 197 }
198 } 198 }
199 199

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines