This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Undernet IRC Server Source Code.".

The branch, u2_10_12_branch has been updated
       via  24532c5f9b69cc5e6da23fecb26463812f4c6d45 (commit)
       via  08320041f3927fcf3e39c27d0703a5e61d6b715b (commit)
       via  aba4e2b881113a2a40c08b95efba559985032848 (commit)
       via  f78fe068ae954f6d8ec0460731d66477f26a3551 (commit)
       via  d0757a13638e552cec13e3ecd3da8fb927b9fa12 (commit)
       via  5dc3f97ac66a7c9b0af116ee56f1ac3ff2fec763 (commit)
      from  6440220c73454f03fb9fe02b3585d4ccdb4603f7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 24532c5f9b69cc5e6da23fecb26463812f4c6d45
Merge: 08320041 f78fe068
Author: Michael Poole <[email protected]>
Date:   Sat Nov 30 17:37:11 2024 -0500

    Merge pull request #44 from MrIron-no/invite-notify
    
    Added support for the invite-notify capability.

commit 08320041f3927fcf3e39c27d0703a5e61d6b715b
Merge: aba4e2b8 d0757a13
Author: Michael Poole <[email protected]>
Date:   Sat Nov 30 17:37:01 2024 -0500

    Merge pull request #43 from MrIron-no/topicwho
    
    Bursting of topics

commit aba4e2b881113a2a40c08b95efba559985032848
Merge: 6440220c 5dc3f97a
Author: Michael Poole <[email protected]>
Date:   Sat Nov 30 17:36:49 2024 -0500

    Merge pull request #42 from MrIron-no/iauth-patch
    
    Fix that caused trust_username in iauth-class not working.

commit f78fe068ae954f6d8ec0460731d66477f26a3551
Author: MrIron-no <[email protected]>
Date:   Tue Nov 26 12:14:32 2024 +0100

    Added support for the invite-notify capability.

diff --git a/doc/example.conf b/doc/example.conf
index 95432e98..03fc98f9 100644
--- a/doc/example.conf
+++ b/doc/example.conf
@@ -918,6 +918,7 @@ features
 #  "CAP_CHGHOST" = "TRUE";
 #  "CAP_ECHOMESSAGE" = "TRUE";
 #  "CAP_EXTJOIN" = "TRUE";
+#  "CAP_INVITENOTIFY" = "TRUE";
 #  These were introduced by Undernet CFV-165 to add "Head-In-Sand" (HIS)
 #  behavior to hide most network topology from users.
 #  "HIS_SNOTICES" = "TRUE";
diff --git a/include/capab.h b/include/capab.h
index 85cd50e4..ee253206 100644
--- a/include/capab.h
+++ b/include/capab.h
@@ -41,7 +41,8 @@
        _CAP(AWAYNOTIFY, FEAT_CAP_AWAYNOTIFY, 0 , "away-notify"), \
        _CAP(CHGHOST, FEAT_CAP_CHGHOST, 0, "chghost"), \
        _CAP(ECHOMESSAGE, FEAT_CAP_ECHOMESSAGE, 0, "echo-message"), \
