]> jfr.im git - irc/quakenet/snircd.git/commitdiff
merge http://hg.quakenet.org/snircd/rev/bce35dfd534f
authorpaul <redacted>
Sun, 21 Oct 2007 22:41:13 +0000 (22:41 +0000)
committerpaul <redacted>
Sun, 21 Oct 2007 22:41:13 +0000 (22:41 +0000)
include/supported.h
ircd/ircd_features.c
ircd/ircd_parser.y
ircd/listener.c
ircd/m_admin.c
ircd/m_connect.c
ircd/m_privs.c
ircd/m_version.c
ircd/parse.c
ircd/s_err.c

index 347fe46ff3fa930e939c3bbff970e213ef58a718..38d87ebd982ff08e2b323b842bd0995ef7cce329 100644 (file)
@@ -16,7 +16,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: supported.h,v 1.20.2.1 2007/01/23 01:57:56 entrope Exp $
+ * $Id: supported.h,v 1.20.2.2 2007/05/20 13:02:51 entrope Exp $
  *
  * Description: This file has the featureset that ircu announces on connecting
  *              a client.  It's in this .h because it's likely to be appended
@@ -45,7 +45,7 @@
                 " NICKLEN=%i"
                 
 
-#define FEATURES2 " MAXNICKLEN=%i" \
+#define FEATURES2 "MAXNICKLEN=%i" \
                 " TOPICLEN=%i" \
                 " AWAYLEN=%i" \
                 " KICKLEN=%i" \
index ce81aba4b204bc6b7b4352dc5e66e62a1afd0feb..ffb14a5a2c340c7a7df83daa9b6238d8343efe1a 100644 (file)
@@ -605,6 +605,9 @@ feature_set(struct Client* from, const char* const* fields, int count)
 
     if (change && feat->notify) /* call change notify function */
       (*feat->notify)();
+
+    if (from)
+      return feature_get(from, fields, count);
   }
 
   return 0;
@@ -668,6 +671,9 @@ feature_reset(struct Client* from, const char* const* fields, int count)
 
     if (change && feat->notify) /* call change notify function */
       (*feat->notify)();
+
+    if (from)
+      return feature_get(from, fields, count);
   }
 
   return 0;
index 9b4c3fb2a48b400a719378970e1644942956903e..98f67e6f5b25ffee59d5cef50fb826e7f220b358 100644 (file)
@@ -1048,6 +1048,8 @@ pseudoitems '}' ';'
     parse_error("Missing name in pseudo %s block", smap->command);
   else if (!smap->services)
     parse_error("Missing nick in pseudo %s block", smap->command);
+  else if (!strIsAlpha(smap->command))
+    parse_error("Pseudo command %s invalid: must all be letters", smap->command);
   else
     valid = 1;
   if (valid && register_mapping(smap))
index b638b88bc832f84b89d36f3d1e83a75d590b1636..cfa833c52a10fa30fe2c1ea8bbe604d977605a7e 100644 (file)
@@ -18,7 +18,7 @@
  */
 /** @file
  * @brief Implementation for handling listening sockets.
- * @version $Id: listener.c,v 1.28.2.5 2007/03/18 02:33:01 entrope Exp $
+ * @version $Id: listener.c,v 1.28.2.6 2007/05/20 14:10:30 entrope Exp $
  */
 #include "config.h"
 
