mirror of
				https://github.com/osmarks/ngircd.git
				synced 2025-10-31 05:52:59 +00:00 
			
		
		
		
	Return ERR_NOTEXTTOSEND on empty PRIVMSG content
They are dropped further down the line anyway; and sending ERR_NOTEXTTOSEND early matches other servers' behavior.
This commit is contained in:
		 Valentin Lorentz
					Valentin Lorentz
				
			
				
					committed by
					
						 Alexander Barton
						Alexander Barton
					
				
			
			
				
	
			
			
			 Alexander Barton
						Alexander Barton
					
				
			
						parent
						
							445e559dbd
						
					
				
				
					commit
					0714466af8
				
			| @@ -572,6 +572,13 @@ Send_Message(CLIENT * Client, REQUEST * Req, int ForceType, bool SendErrors) | ||||
| #endif | ||||
| 		message = Req->argv[1]; | ||||
|  | ||||
| 	if (message[0] == '\0') { | ||||
| 		if (!SendErrors) | ||||
| 			return CONNECTED; | ||||
| 		return IRC_WriteErrClient(Client, ERR_NOTEXTTOSEND_MSG, | ||||
| 					  Client_ID(Client)); | ||||
| 	} | ||||
|  | ||||
| 	/* handle msgtarget = msgto *("," msgto) */ | ||||
| 	currentTarget = strtok_r(currentTarget, ",", &strtok_last); | ||||
| 	ngt_UpperStr(Req->command); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user