Module: ngircd.git
Branch: master
Commit: 02182143c30288b54cf84325c796ec9b7a7b2d34
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=02182143…
Author: Alexander Barton <alex(a)barton.de>
Date: Thu Sep 26 02:58:01 2013 +0200
Don't forward KILL commands for unknown clients
---
src/ngircd/irc.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/ngircd/irc.c b/src/ngircd/irc.c
index 74b8a01..ee7972c 100644
--- a/src/ngircd/irc.c
+++ b/src/ngircd/irc.c
@@ -346,18 +346,18 @@ IRC_KillClient(CLIENT *Client, CLIENT *From, const char *Nick, const char *Reaso
CONN_ID my_conn, conn;
CLIENT *c;
- /* Inform other servers */
- IRC_WriteStrServersPrefix(From ? Client : NULL,
- From ? From : Client_ThisServer(),
- "KILL %s :%s", Nick, Reason);
-
- /* Do we know such a client? */
+ /* Do we know such a client in the network? */
c = Client_Search(Nick);
if (!c) {
- LogDebug("Client with nick \"%s\" is unknown here.", Nick);
+ LogDebug("Client with nick \"%s\" is unknown, not forwaring.", Nick);
return CONNECTED;
}
+ /* Inform other servers */
+ IRC_WriteStrServersPrefix(From ? Client : NULL,
+ From ? From : Client_ThisServer(),
+ "KILL %s :%s", Nick, Reason);
+
if (Client_Type(c) != CLIENT_USER && Client_Type(c) != CLIENT_GOTNICK) {
/* Target of this KILL is not a regular user, this is
* invalid! So we ignore this case if we received a
Module: ngircd.git
Branch: master
Commit: b5faf3055b61afaef73ac49a448cac1a5b063127
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=b5faf305…
Author: Alexander Barton <alex(a)barton.de>
Date: Tue Oct 1 12:13:17 2013 +0200
New function IRC_KillClient() to kill clients
The old local function Kill_Nick() in irc.c has been an ugly hack. This
patch implements a generic function for killing clients.
Adjust all callers of Kill_Nick() and respect the return code!
---
src/ngircd/irc-login.c | 66 ++++++++---------------
src/ngircd/irc.c | 135 ++++++++++++++++++++++++++++--------------------
src/ngircd/irc.h | 5 +-
3 files changed, 105 insertions(+), 101 deletions(-)
Diff: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commitdiff;h=b5fa…