about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2015-03-14 11:13:50 +0100
committerAlexander Barton <alex@barton.de>2015-03-14 11:13:50 +0100
commit6171beb7ab5dc0586581660852576f437470df63 (patch)
tree3545b57cf71a408909debd3ef25a85b4b7ebf351
parent2196e945e4ac5f41d6650c4ceb9120cfd8fc8d56 (diff)
downloadngircd-6171beb7ab5dc0586581660852576f437470df63.tar.gz
ngircd-6171beb7ab5dc0586581660852576f437470df63.zip
Don't send nick name as default PART reason
No other IRC daemon seems to do this (today?), don't remember why
ngIRCd did it in the first place ...

Closes #185.

Reported by Cahata in #ngircd, thanks!
-rw-r--r--src/ngircd/irc-channel.c4
-rw-r--r--src/testsuite/channel-test.e8
-rw-r--r--src/testsuite/invite-test.e2
-rw-r--r--src/testsuite/who-test.e2
4 files changed, 8 insertions, 8 deletions
diff --git a/src/ngircd/irc-channel.c b/src/ngircd/irc-channel.c
index c142243a..aa4abe3d 100644
--- a/src/ngircd/irc-channel.c
+++ b/src/ngircd/irc-channel.c
@@ -1,6 +1,6 @@
 /*
  * ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
+ * Copyright (c)2001-2015 Alexander Barton (alex@barton.de) and Contributors.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -448,7 +448,7 @@ IRC_PART(CLIENT * Client, REQUEST * Req)
 
 	while (chan) {
 		Channel_Part(target, Client, chan,
-			     Req->argc > 1 ? Req->argv[1] : Client_ID(target));
+			     Req->argc > 1 ? Req->argv[1] : "");
 		chan = strtok(NULL, ",");
 	}
 
diff --git a/src/testsuite/channel-test.e b/src/testsuite/channel-test.e
index 39ad16a9..f65c5196 100644
--- a/src/testsuite/channel-test.e
+++ b/src/testsuite/channel-test.e
@@ -64,10 +64,10 @@ expect {
 	"323 nick :End of LIST"
 }
 
-send "part #channel\r"
+send "part #channel :bye bye\r"
 expect {
 	timeout { exit 1 }
-	"@* PART #channel :nick"
+	"@* PART #channel :bye bye"
 }
 
 send "join #channel\r"
@@ -93,11 +93,11 @@ expect {
 send "join 0\r"
 expect {
 	timeout { exit 1 }
-	"@* PART #channel2 :nick"
+	"@* PART #channel2 :"
 }
 expect {
 	timeout { exit 1 }
-	"@* PART #channel :nick"
+	"@* PART #channel :"
 }
 
 send "quit\r"
diff --git a/src/testsuite/invite-test.e b/src/testsuite/invite-test.e
index 5179d8a7..b9e0c3f9 100644
--- a/src/testsuite/invite-test.e
+++ b/src/testsuite/invite-test.e
@@ -82,7 +82,7 @@ expect {
 send "part #channel\r"
 expect {
 	timeout { exit 1}
-	-re "PART #channel :?nick"
+	"@* PART #channel :"
 }
 
 send "invite nick :parameter with spaces\r"
diff --git a/src/testsuite/who-test.e b/src/testsuite/who-test.e
index 39d50ede..39e3a2f1 100644
--- a/src/testsuite/who-test.e
+++ b/src/testsuite/who-test.e
@@ -89,7 +89,7 @@ expect {
 send "part #channel\r"
 expect {
 	timeout { exit 1 }
-	"@* PART #channel :nick"
+	"@* PART #channel :"
 }
 
 send "who Real?Name\r"