mirror of
https://github.com/osmarks/ngircd.git
synced 2025-10-12 13:17:39 +00:00
Synchronize G-Lines on server login
This commit is contained in:
@@ -28,6 +28,7 @@
|
|||||||
#include "conn.h"
|
#include "conn.h"
|
||||||
#include "conn-func.h"
|
#include "conn-func.h"
|
||||||
#include "channel.h"
|
#include "channel.h"
|
||||||
|
#include "class.h"
|
||||||
#include "irc-write.h"
|
#include "irc-write.h"
|
||||||
#include "lists.h"
|
#include "lists.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
@@ -194,8 +195,10 @@ Announce_User(CLIENT * Client, CLIENT * User)
|
|||||||
#ifdef IRCPLUS
|
#ifdef IRCPLUS
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Synchronize invite and ban lists between servers
|
* Synchronize invite, ban, G- and K-Line lists between servers.
|
||||||
* @param Client New server
|
*
|
||||||
|
* @param Client New server.
|
||||||
|
* @return CONNECTED or DISCONNECTED.
|
||||||
*/
|
*/
|
||||||
static bool
|
static bool
|
||||||
Synchronize_Lists(CLIENT * Client)
|
Synchronize_Lists(CLIENT * Client)
|
||||||
@@ -206,6 +209,18 @@ Synchronize_Lists(CLIENT * Client)
|
|||||||
|
|
||||||
assert(Client != NULL);
|
assert(Client != NULL);
|
||||||
|
|
||||||
|
/* g-lines */
|
||||||
|
head = Class_GetList(CLASS_GLINE);
|
||||||
|
elem = Lists_GetFirst(head);
|
||||||
|
while (elem) {
|
||||||
|
if (!IRC_WriteStrClient(Client, "GLINE %s %ld :%s",
|
||||||
|
Lists_GetMask(elem),
|
||||||
|
Lists_GetValidity(elem) - time(NULL),
|
||||||
|
Lists_GetReason(elem)))
|
||||||
|
return DISCONNECTED;
|
||||||
|
elem = Lists_GetNext(elem);
|
||||||
|
}
|
||||||
|
|
||||||
c = Channel_First();
|
c = Channel_First();
|
||||||
while (c) {
|
while (c) {
|
||||||
/* ban list */
|
/* ban list */
|
||||||
|
Reference in New Issue
Block a user