mirror of
				https://github.com/osmarks/ngircd.git
				synced 2025-10-30 13:32:59 +00:00 
			
		
		
		
	New function Conn_GetIPAInfo(): get IP address of a connection
This commit is contained in:
		| @@ -1226,6 +1226,20 @@ Conn_SyncServerStruct(void) | ||||
| } /* SyncServerStruct */ | ||||
|  | ||||
|  | ||||
| /** | ||||
|  * Get IP address string of a connection. | ||||
|  * | ||||
|  * @param Idx Connection index. | ||||
|  * @return Pointer to a global buffer containing the IP address as string. | ||||
|  */ | ||||
| GLOBAL const char * | ||||
| Conn_GetIPAInfo(CONN_ID Idx) | ||||
| { | ||||
| 	assert(Idx > NONE); | ||||
| 	return ng_ipaddr_tostr(&My_Connections[Idx].addr); | ||||
| } | ||||
|  | ||||
|  | ||||
| /** | ||||
|  * Send out data of write buffer; connect new sockets. | ||||
|  * | ||||
|   | ||||
| @@ -131,6 +131,8 @@ Conn_UsesSSL(UNUSED CONN_ID Idx) | ||||
| { return false; } | ||||
| #endif | ||||
|  | ||||
| GLOBAL const char *Conn_GetIPAInfo PARAMS((CONN_ID Idx)); | ||||
|  | ||||
| GLOBAL long Conn_Count PARAMS((void)); | ||||
| GLOBAL long Conn_CountMax PARAMS((void)); | ||||
| GLOBAL long Conn_CountAccepted PARAMS((void)); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Alexander Barton
					Alexander Barton