mirror of
https://github.com/osmarks/ngircd.git
synced 2024-12-12 09:50:29 +00:00
New global function Conn_SetOption().
This commit is contained in:
parent
13f1d57e84
commit
a5735f68d7
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* ngIRCd -- The Next Generation IRC Daemon
|
* ngIRCd -- The Next Generation IRC Daemon
|
||||||
* Copyright (c)2001,2002 by Alexander Barton (alex@barton.de)
|
* Copyright (c)2001-2008 Alexander Barton (alex@barton.de)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -175,6 +175,17 @@ Conn_Options( CONN_ID Idx )
|
|||||||
} /* Conn_Options */
|
} /* Conn_Options */
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set connection option.
|
||||||
|
*/
|
||||||
|
GLOBAL void
|
||||||
|
Conn_SetOption(CONN_ID Idx, int Option)
|
||||||
|
{
|
||||||
|
assert(Idx > NONE);
|
||||||
|
Conn_OPTION_ADD(&My_Connections[Idx], Option);
|
||||||
|
} /* Conn_SetOption */
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the start time of the connection.
|
* Get the start time of the connection.
|
||||||
* The result is the start time in seconds since 1970-01-01, as reported
|
* The result is the start time in seconds since 1970-01-01, as reported
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* ngIRCd -- The Next Generation IRC Daemon
|
* ngIRCd -- The Next Generation IRC Daemon
|
||||||
* Copyright (c)2001,2002 by Alexander Barton (alex@barton.de)
|
* Copyright (c)2001-2008 Alexander Barton (alex@barton.de)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -8,8 +8,6 @@
|
|||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
* Please read the file COPYING, README and AUTHORS for more information.
|
* Please read the file COPYING, README and AUTHORS for more information.
|
||||||
*
|
*
|
||||||
* $Id: conn-func.h,v 1.7 2007/10/04 15:03:56 alex Exp $
|
|
||||||
*
|
|
||||||
* Connection management: Global functions (header)
|
* Connection management: Global functions (header)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -23,6 +21,10 @@
|
|||||||
* include this conn-func.h header. */
|
* include this conn-func.h header. */
|
||||||
#ifndef CONN_MODULE
|
#ifndef CONN_MODULE
|
||||||
#include "conn.h"
|
#include "conn.h"
|
||||||
|
#else
|
||||||
|
#define Conn_OPTION_ADD( x, opt ) ( (x)->options |= (opt) )
|
||||||
|
#define Conn_OPTION_DEL( x, opt ) ( (x)->options &= ~(opt) )
|
||||||
|
#define Conn_OPTION_ISSET( x, opt ) ( ((x)->options & (opt)) != 0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -49,14 +51,11 @@ GLOBAL CONN_ID Conn_First PARAMS(( void ));
|
|||||||
GLOBAL CONN_ID Conn_Next PARAMS(( CONN_ID Idx ));
|
GLOBAL CONN_ID Conn_Next PARAMS(( CONN_ID Idx ));
|
||||||
|
|
||||||
GLOBAL UINT16 Conn_Options PARAMS(( CONN_ID Idx ));
|
GLOBAL UINT16 Conn_Options PARAMS(( CONN_ID Idx ));
|
||||||
|
GLOBAL void Conn_SetOption PARAMS(( CONN_ID Idx, int Option ));
|
||||||
|
|
||||||
GLOBAL void Conn_ResetWCounter PARAMS(( void ));
|
GLOBAL void Conn_ResetWCounter PARAMS(( void ));
|
||||||
GLOBAL long Conn_WCounter PARAMS(( void ));
|
GLOBAL long Conn_WCounter PARAMS(( void ));
|
||||||
|
|
||||||
#define Conn_OPTION_ADD( x, opt ) ( (x)->options |= (opt) )
|
|
||||||
#define Conn_OPTION_DEL( x, opt ) ( (x)->options &= ~(opt) )
|
|
||||||
#define Conn_OPTION_ISSET( x, opt ) ( ((x)->options & (opt)) != 0)
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user