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  8d9ca11edf2117a5db1d38404b87822e88598f11 (commit)
      from  5fd43bce49d7e518a32eef1e93892f35f92f1225 (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 8d9ca11edf2117a5db1d38404b87822e88598f11
Author: Michael Poole <[email protected]>
Date:   Thu Oct 20 23:55:20 2016 -0400

    m_version: Re-unify the various handlers.
    
    "There can be only one!", to coin a phrase.  Fixes SF#170.

diff --git a/include/handlers.h b/include/handlers.h
index de356de..f8bc607 100644
--- a/include/handlers.h
+++ b/include/handlers.h
@@ -168,7 +168,6 @@ extern int mo_squit(struct Client*, struct Client*, int, 
char*[]);
 extern int mo_stats(struct Client*, struct Client*, int, char*[]);
 extern int mo_trace(struct Client*, struct Client*, int, char*[]);
 extern int mo_uping(struct Client*, struct Client*, int, char*[]);
-extern int mo_version(struct Client*, struct Client*, int, char*[]);
 extern int mo_wallops(struct Client*, struct Client*, int, char*[]);
 extern int mo_wallusers(struct Client*, struct Client*, int, char*[]);
 extern int mo_xquery(struct Client*, struct Client*, int, char*[]);
@@ -221,7 +220,6 @@ extern int ms_stats(struct Client*, struct Client*, int, 
char*[]);
 extern int ms_topic(struct Client*, struct Client*, int, char*[]);
 extern int ms_trace(struct Client*, struct Client*, int, char*[]);
 extern int ms_uping(struct Client*, struct Client*, int, char*[]);
-extern int ms_version(struct Client*, struct Client*, int, char*[]);
 extern int ms_wallchops(struct Client*, struct Client*, int, char*[]);
 extern int ms_wallops(struct Client*, struct Client*, int, char*[]);
 extern int ms_wallusers(struct Client*, struct Client*, int, char*[]);
diff --git a/ircd/m_version.c b/ircd/m_version.c
index 656332e..9bd24ba 100644
--- a/ircd/m_version.c
+++ b/ircd/m_version.c
@@ -109,35 +109,6 @@
  */
 int m_version(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 {
-  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;
-}
-
-/*
- * mo_version - oper message handler
- *
- *   parv[0] = sender prefix
- *   parv[1] = servername
- */
-int mo_version(struct Client* cptr, struct Client* sptr, int parc, char* 
parv[])
-{
-  struct Client *acptr;
-
-  if (MyConnect(sptr) && parc > 1)
-  {
-    if (!(acptr = find_match_server(parv[1])))
-    {
-      send_reply(sptr, ERR_NOSUCHSERVER, parv[1]);
-      return 0;
-    }
-    parv[1] = cli_name(acptr);
-  }
-
   if (hunt_server_cmd(sptr, CMD_VERSION, cptr, feature_int(FEAT_HIS_REMOTE),
                                                            ":%C", 1,
                                                            parc, parv)
@@ -145,37 +116,8 @@ int mo_version(struct Client* cptr, struct Client* sptr, 
int parc, char* parv[])
   {
     send_reply(sptr, RPL_VERSION, version, debugmode, cli_name(&me),
               debug_serveropts());
-    send_supported(sptr);
-  }
-
-  return 0;
-}
-
-/*
- * ms_version - server message handler
- *
- *   parv[0] = sender prefix
- *   parv[1] = servername
- */
-int ms_version(struct Client* cptr, struct Client* sptr, int parc, char* 
parv[])
-{
-  struct Client *acptr;
-
-  if (MyConnect(sptr) && parc > 1)
-  {
-    if (!(acptr = find_match_server(parv[1])))
-    {
-      send_reply(sptr, ERR_NOSUCHSERVER, parv[1]);
-      return 0;
-    }
-    parv[1] = cli_name(acptr);
-  }
-
-  if (hunt_server_cmd(sptr, CMD_VERSION, cptr, 0, ":%C", 1, parc, parv) ==
-      HUNTED_ISME)
-  {
-    send_reply(sptr, RPL_VERSION, version, debugmode, cli_name(&me),
-              debug_serveropts());
+    if (MyUser(sptr))
+      send_supported(sptr);
   }
 
   return 0;
diff --git a/ircd/parse.c b/ircd/parse.c
index ffa8879..deec0d6 100644
--- a/ircd/parse.c
+++ b/ircd/parse.c
@@ -433,7 +433,7 @@ struct Message msgtab[] = {
     TOK_VERSION,
     0, MAXPARA, MFLG_SLOW | MFLG_UNREG, 0, NULL,
     /* UNREG, CLIENT, SERVER, OPER, SERVICE */
-    { m_version, m_version, ms_version, mo_version, m_ignore }
+    { m_version, m_version, m_version, m_version, m_ignore }
   },
   {
     MSG_STATS,
-----------------------------------------------------------------------

Summary of changes:
 include/handlers.h |    2 -
 ircd/m_version.c   |   62 +--------------------------------------------------
 ircd/parse.c       |    2 +-
 3 files changed, 3 insertions(+), 63 deletions(-)


hooks/post-receive
-- 
Undernet IRC Server Source Code.
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches

Reply via email to