Commit 2dc8dc1a authored by David Byers's avatar David Byers
Browse files

(async_new_name): Check that connection is allowed to know name of conference

(async_send_group_message, async_send_message): Option to force message to user regardless of async message reception preferences
parent 32841e29
/*
* $Id: send-async.c,v 0.14 1995/11/02 21:49:00 ceder Exp $
* $Id: send-async.c,v 0.15 1996/06/14 15:36:29 byers Exp $
* Copyright (C) 1991, 1993, 1994, 1995 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -28,7 +28,7 @@
* Written by Per Cederqvist 1990-07-22--23
*/
static char *rcsid = "$Id: send-async.c,v 0.14 1995/11/02 21:49:00 ceder Exp $";
static char *rcsid = "$Id: send-async.c,v 0.15 1996/06/14 15:36:29 byers Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -46,12 +46,14 @@ USE(rcsid);
#include "com.h"
#include "connections.h"
#include "internal-connections.h"
#include "async.h"
#include "send-async.h"
#include "prot-a-send-async.h"
#include "lyskomd.h"
#include "log.h"
#include "param.h"
#include "ldifftime.h"
#include "manipulate.h"
void
async_new_text(struct connection *cptr,
......@@ -168,7 +170,12 @@ async_new_name(Conf_no conf_no,
case 'A':
/* Should check that cptr has enough privileges to know
anything about the conference. +++ */
prot_a_async_new_name(cptr, conf_no, old_name, new_name);
if (fast_access_perm(conf_no,
cptr->pers_no,
cptr->person) > none)
{
prot_a_async_new_name(cptr, conf_no, old_name, new_name);
}
break;
default:
......@@ -324,20 +331,27 @@ async_rejected_connection(void)
Success
async_send_message(Pers_no recipient,
Pers_no sender,
String message)
String message,
char force_message)
{
return async_send_group_message(recipient, recipient, sender, message);
return async_send_group_message(recipient,
recipient,
sender,
message,
force_message);
}
Success
async_send_group_message(Pers_no recipient,
Conf_no group_recipient,
Pers_no sender,
String message)
String message,
char force_message)
{
Connection *cptr;
Session_no i = 0;
Success retval = FAILURE;
int tmp;
if (!param.send_async_messages)
return FAILURE;
......@@ -360,8 +374,15 @@ async_send_group_message(Pers_no recipient,
if ( recipient == 0 ||
(recipient == cptr->pers_no && recipient != 0 ))
{
if (force_message)
{
tmp = cptr->want_async[ay_send_message];
cptr->want_async[ay_send_message] = 1;
}
prot_a_async_send_message(cptr, group_recipient,
sender, message);
if (force_message)
cptr->want_async[ay_send_message] = tmp;
retval = OK;
}
break;
......
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