repo: ngircd
action: commit
revision: 
path_from: 
revision_from: 997321418537cb526b69a59e05bb3a12515de15f:
path_to: 
revision_to: 
git.thebackupbox.net
ngircd
git clone git://git.thebackupbox.net/ngircd
commit 997321418537cb526b69a59e05bb3a12515de15f
Merge: ddc3ad05 9540d0c0
Author: 9pfs <9pfs@amcforum.wiki>
Date:   Tue Dec 5 02:40:56 2023 -0600

    Fix issues from me procrastinating

diff --cc src/ngircd/irc-channel.c
index 928ee9011b19da1f55d58b4d7831da009e07f348,a1bb4ef597f930387ede37c4a3d8d007b8fe19e1..0566eae1bb58e29a7ac291a227cd83d52f16afbc
--- a/src/ngircd/irc-channel.c
+++ b/src/ngircd/irc-channel.c
@@@ -280,36 -248,18 +280,32 @@@ join_forward(CLIENT *Client, CLIENT *ta
  } /* join_forward */

  /**
-  * Acknowledge user JOIN request and send "channel info" numerics.
+  * Send channel TOPIC and NAMES list to a newly (N)JOIN'ed client.
   *
-  * @param Client	Client used to prefix the genrated commands
-  * @param target	Forward commands/numerics to this user
-  * @param chan		Channel structure
-  * @param channame	Channel name
+  * @param Client	Client used to prefix the generated commands
+  * @param Chan		Channel structure
   */
- static bool
- join_send_topic(CLIENT *Client, CLIENT *target, CHANNEL *chan,
- 					const char *channame)
+ GLOBAL bool
+ IRC_Send_Channel_Info(CLIENT *Client, CHANNEL *Chan)
  {
  	const char *topic;
--
 +	if (Client_Type(Client) != CLIENT_USER)
 +		return true;
 +	/* acknowledge join */
 +	CONN_ID conn;
 +	conn = Client_Conn(Client);
 +	if(Client_Cap(Client) & CLIENT_CAP_EXTENDED_JOIN) {
 +		char * account_name;
 +		if(Client_AccountName(Client))
 +			account_name = Client_AccountName(Client);
 +		else
 +			account_name = "*";
- 		Conn_WriteStr(conn, ":%s JOIN %s %s :%s", Client_MaskCloaked(Client), channame, account_name, Client_Info(Client));
++		Conn_WriteStr(conn, ":%s JOIN %s %s :%s", Client_MaskCloaked(Client), Channel_Name(Chan), account_name, Client_Info(Client));
 +	}
 +	else
- 		Conn_WriteStr(conn, ":%s JOIN %s", Client_MaskCloaked(Client), channame);
- 	/* Send topic to client, if any */
- 	topic = Channel_Topic(chan);
++		Conn_WriteStr(conn, ":%s JOIN %s", Client_MaskCloaked(Client), Channel_Name(Chan));
+ 	/* Send the topic (if any) to the new client: */
+ 	topic = Channel_Topic(Chan);
  	assert(topic != NULL);
  	if (*topic) {
  		if (!IRC_WriteStrClient(Client, RPL_TOPIC_MSG,

-----END OF PAGE-----