@@ -147,8 +147,12 @@ void show_ports(struct Client* sptr, const struct StatDesc* sd,
       continue;
     len = 0;
     flags[len++] = listener_server(listener) ? 'S' : 'C';
-    if (show_hidden && FlagHas(&listener->flags, LISTEN_HIDDEN))
+    if (FlagHas(&listener->flags, LISTEN_HIDDEN))
+    {
+      if (!show_hidden)
+        continue;
       flags[len++] = 'H';
+    }
     if (FlagHas(&listener->flags, LISTEN_IPV4))
     {
       flags[len++] = '4';
index 805afb2d0dde4ce1f3a3f547a5ff82e41880be2d..310a38331c64b723b3de27890390c456318ee28d 100644 (file)
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: m_admin.c,v 1.13 2004/12/11 05:13:46 klmitch Exp $
+ * $Id: m_admin.c,v 1.13.2.1 2007/05/20 13:02:51 entrope Exp $
  */
 
 /*
@@ -87,6 +87,7 @@
 #include "ircd_features.h"
 #include "ircd_log.h"
 #include "ircd_reply.h"
+#include "match.h"
 #include "msg.h"
 #include "numeric.h"
 #include "numnicks.h"
@@ -116,12 +117,10 @@ static int send_admin_info(struct Client* sptr)
  */
 int m_admin(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 {
-  struct Client *acptr;
-
   assert(0 != cptr);
   assert(cptr == sptr);
 
-  if (parc > 1  && (!(acptr = find_match_server(parv[1])) || !IsMe(acptr)))
+  if (parc > 1  && match(parv[1], cli_name(&me)))
     return send_reply(sptr, ERR_NOPRIVILEGES);
 
   return send_admin_info(sptr);
index fc7e96216bd9be70f77698f35374813353b273af..b12825087aa4135ae6ff3ef666db0e984b78e35d 100644 (file)
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: m_connect.c,v 1.17 2004/12/11 05:13:46 klmitch Exp $
+ * $Id: m_connect.c,v 1.17.2.1 2007/05/20 13:55:59 entrope Exp $
  */
 
 /*
@@ -247,15 +247,14 @@ int mo_connect(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
       /*
        * Only allow LocOps to make local CONNECTS --SRB
        */
-      return 0;
+      return send_reply(cptr, ERR_NOPRIVILEGES);
     }
     else {
       struct Client* acptr2;
       struct Client* acptr3;
 
       if (!(acptr3 = find_match_server(parv[3]))) {
-        send_reply(sptr, ERR_NOSUCHSERVER, parv[3]);
-        return 0;
+        return send_reply(sptr, ERR_NOSUCHSERVER, parv[3]);
       }
 
       /*
index 75213540b5ffef6e85cf71e3cf9bac559a1836cc..6b9e91ecaccab3978d0a4575cb3360f4aa77adf2 100644 (file)
@@ -22,7 +22,7 @@
  */
 /** @file
  * @brief Report operators' privileges to others
- * @version $Id: m_privs.c,v 1.6.2.1 2007/03/06 02:35:24 entrope Exp $
+ * @version $Id: m_privs.c,v 1.6.2.2 2007/05/20 14:15:58 entrope Exp $
  */
 
 #include "config.h"
@@ -59,7 +59,7 @@ int mo_privs(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
     for (name = ircd_strtok(&p, parv[i], " "); name;
         name = ircd_strtok(&p, 0, " ")) {
       if (!(acptr = FindUser(name)))
-        continue;
+        send_reply(sptr, ERR_NOSUCHNICK, name);
       else if (MyUser(acptr))
        client_report_privs(sptr, acptr);
       else
index 2e48cdf01578db49004027eeb2aad0a9f2eaa57d..a5b0484979c15539eb1df585416e9152acdfa78a 100644 (file)
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: m_version.c,v 1.16 2004/12/11 05:14:03 klmitch Exp $
+ * $Id: m_version.c,v 1.16.2.1 2007/05/20 13:02:51 entrope Exp $
  */
 
 /*
@@ -89,6 +89,7 @@
 #include "ircd_reply.h"
 #include "ircd_snprintf.h"
 #include "ircd_string.h"
+#include "match.h"
 #include "msg.h"
 #include "numeric.h"
 #include "numnicks.h"
  */
 int m_version(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 {
-  struct Client *acptr;
-  if (parc > 1 && (!(acptr = find_match_server(parv[1])) || !IsMe(acptr)))
-    send_reply(sptr, ERR_NOPRIVILEGES);
-  else
-  {
-    send_reply(sptr, RPL_VERSION, version, debugmode, cli_name(&me),
-               debug_serveropts());
-    send_supported(sptr);
-  }
+  if (parc > 1 && match(parv[1], cli_name(&me)))
+    return send_reply(sptr, ERR_NOPRIVILEGES);
+
+  send_reply(sptr, RPL_VERSION, version, debugmode, cli_name(&me),
+             debug_serveropts());
+  send_supported(sptr);
   return 0;
 }
 
index f7a3af86d5b45ba346efda8af9bdfa03d77a42e0..bb877c44e282d1a15916d750840b353219242dc7 100644 (file)
@@ -19,7 +19,7 @@
  */
 /** @file
  * @brief Parse input from IRC clients and other servers.
- * @version $Id: parse.c,v 1.54 2005/09/27 03:54:46 entrope Exp $
+ * @version $Id: parse.c,v 1.54.2.1 2007/05/20 13:50:38 entrope Exp $
  */
 #include "config.h"
 
@@ -391,7 +391,7 @@ struct Message msgtab[] = {
     TOK_SETTIME,
     0, MAXPARA, MFLG_SLOW, 0, NULL,
     /* UNREG, CLIENT, SERVER, OPER, SERVICE */
-    { m_unregistered, m_ignore, ms_settime, mo_settime, m_ignore }
+    { m_unregistered, m_not_oper, ms_settime, mo_settime, m_ignore }
   },
   {
     MSG_RPING,
index 0cfd6265a7a30679b979c2434bfbdaa52758f5fb..51c0ee7fb72ae259799661e4e3b9a76766d4bae2 100644 (file)
@@ -1064,7 +1064,7 @@ static Numeric replyTable[] = {
 /* 515 */
   { ERR_BADEXPIRE, "%Tu :Bad expire time", "515" },
 /* 516 */
-  { ERR_DONTCHEAT, " :Don't Cheat.", "516" },
+  { ERR_DONTCHEAT, "%s :Don't Cheat.", "516" },
 /* 517 */
   { ERR_DISABLED, "%s :Command disabled.", "517" },
 /* 518 */