diff options
| author | Alexander Barton <alex@barton.de> | 2011-12-25 19:12:40 +0100 |
|---|---|---|
| committer | Alexander Barton <alex@barton.de> | 2011-12-25 19:12:40 +0100 |
| commit | 164e15b8c6eb86d4ae640d64a849945e0b4395b0 (patch) | |
| tree | 5ad309b5ad3f8420e06fde08234d83b9d95adef7 /src | |
| parent | 32bfafafd9e90f9e224bf95e4f2512cea729aac1 (diff) | |
| download | ngircd-164e15b8c6eb86d4ae640d64a849945e0b4395b0.tar.gz ngircd-164e15b8c6eb86d4ae640d64a849945e0b4395b0.zip | |
Synchronize G-Lines on server login
Diffstat (limited to 'src')
| -rw-r--r-- | src/ngircd/numeric.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/ngircd/numeric.c b/src/ngircd/numeric.c index ba6c0254..0440768c 100644 --- a/src/ngircd/numeric.c +++ b/src/ngircd/numeric.c @@ -28,6 +28,7 @@ #include "conn.h" #include "conn-func.h" #include "channel.h" +#include "class.h" #include "irc-write.h" #include "lists.h" #include "log.h" @@ -194,8 +195,10 @@ Announce_User(CLIENT * Client, CLIENT * User) #ifdef IRCPLUS /** - * Synchronize invite and ban lists between servers - * @param Client New server + * Synchronize invite, ban, G- and K-Line lists between servers. + * + * @param Client New server. + * @return CONNECTED or DISCONNECTED. */ static bool Synchronize_Lists(CLIENT * Client) @@ -206,6 +209,18 @@ Synchronize_Lists(CLIENT * Client) 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(); while (c) { /* ban list */ |