commit - 02182143c30288b54cf84325c796ec9b7a7b2d34
commit + 2798a12444bce91613388ceb7ab52d1e97787687
blob - 74f17cc0dec9343483ec7844e9b9570a83ba57c0
blob + 4ccc76a6d830fdc66ead9139ad316687ea2b050e
--- src/ngircd/irc-oper.c
+++ src/ngircd/irc-oper.c
#include "conf.h"
#include "channel.h"
#include "class.h"
+#include "parse.h"
+#include "irc.h"
#include "irc-macros.h"
#include "irc-write.h"
+#include "lists.h"
#include "log.h"
#include "match.h"
#include "messages.h"
-#include "parse.h"
#include "op.h"
#include <exp.h>
GLOBAL bool
IRC_xLINE(CLIENT *Client, REQUEST *Req)
{
- CLIENT *from;
+ CLIENT *from, *c, *c_next;
+ char reason[COMMAND_LEN], class_c;
+ struct list_head *list;
int class;
- char class_c;
assert(Client != NULL);
assert(Req != NULL);
Req->argv[0], Req->argv[1],
Req->argv[2]);
}
+
+ /* Check currently connected clients */
+ snprintf(reason, sizeof(reason), "%c-Line by \"%s\": \"%s\"",
+ class_c, Client_ID(from), Req->argv[2]);
+ list = Class_GetList(class);
+ c = Client_First();
+ while (c) {
+ c_next = Client_Next(c);
+ if ((class == CLASS_GLINE || Client_Conn(c) > NONE)
+ && Lists_Check(list, c))
+ IRC_KillClient(Client, NULL,
+ Client_ID(c), reason);
+ c = c_next;
+ }
}
}