… | |
… | |
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: services.C,v 1.8 2007/09/05 11:23:15 pippijn Exp $"; |
8 | static char const rcsid[] = "$Id: services.C,v 1.9 2007/09/09 20:05:52 pippijn Exp $"; |
9 | |
9 | |
10 | #include <boost/foreach.hpp> |
10 | #include <boost/foreach.hpp> |
11 | |
11 | |
12 | #include "atheme.h" |
12 | #include "atheme.h" |
|
|
13 | #include "servers.h" |
13 | #include <account/myuser.h> |
14 | #include <account/myuser.h> |
14 | #include <account/mynick.h> |
15 | #include <account/mynick.h> |
15 | #include <account/mychan.h> |
16 | #include <account/mychan.h> |
16 | #include "pmodule.h" |
17 | #include "pmodule.h" |
17 | |
18 | |
… | |
… | |
297 | |
298 | |
298 | /* Also don't send it if they came back from a split -- jilles */ |
299 | /* Also don't send it if they came back from a split -- jilles */ |
299 | if (!(u->server->flags & SF_EOB)) |
300 | if (!(u->server->flags & SF_EOB)) |
300 | u->flags |= UF_SEENINFO; |
301 | u->flags |= UF_SEENINFO; |
301 | |
302 | |
302 | if (!(mn = mynick_find (u->nick))) |
303 | if (!(mn = mynick_t::find (u->nick))) |
303 | { |
304 | { |
304 | if (!nicksvs.spam) |
305 | if (!nicksvs.spam) |
305 | return; |
306 | return; |
306 | |
307 | |
307 | if (!(u->flags & UF_SEENINFO)) |
308 | if (!(u->flags & UF_SEENINFO)) |
… | |
… | |
352 | if (login != NULL) |
353 | if (login != NULL) |
353 | /* don't allow alias nicks here -- jilles */ |
354 | /* don't allow alias nicks here -- jilles */ |
354 | mu = myuser_t::find (login); |
355 | mu = myuser_t::find (login); |
355 | else |
356 | else |
356 | { |
357 | { |
357 | mn = mynick_find (u->nick); |
358 | mn = mynick_t::find (u->nick); |
358 | mu = mn != NULL ? mn->owner : NULL; |
359 | mu = mn != NULL ? mn->owner : NULL; |
359 | login = mu != NULL ? mu->name : u->nick; |
360 | login = mu != NULL ? mu->name : u->nick; |
360 | } |
361 | } |
361 | if (mu == NULL) |
362 | if (mu == NULL) |
362 | { |
363 | { |