[svn] Move new_local_user hook, so it is possible to call
exit_client() from it, refusing the connection.
This commit is contained in:
parent
ec3fbdecd2
commit
e2b44358a2
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
jilles 2007/04/15 16:49:56 UTC (20070415-3412)
|
||||
Log:
|
||||
Only free PreClient struct when the rest of the Client
|
||||
is freed, not immediately upon exit_client(). Doing this
|
||||
would cause problems with sasl's new_local_user hook
|
||||
vs hooks that exit the client there.
|
||||
|
||||
|
||||
Changes: Modified:
|
||||
+0 -1 trunk/src/client.c (File Modified)
|
||||
|
||||
|
||||
jilles 2007/04/14 21:53:28 UTC (20070414-3410)
|
||||
Log:
|
||||
Use TS6 prefix for server-server JOIN 0.
|
||||
|
|
|
@ -98,7 +98,9 @@ The following hooks are called during various events related to clients.
|
|||
hdata->target = client being introduced
|
||||
|
||||
"new_local_user" - Sent just before introducing a new local user
|
||||
to the network.
|
||||
to the network. IsUnknown is still true for the
|
||||
client but everything else is set up; it is ok to
|
||||
call exit_client() to refuse the client.
|
||||
Passes struct Client, the client being introduced.
|
||||
|
||||
"new_remote_user" - Sent just before introducing a new remote user
|
||||
|
@ -119,4 +121,4 @@ community.
|
|||
"iorecv"
|
||||
"iorecvctrl"
|
||||
|
||||
$Id: hooks.txt 710 2006-02-06 03:10:01Z gxti $
|
||||
$Id: hooks.txt 3414 2007-04-15 16:54:50Z jilles $
|
||||
|
|
|
@ -1 +1 @@
|
|||
#define SERNO "20070414-3410"
|
||||
#define SERNO "20070415-3412"
|
||||
|
|
21
src/s_user.c
21
src/s_user.c
|
@ -21,7 +21,7 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
* USA
|
||||
*
|
||||
* $Id: s_user.c 3392 2007-04-05 00:24:47Z jilles $
|
||||
* $Id: s_user.c 3414 2007-04-15 16:54:50Z jilles $
|
||||
*/
|
||||
|
||||
#include "stdinc.h"
|
||||
|
@ -484,9 +484,18 @@ register_local_user(struct Client *client_p, struct Client *source_p, const char
|
|||
SetDynSpoof(source_p);
|
||||
}
|
||||
|
||||
if(IsAnyDead(client_p))
|
||||
source_p->umodes |= ConfigFileEntry.default_umodes & ~ConfigFileEntry.oper_only_umodes & ~orphaned_umodes;
|
||||
|
||||
call_hook(h_new_local_user, source_p);
|
||||
|
||||
/* If they have died in send_* or were thrown out by the
|
||||
* new_local_user hook don't do anything. */
|
||||
if(IsAnyDead(source_p))
|
||||
return CLIENT_EXITED;
|
||||
|
||||
/* To avoid inconsistencies, do not abort the registration
|
||||
* starting from this point -- jilles
|
||||
*/
|
||||
inetntop_sock((struct sockaddr *)&source_p->localClient->ip, ipaddr, sizeof(ipaddr));
|
||||
|
||||
sendto_realops_snomask(SNO_CCONN, L_ALL,
|
||||
|
@ -504,10 +513,6 @@ register_local_user(struct Client *client_p, struct Client *source_p, const char
|
|||
show_ip(NULL, source_p) ? source_p->localClient->fullcaps : "<hidden> <hidden>",
|
||||
source_p->info);
|
||||
|
||||
/* If they have died in send_* don't do anything. */
|
||||
if(IsAnyDead(source_p))
|
||||
return CLIENT_EXITED;
|
||||
|
||||
add_to_hostname_hash(source_p->orighost, source_p);
|
||||
|
||||
/* Allocate a UID if it was not previously allocated.
|
||||
|
@ -519,8 +524,6 @@ register_local_user(struct Client *client_p, struct Client *source_p, const char
|
|||
add_to_id_hash(source_p->id, source_p);
|
||||
}
|
||||
|
||||
source_p->umodes |= ConfigFileEntry.default_umodes & ~ConfigFileEntry.oper_only_umodes & ~orphaned_umodes;
|
||||
|
||||
if (source_p->umodes & UMODE_INVISIBLE)
|
||||
Count.invisi++;
|
||||
|
||||
|
@ -552,8 +555,6 @@ register_local_user(struct Client *client_p, struct Client *source_p, const char
|
|||
if(find_tgchange(source_p->sockhost))
|
||||
USED_TARGETS(source_p) = 6;
|
||||
|
||||
call_hook(h_new_local_user, source_p);
|
||||
|
||||
monitor_signon(source_p);
|
||||
user_welcome(source_p);
|
||||
|
||||
|
|
Loading…
Reference in New Issue