-       _CAP(EXTJOIN, FEAT_CAP_EXTJOIN, 0, "extended-join")
+       _CAP(EXTJOIN, FEAT_CAP_EXTJOIN, 0, "extended-join"), \
+       _CAP(INVITENOTIFY, FEAT_CAP_INVITENOTIFY, 0, "invite-notify")
 
 /** Client capabilities */
 enum Capab {
diff --git a/include/ircd_features.h b/include/ircd_features.h
index 29aea3e7..84516d09 100644
--- a/include/ircd_features.h
+++ b/include/ircd_features.h
@@ -108,6 +108,7 @@ enum Feature {
   FEAT_CAP_CHGHOST,
   FEAT_CAP_ECHOMESSAGE,
   FEAT_CAP_EXTJOIN,
+  FEAT_CAP_INVITENOTIFY,
 
   /* HEAD_IN_SAND Features */
   FEAT_HIS_SNOTICES,
diff --git a/ircd/ircd_features.c b/ircd/ircd_features.c
index bb92287c..0aa262a4 100644
--- a/ircd/ircd_features.c
+++ b/ircd/ircd_features.c
@@ -373,6 +373,7 @@ static struct FeatureDesc {
   F_B(CAP_CHGHOST, 0, 1, 0),
   F_B(CAP_ECHOMESSAGE, 0, 1, 0),
   F_B(CAP_EXTJOIN, 0, 1, 0),
+  F_B(CAP_INVITENOTIFY, 0, 1, 0),
 
   /* HEAD_IN_SAND Features */
   F_B(HIS_SNOTICES, 0, 1, 0),
diff --git a/ircd/m_invite.c b/ircd/m_invite.c
index 9a40498a..33d4d691 100644
--- a/ircd/m_invite.c
+++ b/ircd/m_invite.c
@@ -119,8 +119,8 @@ int m_invite(struct Client* cptr, struct Client* sptr, int 
parc, char* parv[])
 {
   struct Client *acptr;
   struct Channel *chptr;
-  
-  if (parc < 2 ) { 
+
+  if (parc < 2 ) {
     /*
      * list the channels you have an invite to.
      */
@@ -130,7 +130,7 @@ int m_invite(struct Client* cptr, struct Client* sptr, int 
parc, char* parv[])
     send_reply(cptr, RPL_ENDOFINVITELIST);
     return 0;
   }
-  
+
   if (parc < 3 || EmptyString(parv[2]))
     return need_more_params(sptr, "INVITE");
 
@@ -183,12 +183,22 @@ int m_invite(struct Client* cptr, struct Client* sptr, 
int parc, char* parv[])
   }
 
   if (!IsLocalChannel(chptr->chname) || MyConnect(acptr)) {
+    /*
+     * Announce to channel operators with CAP_INVITENOTIFY enabled.
+     * We do this irrespective of whether FEAT_ANNOUNCE_INVITES is enabled.
+     */
+    sendcmdto_capflag_channel_butserv_butone(sptr, CMD_INVITE,
+                                             chptr, sptr, SKIP_NONOPS,
+                                             CAP_INVITENOTIFY, _CAP_LAST_CAP,
+                                             "%C %H", acptr, chptr);
+
     if (feature_bool(FEAT_ANNOUNCE_INVITES)) {
-      /* Announce to channel operators. */
-      sendcmdto_channel_butserv_butone(&his, 
get_error_numeric(RPL_ISSUEDINVITE)->str,
-                                       NULL, chptr, sptr, SKIP_NONOPS,
-                                       "%H %C %C :%C has been invited by %C",
-                                       chptr, acptr, sptr, acptr, sptr);
+      /* Announce to channel operators without CAP_INVITENOTIFY enabled. */
+      sendcmdto_capflag_channel_butserv_butone(&his, 
get_error_numeric(RPL_ISSUEDINVITE)->str,
+                                               NULL, chptr, sptr, SKIP_NONOPS,
+                                               _CAP_LAST_CAP, CAP_INVITENOTIFY,
+                                               "%H %C %C :%C has been invited 
by %C",
+                                               chptr, acptr, sptr, acptr, 
sptr);
       /* Announce to servers with channel operators. */
       sendcmdto_channel_servers_butone(sptr, NULL, TOK_INVITE, chptr, acptr, 
SKIP_NONOPS,
                                        "%s %H %Tu", cli_name(acptr),
@@ -224,11 +234,11 @@ int ms_invite(struct Client* cptr, struct Client* sptr, 
int parc, char* parv[])
   struct Client *acptr;
   struct Channel *chptr;
   time_t invite_ts;
-  
+
   if (IsServer(sptr)) {
     /*
      * this will blow up if we get an invite from a server
-     * we look for channel membership in sptr below. 
+     * we look for channel membership in sptr below.
      */
     return protocol_violation(sptr,"Server attempting to invite");
   }
@@ -287,12 +297,19 @@ int ms_invite(struct Client* cptr, struct Client* sptr, 
int parc, char* parv[])
                   chptr->creationtime);
   }
 
+  /* Announce to channel operators with CAP_NOTIFY enabled. */
+  sendcmdto_capflag_channel_butserv_butone(sptr, CMD_INVITE,
+                                           chptr, sptr, SKIP_NONOPS,
+                                           CAP_INVITENOTIFY, _CAP_LAST_CAP,
+                                           "%C %H", acptr, chptr);
+
   if (feature_bool(FEAT_ANNOUNCE_INVITES)) {
-    /* Announce to channel operators. */
-    sendcmdto_channel_butserv_butone(&his, 
get_error_numeric(RPL_ISSUEDINVITE)->str,
-                                     NULL, chptr, sptr, SKIP_NONOPS,
-                                     "%H %C %C :%C has been invited by %C",
-                                     chptr, acptr, sptr, acptr, sptr);
+    /* Announce to channel operators without CAP_NOTIFY enabled. */
+    sendcmdto_capflag_channel_butserv_butone(&his, 
get_error_numeric(RPL_ISSUEDINVITE)->str,
+                                             NULL, chptr, sptr, SKIP_NONOPS,
+                                             _CAP_LAST_CAP, CAP_INVITENOTIFY,
+                                             "%H %C %C :%C has been invited by 
%C",
+                                             chptr, acptr, sptr, acptr, sptr);
     /* Announce to servers with channel operators. */
     sendcmdto_channel_servers_butone(sptr, NULL, TOK_INVITE, chptr, acptr, 
SKIP_NONOPS,
                                      "%s %H %Tu", cli_name(acptr), chptr,
commit d0757a13638e552cec13e3ecd3da8fb927b9fa12
Author: MrIron-no <[email protected]>
Date:   Tue Nov 26 09:13:10 2024 +0100

    Bursting of topic who. Added TOPIC_BURST to example.conf and set to default.

diff --git a/doc/example.conf b/doc/example.conf
index 95432e98..2d9becb9 100644
--- a/doc/example.conf
+++ b/doc/example.conf
@@ -912,6 +912,7 @@ features
 # "OPLEVELS" = "FALSE";
 # "ZANNELS" = "FALSE";
 # "LOCAL_CHANNELS" = "TRUE";
+# "TOPIC_BURST" = "TRUE"
 # "ANNOUNCE_INVITES" = "FALSE";
 #  "CAP_ACCOUNTNOTIFY" = "TRUE";
 #  "CAP_AWAYNOTIFY" = "TRUE";
diff --git a/ircd/channel.c b/ircd/channel.c
index e5d88bb3..93e98c04 100644
--- a/ircd/channel.c
+++ b/ircd/channel.c
@@ -1108,8 +1108,9 @@ void send_channel_modes(struct Client *cptr, struct 
Channel *chptr)
   if (opped_members)
     MyFree(opped_members);
   if (feature_bool(FEAT_TOPIC_BURST) && (chptr->topic[0] != '\0'))
-      sendcmdto_one(&me, CMD_TOPIC, cptr, "%H %Tu %Tu :%s", chptr,
-                    chptr->creationtime, chptr->topic_time, chptr->topic);
+      sendcmdto_one(&me, CMD_TOPIC, cptr, "%H %Tu %Tu %s :%s", chptr,
+                    chptr->creationtime, chptr->topic_time, chptr->topic_nick,
+                    chptr->topic);
 }
 
 /** Canonify a mask.
diff --git a/ircd/ircd_features.c b/ircd/ircd_features.c
index bb92287c..aba44bfb 100644
--- a/ircd/ircd_features.c
+++ b/ircd/ircd_features.c
@@ -323,7 +323,7 @@ static struct FeatureDesc {
   F_B(OPLEVELS, 0, 0, 0),
   F_B(ZANNELS, 0, 0, 0),
   F_B(LOCAL_CHANNELS, 0, 1, 0),
-  F_B(TOPIC_BURST, 0, 0, 0),
+  F_B(TOPIC_BURST, 0, 1, 0),
   F_B(DISABLE_GLINES, 0, 0, 0),
   F_B(JOIN_TARGET, 0, 0, 0),
 
diff --git a/ircd/m_topic.c b/ircd/m_topic.c
index 86aa1815..045047cb 100644
--- a/ircd/m_topic.c
+++ b/ircd/m_topic.c
@@ -47,9 +47,10 @@
  * @param[in] chptr Channel to set topic on.
  * @param[in] topic New topic.
  * @param[in] ts Timestamp that topic was set (0 for current time).
+ * @param[in] who Nickname of the client who set the topic (only used during 
burst, otherwise 0).
  */
 static void do_settopic(struct Client *sptr, struct Client *cptr,
-                       struct Channel *chptr, char *topic, time_t ts)
+                       struct Channel *chptr, char *topic, time_t ts, char 
*who)
 {
    struct Client *from;
    int newtopic;
@@ -65,7 +66,7 @@ static void do_settopic(struct Client *sptr, struct Client 
*cptr,
    newtopic=ircd_strncmp(chptr->topic,topic,TOPICLEN)!=0;
    /* setting a topic */
    ircd_strncpy(chptr->topic, topic, TOPICLEN);
-   ircd_strncpy(chptr->topic_nick, cli_name(from), NICKLEN);
+   ircd_strncpy(chptr->topic_nick, who ? who : cli_name(from), NICKLEN);
    if (ts == 0) {
      ts = TStime();
      if (ts <= chptr->topic_time)
@@ -74,8 +75,8 @@ static void do_settopic(struct Client *sptr, struct Client 
*cptr,
    chptr->topic_time = ts;
    /* Fixed in 2.10.11: Don't propagate local topics */
    if (!IsLocalChannel(chptr->chname))
-     sendcmdto_serv_butone(sptr, CMD_TOPIC, cptr, "%H %Tu %Tu :%s", chptr,
-                          chptr->creationtime, chptr->topic_time, 
chptr->topic);
+     sendcmdto_serv_butone(sptr, CMD_TOPIC, cptr, "%H %Tu %Tu %s :%s", chptr,
+                          chptr->creationtime, chptr->topic_time, 
chptr->topic_nick, chptr->topic);
    if (newtopic)
    {
      struct Membership *member;
@@ -152,7 +153,7 @@ int m_topic(struct Client* cptr, struct Client* sptr, int 
parc, char* parv[])
     else if (!client_can_send_to_channel(sptr, chptr, 1))
       send_reply(sptr, ERR_CANNOTSENDTOCHAN, chptr->chname);
     else
-      do_settopic(sptr,cptr,chptr,topic,0);
+      do_settopic(sptr,cptr,chptr,topic,0,0);
   }
   return 0;
 }
@@ -173,7 +174,7 @@ int m_topic(struct Client* cptr, struct Client* sptr, int 
parc, char* parv[])
 int ms_topic(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 {
   struct Channel *chptr;
-  char *topic = 0, *name, *p = 0;
+  char *topic = 0, *name, *p = 0, *who = 0;
   time_t ts = 0;
 
   if (parc < 3)
@@ -206,7 +207,11 @@ int ms_topic(struct Client* cptr, struct Client* sptr, int 
parc, char* parv[])
     if (parc > 4 && (ts = atoi(parv[3])) && chptr->topic_time > ts)
       continue;
 
-    do_settopic(sptr,cptr,chptr,topic, ts);
+    /* Information about who set the topic */
+    if (parc > 5)
+      who = parv[4];
+
+    do_settopic(sptr,cptr,chptr,topic,ts,who);
   }
   return 0;
 }
commit 5dc3f97ac66a7c9b0af116ee56f1ac3ff2fec763
Author: MrIron-no <[email protected]>
Date:   Thu Nov 21 09:49:16 2024 +0100

    Fix that caused trust_username in iauth-class not working.

diff --git a/ircd/s_auth.c b/ircd/s_auth.c
index 5bb58f36..944436f1 100644
--- a/ircd/s_auth.c
+++ b/ircd/s_auth.c
@@ -372,7 +372,7 @@ static void iauth_notify(struct AuthRequest *auth, enum 
AuthRequestFlag flag)
   {
   case AR_AUTH_PENDING:
     if (IAuthHas(iauth, IAUTH_UNDERNET))
-      sendto_iauth(sptr, "u %s", cli_username(sptr));
+      sendto_iauth(sptr, "u %s", cli_user(sptr)->username);
     break;
 
   case AR_DNS_PENDING:
-----------------------------------------------------------------------

Summary of changes:
 doc/example.conf        |  2 ++
 include/capab.h         |  3 ++-
 include/ircd_features.h |  1 +
 ircd/channel.c          |  5 +++--
 ircd/ircd_features.c    |  3 ++-
 ircd/m_invite.c         | 47 ++++++++++++++++++++++++++++++++---------------
 ircd/m_topic.c          | 19 ++++++++++++-------
 ircd/s_auth.c           |  2 +-
 8 files changed, 55 insertions(+), 27 deletions(-)


hooks/post-receive
-- 
Undernet IRC Server Source Code.

To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].

Reply via email to