wm: ircd

Download patch

ref: 96508828f62f51851ea9891f2fdad57b3d678874
parent: 359e8dd290b1dc8b5662312e0e79214fffdae362
author: mkf <mkf@cirno>
date: Tue Sep 26 21:55:45 EDT 2023

small changes on pass() and away()

--- a/ircd.c
+++ b/ircd.c
@@ -986,20 +986,13 @@
 	if(password == nil)
 		return 1;
 
-	if(c->passok)
-	{
-		dprint("here\n");
+	if(c->passok){
 		close(c->fd);
 		return 0;
-	}
-	else
-	{
-		if(strcmp(p, password) != 0)
-		{
+	}else{
+		if(strcmp(p, password) != 0){
 			close(c->fd);
-			dprint("pass: %s, p: %s\n", password, p);
-		}
-		else
+		}else
 			c->passok = 1;
 	}
 	return 1;
@@ -1013,8 +1006,7 @@
 	if(msg != nil && c->away == nil){
 		c->away = msg;
 		r.code = RPL_NOWAWAY;
-	}
-	else{
+	}else{
 		c->away = nil;
 		r.code = RPL_UNAWAY;
 	}