Commit 5e15fb01 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(async_new_user_area): New function.

parent 1ed0530a
/*
* $Id: send-async.c,v 0.40 2002/08/10 18:17:04 ceder Exp $
* $Id: send-async.c,v 0.41 2003/01/06 13:10:05 ceder Exp $
* Copyright (C) 1991, 1993-2002 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -534,6 +534,46 @@ async_new_membership(struct connection *cptr,
}
}
void
async_new_user_area(Pers_no person,
Text_no old_user_area,
Text_no new_user_area)
{
Connection *cptr;
Session_no i = 0;
if (!param.send_async_messages)
return;
while ((i = traverse_connections(i)) != 0)
{
cptr = get_conn_by_number(i);
switch(cptr->protocol)
{
case 0:
/* No protocol specified yet */
break;
case 'A':
/* Check that connection is logged on and allowed to see
the user-area of PERSON. Check the want_async here
to avoid the potentially expensive call to access_perm. */
if (cptr->username_valid == TRUE
&& cptr->want_async[ay_new_user_area] == TRUE
&& access_perm(person, cptr, unlimited) == unlimited)
{
prot_a_async_new_user_area(cptr, person, old_user_area,
new_user_area);
}
break;
default:
restart_kom("async_new_user_area(): bad protocol.\n");
break;
}
}
}
#ifdef DEBUG_CALLS
void
async_garb_ended(int no_deleted)
......
/*
* $Id: send-async.h,v 0.18 2002/03/29 22:38:03 ceder Exp $
* $Id: send-async.h,v 0.19 2003/01/06 13:10:02 ceder Exp $
* Copyright (C) 1991, 1994-1999, 2001-2002 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -23,7 +23,7 @@
* Please mail bug reports to bug-lyskom@lysator.liu.se.
*/
/*
* $Id: send-async.h,v 0.18 2002/03/29 22:38:03 ceder Exp $
* $Id: send-async.h,v 0.19 2003/01/06 13:10:02 ceder Exp $
*
*/
extern void
......@@ -99,6 +99,11 @@ async_new_membership(struct connection *cptr,
Pers_no pers_no,
Conf_no conf_no);
void
async_new_user_area(Pers_no person,
Text_no old_user_area,
Text_no new_user_area);
#ifdef DEBUG_CALLS
void
async_garb_ended(int no_deleted);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment