Committer  : entrope
CVSROOT    : /cvsroot/undernet-ircu
Module     : ircu2.10
Commit time: 2005-12-31 01:47:22 UTC

Modified files:
     ChangeLog RELEASE.NOTES configure ircd/convert-conf.c
     ircd/m_topic.c ircd/s_conf.c

Log message:

Pull changes forward from u2_10_12_branch.

---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.763 ircu2.10/ChangeLog:1.764
--- ircu2.10/ChangeLog:1.763    Fri Dec 30 05:33:14 2005
+++ ircu2.10/ChangeLog  Fri Dec 30 17:47:09 2005
@@ -1,5 +1,25 @@
 2005-12-30  Michael Poole <[EMAIL PROTECTED]>
 
+       * ircd/m_topic.c: Remove block comment about sptr, cptr, etc.
+       (do_settopic): Add doxygen comment. Move permissions checks..
+       (m_topic): .. to here.  Update doxygen comment.
+       (ms_topic): Update doxygen comment here too.
+
+2005-12-30  Michael Poole <[EMAIL PROTECTED]>
+
+       * ircd/s_conf.c (conf_debug_iline): Fix display of null passwords.
+
+2005-12-30  Michael Poole <[EMAIL PROTECTED]>
+
+       * RELEASE.NOTES: Mention removal of HIS_STATS_h.
+
+       * ircd/convert-conf.c (removed_features): Add AUTOHIDE,
+       HIS_DESYNCS and TIMESEC.
+       (get_connect): Do not downcase connection name on insert.
+       (do_feature): Do not upcase feature name (cf HIS_STATS_k).
+
+2005-12-30  Michael Poole <[EMAIL PROTECTED]>
+
        * ircd/engine_devpoll.c (engine_loop): Remove bogus assert.
 
 2005-12-31  Perry Lorier <[EMAIL PROTECTED]>
Index: ircu2.10/RELEASE.NOTES
diff -u ircu2.10/RELEASE.NOTES:1.22 ircu2.10/RELEASE.NOTES:1.23
--- ircu2.10/RELEASE.NOTES:1.22 Mon Sep 12 09:11:58 2005
+++ ircu2.10/RELEASE.NOTES      Fri Dec 30 17:47:09 2005
@@ -123,6 +123,8 @@
 Deleted features since they are now controlled by other configuration
 entries: VIRTUAL_HOST, oper and locop privilege features.
 
+Deleted feature since it no longer applies: HIS_STATS_h.
+
 Compile Time Options:
 
 A listing of supported compile-time options may be seen by running
Index: ircu2.10/configure
diff -u ircu2.10/configure:1.39 ircu2.10/configure:1.40
--- ircu2.10/configure:1.39     Thu Dec 29 14:13:34 2005
+++ ircu2.10/configure  Fri Dec 30 17:47:09 2005
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 1.1 .
+# From configure.ac Revision: 1.2 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.59 for Undernet IRC Daemon 10.13.alpha.0.
 #
Index: ircu2.10/ircd/convert-conf.c
diff -u ircu2.10/ircd/convert-conf.c:1.6 ircu2.10/ircd/convert-conf.c:1.7
--- ircu2.10/ircd/convert-conf.c:1.6    Fri Dec 30 03:06:09 2005
+++ ircu2.10/ircd/convert-conf.c        Fri Dec 30 17:47:12 2005
@@ -17,7 +17,7 @@
  * USA.
  */
 
-#include <ctype.h> /* tolower(), toupper(), isdigit() */
+#include <ctype.h> /* tolower() */
 #include <stdio.h> /* *printf(), fgets() */
 #include <stdlib.h> /* free(), strtol() */
 #include <string.h> /* strlen(), memcpy(), strchr(), strspn() */
@@ -30,7 +30,7 @@
     *general_names[] = { "name", "vhost", "description", "", "#numeric", 0 },
     *motd_names[] = { "host", "file", 0 },
     *class_names[] = { "name", "#pingfreq", "#connectfreq", "#maxlinks", 
"#sendq", 0 },
-    *removed_features[] = { "VIRTUAL_HOST", "OPERS_SEE_IN_SECRET_CHANNELS", 
"LOCOP_SEE_IN_SECRET_CHANNELS", 0 };
+    *removed_features[] = { "VIRTUAL_HOST", "TIMESEC", 
"OPERS_SEE_IN_SECRET_CHANNELS", "LOCOP_SEE_IN_SECRET_CHANNELS", "HIS_STATS_h", 
"HIS_DESYNCS", "AUTOHIDE", 0 };
 char orig_line[512], line[512], dbuf[512];
 char *fields[MAX_FIELDS + 1];
 unsigned int nfields;
@@ -159,7 +159,7 @@
     nlen = strlen(name);
     for (conn = connects; conn; conn = conn->next)
     {
-        for (ii = 0; tolower(name[ii]) == conn->name[ii] && ii < nlen; ++ii) ;
+        for (ii = 0; tolower(name[ii]) == tolower(conn->name[ii]) && ii < 
nlen; ++ii) ;
         if (conn->name[ii] == '\0' && name[ii] == '\0')
             break;
     }
@@ -169,7 +169,7 @@
     {
         conn = calloc(1, sizeof(*conn) + nlen);
         for (ii = 0; ii < nlen; ++ii)
-            conn->name[ii] = tolower(name[ii]);
+            conn->name[ii] = name[ii];
         conn->next = connects;
         connects = conn;
     }
@@ -310,7 +310,7 @@
     ii = strlen(fields[0]);
     feat = calloc(1, sizeof(*feat) + ii);
     while (ii-- > 0)
-        feat->name[ii] = toupper(fields[0][ii]);
+        feat->name[ii] = fields[0][ii];
     feat->next = features;
     features = feat;
     string_get(&feat->origins, orig_line);
@@ -609,9 +609,10 @@
             fputs(line, stdout);
             continue;
         }
-        /* Strip EOL character(s) and pass blank lines through. */
-        while (len > 0 && (line[len-1] == '\n' || line[len-1] == '\r'))
+        /* Strip trailing whitespace. */
+        while (len > 0 && isspace(line[len-1]))
             line[--len] = '\0';
+        /* Pass blank lines through. */
         if (len == 0) {
             fputc('\n', stdout);
             continue;
Index: ircu2.10/ircd/m_topic.c
diff -u ircu2.10/ircd/m_topic.c:1.21 ircu2.10/ircd/m_topic.c:1.22
--- ircu2.10/ircd/m_topic.c:1.21        Tue Aug 16 19:35:36 2005
+++ ircu2.10/ircd/m_topic.c     Fri Dec 30 17:47:12 2005
@@ -20,65 +20,9 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: m_topic.c,v 1.21 2005/08/17 02:35:36 entrope Exp $
+ * $Id: m_topic.c,v 1.22 2005/12/31 01:47:12 entrope Exp $
  */
 
-/*
- * m_functions execute protocol messages on this server:
- *
- *    cptr    is always NON-NULL, pointing to a *LOCAL* client
- *            structure (with an open socket connected!). This
- *            identifies the physical socket where the message
- *            originated (or which caused the m_function to be
- *            executed--some m_functions may call others...).
- *
- *    sptr    is the source of the message, defined by the
- *            prefix part of the message if present. If not
- *            or prefix not found, then sptr==cptr.
- *
- *            (!IsServer(cptr)) => (cptr == sptr), because
- *            prefixes are taken *only* from servers...
- *
- *            (IsServer(cptr))
- *                    (sptr == cptr) => the message didn't
- *                    have the prefix.
- *
- *                    (sptr != cptr && IsServer(sptr) means
- *                    the prefix specified servername. (?)
- *
- *                    (sptr != cptr && !IsServer(sptr) means
- *                    that message originated from a remote
- *                    user (not local).
- *
- *            combining
- *
- *            (!IsServer(sptr)) means that, sptr can safely
- *            taken as defining the target structure of the
- *            message in this server.
- *
- *    *Always* true (if 'parse' and others are working correct):
- *
- *    1)      sptr->from == cptr  (note: cptr->from == cptr)
- *
- *    2)      MyConnect(sptr) <=> sptr == cptr (e.g. sptr
- *            *cannot* be a local connection, unless it's
- *            actually cptr!). [MyConnect(x) should probably
- *            be defined as (x == x->from) --msa ]
- *
- *    parc    number of variable parameter strings (if zero,
- *            parv is allowed to be NULL)
- *
- *    parv    a NULL terminated list of parameter pointers,
- *
- *                    parv[0], sender (prefix string), if not present
- *                            this points to an empty string.
- *                    parv[1]...parv[parc-1]
- *                            pointers to additional parameters
- *                    parv[parc] == NULL, *always*
- *
- *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
- *                    non-NULL pointers.
- */
 #include "config.h"
 
 #include "channel.h"
@@ -97,7 +41,14 @@
 /* #include <assert.h> -- Now using assert in ircd_log.h */
 #include <stdlib.h> /* for atoi() */
 
-static void do_settopic(struct Client *sptr, struct Client *cptr, 
+/** Set a channel topic or report an error.
+ * @param[in] sptr Original topic setter.
+ * @param[in] cptr Neighbor that sent the topic message.
+ * @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).
+ */
+static void do_settopic(struct Client *sptr, struct Client *cptr,
                        struct Channel *chptr, char *topic, time_t ts)
 {
    struct Client *from;
@@ -107,21 +58,6 @@
        from = &his;
    else
        from = sptr;
-   if (IsChannelService(sptr))
-   {
-       /* allow off-channel services to set the topic of any channel */
-   }
-   else if ((chptr->mode.mode & MODE_TOPICLIMIT) && !is_chan_op(sptr, chptr))
-   {
-      /* if +t and not @'d, return an error and ignore the topic */
-      send_reply(sptr, ERR_CHANOPRIVSNEEDED, chptr->chname);
-      return;
-   }
-   else if (!client_can_send_to_channel(sptr, chptr, 1))
-   {
-      send_reply(sptr, ERR_CANNOTSENDTOCHAN, chptr->chname);
-      return;
-   }
    /* Note if this is just a refresh of an old topic, and don't
     * send it to all the clients to save bandwidth.  We still send
     * it to other servers as they may have split and lost the topic.
@@ -143,15 +79,20 @@
        * it to everyone else on the channel to save bandwidth
        */
     else if (MyUser(sptr))
-      sendcmdto_one(sptr, CMD_TOPIC, sptr, "%H :%s", chptr, chptr->topic);     
+      sendcmdto_one(sptr, CMD_TOPIC, sptr, "%H :%s", chptr, chptr->topic);
 }
 
-/*
- * m_topic - generic message handler
+/** Handle a local user's attempt to get or set a channel topic.
  *
- * parv[0]        = sender prefix
- * parv[1]        = channel
- * parv[parc - 1] = topic (if parc > 2)
+ * \a parv has the following elements:
+ * \li \a parv[1] is the channel name
+ * \li \a parv[\a parc - 1] is the topic (if \a parc > 2)
+ *
+ * See @ref m_functions for discussion of the arguments.
+ * @param[in] cptr Client that sent us the message.
+ * @param[in] sptr Original source of message.
+ * @param[in] parc Number of arguments.
+ * @param[in] parv Argument vector.
  */
 int m_topic(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 {
@@ -192,20 +133,28 @@
                   chptr->topic_time);
       }
     }
-    else 
+    else if ((chptr->mode.mode & MODE_TOPICLIMIT) && !is_chan_op(sptr, chptr))
+      send_reply(sptr, ERR_CHANOPRIVSNEEDED, chptr->chname);
+    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);
   }
   return 0;
 }
 
-/*
- * ms_topic - server message handler
- *
- * parv[0]        = sender prefix
- * parv[1]        = channel
- * parv[2]        = channel timestamp (optional)
- * parv[3]        = topic timestamp (optional)
- * parv[parc - 1] = topic
+/** Handle a remote user's attempt to set a channel topic.
+ * \a parv has the following elements:
+ * \li \a parv[1] is the channel name
+ * \li \a parv[2] is the channel creation timestamp (optional)
+ * \li \a parv[2] is the topic's timestamp (optional)
+ * \li \a parv[\a parc - 1] is the topic
+ *
+ * See @ref m_functions for discussion of the arguments.
+ * @param[in] cptr Client that sent us the message.
+ * @param[in] sptr Original source of message.
+ * @param[in] parc Number of arguments.
+ * @param[in] parv Argument vector.
  */
 int ms_topic(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 {
Index: ircu2.10/ircd/s_conf.c
diff -u ircu2.10/ircd/s_conf.c:1.83 ircu2.10/ircd/s_conf.c:1.84
--- ircu2.10/ircd/s_conf.c:1.83 Wed Dec 28 20:55:16 2005
+++ ircu2.10/ircd/s_conf.c      Fri Dec 30 17:47:12 2005
@@ -19,7 +19,7 @@
  */
 /** @file
  * @brief ircd configuration file driver
- * @version $Id: s_conf.c,v 1.83 2005/12/29 04:55:16 entrope Exp $
+ * @version $Id: s_conf.c,v 1.84 2005/12/31 01:47:12 entrope Exp $
  */
 #include "config.h"
 
@@ -481,7 +481,8 @@
             (aconf->username ? aconf->username : "(null)"),
             (aconf->host ? aconf->host : "(null)"),
             (aconf->name ? aconf->name : "(null)"),
-            ConfClass(aconf), aconf->maximum,  aconf->passwd);
+            ConfClass(aconf), aconf->maximum,
+            (aconf->passwd ? aconf->passwd : "(null)"));
     break;
   }
 
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches

Reply via email to