]> jfr.im git - irc/quakenet/snircd-patchqueue.git/commitdiff
cmdhelp.patch changed numerics used for the replies.
authorwiebe <redacted>
Tue, 27 Jan 2009 19:49:45 +0000 (20:49 +0100)
committerwiebe <redacted>
Tue, 27 Jan 2009 19:49:45 +0000 (20:49 +0100)
cmdhelp.patch

index a051dced6e04b30697ed8e54fc4ec5edada99503..0f06abba69bd722807bc6b775556e2caba9f3f96 100644 (file)
@@ -1,9 +1,29 @@
-make /HELP <command> work - oper only feature?
-need to make small test case to see how hard/easy this would be to add.
+Add /HELP <command>
 
-diff -r 329d644daf7d include/handlers.h
---- a/include/handlers.h       Mon Jan 26 12:47:49 2009 +0100
-+++ b/include/handlers.h       Mon Jan 26 13:29:19 2009 +0100
+include/handlers.h
+include/ircd_handler.h
+include/msg.h
+add mh_* message help function handlers
+
+ircd/m_defaults.c
+add default replies for /HELP (mh_not_oper mh_not_server)
+
+ircd/m_help.c
+add mh_* functions - once finished they should be moved to their respective m_*.c files
+
+include/numeric.h
+ircd/s_err.c
+add 377 RPL_HELP, 378 RPL_ENDOFHELP, 418 ERR_NOHELP
+
+include/parse.h
+add function find_message_by_cmd to find the mh_* function to call
+
+ircd/parse.c
+add mh_* functions in the message table
+
+diff -r 3fc56aefcea6 include/handlers.h
+--- a/include/handlers.h       Tue Jan 27 18:27:54 2009 +0100
++++ b/include/handlers.h       Tue Jan 27 20:49:11 2009 +0100
 @@ -244,5 +244,77 @@
  extern int ms_wallvoices(struct Client*, struct Client*, int, char*[]);
  extern int ms_whois(struct Client*, struct Client*, int, char*[]);
@@ -82,9 +102,9 @@ diff -r 329d644daf7d include/handlers.h
 +
  #endif /* INCLUDED_handlers_h */
  
-diff -r 329d644daf7d include/ircd_handler.h
---- a/include/ircd_handler.h   Mon Jan 26 12:47:49 2009 +0100
-+++ b/include/ircd_handler.h   Mon Jan 26 13:29:19 2009 +0100
+diff -r 3fc56aefcea6 include/ircd_handler.h
+--- a/include/ircd_handler.h   Tue Jan 27 18:27:54 2009 +0100
++++ b/include/ircd_handler.h   Tue Jan 27 20:49:11 2009 +0100
 @@ -36,6 +36,7 @@
    SERVER_HANDLER,       /**< Used for server conections. */
    OPER_HANDLER,         /**< Used for IRC operators. */
@@ -93,9 +113,9 @@ diff -r 329d644daf7d include/ircd_handler.h
    LAST_HANDLER_TYPE     /**< NUmber of handler types. */
  } HandlerType;
  
-diff -r 329d644daf7d include/msg.h
---- a/include/msg.h    Mon Jan 26 12:47:49 2009 +0100
-+++ b/include/msg.h    Mon Jan 26 13:29:19 2009 +0100
+diff -r 3fc56aefcea6 include/msg.h
+--- a/include/msg.h    Tue Jan 27 18:27:54 2009 +0100
++++ b/include/msg.h    Tue Jan 27 20:49:11 2009 +0100
 @@ -410,7 +410,7 @@
     * parv = parameter variable array
     */
@@ -105,31 +125,38 @@ diff -r 329d644daf7d include/msg.h
     */
    MessageHandler handlers[LAST_HANDLER_TYPE];
  };
-diff -r 329d644daf7d include/numeric.h
---- a/include/numeric.h        Mon Jan 26 12:47:49 2009 +0100
-+++ b/include/numeric.h        Mon Jan 26 13:29:19 2009 +0100
-@@ -475,7 +475,6 @@
- /*      ERR_NOMANAGER_LONG   565      no longer used */
+diff -r 3fc56aefcea6 include/numeric.h
+--- a/include/numeric.h        Tue Jan 27 18:27:54 2009 +0100
++++ b/include/numeric.h        Tue Jan 27 20:49:11 2009 +0100
+@@ -292,6 +292,9 @@
+ #define RPL_MOTDSTART        375
+ #define RPL_ENDOFMOTD        376
++#define RPL_HELP             377  /* QuakeNet extension */
++#define RPL_ENDOFHELP        378  /* QuakeNet extension */
++
+ /*      RPL_KICKEXPIRED      377   aircd */
+ /*    RPL_SPAM             377   austnet */
+ /*      RPL_BANEXPIRED       378   aircd */
+@@ -342,6 +345,7 @@
+ #define ERR_QUERYTOOLONG     416        /* Undernet extension */
+      /* ERR_TOOMANYMATCHES   416           IRCnet extension */
+ #define ERR_INPUTTOOLONG     417
++#define ERR_NOHELP           418  /* QuakeNet extension */
+ /*      ERR_LENGTHTRUNCATED  419           aircd */
+ #define ERR_UNKNOWNCOMMAND   421
+@@ -476,7 +480,6 @@
  #define ERR_NOMANAGER        566      /* Undernet extension */
  #define ERR_UPASS_SAME_APASS 567        /* Undernet extension */
--#define ERR_LASTERROR        568
+ #define ERR_LASTERROR        568
+-
  /*    RPL_LOGON            600        dalnet,unreal
        RPL_LOGOFF           601        dalnet,unreal
-@@ -499,4 +498,10 @@
-       RPL_DUMPRPL          641        unreal
-       RPL_EODUMP           642        unreal
- */
-+#define RPL_HELP             601  /* QuakeNet extension */
-+#define RPL_ENDOFHELP        602  /* QuakeNet extension */
-+#define ERR_NOHELP           603  /* QuakeNet extension */
-+
-+#define ERR_LASTERROR        604
-+
- #endif /* INCLUDED_numeric_h */
-diff -r 329d644daf7d include/parse.h
---- a/include/parse.h  Mon Jan 26 12:47:49 2009 +0100
-+++ b/include/parse.h  Mon Jan 26 13:29:19 2009 +0100
+       RPL_WATCHOFF         602        dalnet,unreal
+diff -r 3fc56aefcea6 include/parse.h
+--- a/include/parse.h  Tue Jan 27 18:27:54 2009 +0100
++++ b/include/parse.h  Tue Jan 27 20:49:11 2009 +0100
 @@ -15,6 +15,7 @@
  extern int parse_client(struct Client *cptr, char *buffer, char *bufend);
  extern int parse_server(struct Client *cptr, char *buffer, char *bufend);
@@ -138,9 +165,9 @@ diff -r 329d644daf7d include/parse.h
  
  extern int register_mapping(struct s_map *map);
  extern int unregister_mapping(struct s_map *map);
-diff -r 329d644daf7d ircd/m_defaults.c
---- a/ircd/m_defaults.c        Mon Jan 26 12:47:49 2009 +0100
-+++ b/ircd/m_defaults.c        Mon Jan 26 13:29:19 2009 +0100
+diff -r 3fc56aefcea6 ircd/m_defaults.c
+--- a/ircd/m_defaults.c        Tue Jan 27 18:27:54 2009 +0100
++++ b/ircd/m_defaults.c        Tue Jan 27 20:49:11 2009 +0100
 @@ -119,3 +119,18 @@
  {
    return 0;
@@ -161,9 +188,9 @@ diff -r 329d644daf7d ircd/m_defaults.c
 +  return send_reply(sptr, SND_EXPLICIT | RPL_HELP, "%s :This command is for servers only.", parv[1]);
 +}
 \ No newline at end of file
-diff -r 329d644daf7d ircd/m_help.c
---- a/ircd/m_help.c    Mon Jan 26 12:47:49 2009 +0100
-+++ b/ircd/m_help.c    Mon Jan 26 13:29:19 2009 +0100
+diff -r 3fc56aefcea6 ircd/m_help.c
+--- a/ircd/m_help.c    Tue Jan 27 18:27:54 2009 +0100
++++ b/ircd/m_help.c    Tue Jan 27 20:49:11 2009 +0100
 @@ -90,6 +90,7 @@
  #include "msg.h"
  #include "numeric.h"
@@ -1388,9 +1415,9 @@ diff -r 329d644daf7d ircd/m_help.c
 +  return 0;
 +}
 \ No newline at end of file
-diff -r 329d644daf7d ircd/parse.c
---- a/ircd/parse.c     Mon Jan 26 12:47:49 2009 +0100
-+++ b/ircd/parse.c     Mon Jan 26 13:29:19 2009 +0100
+diff -r 3fc56aefcea6 ircd/parse.c
+--- a/ircd/parse.c     Tue Jan 27 18:27:54 2009 +0100
++++ b/ircd/parse.c     Tue Jan 27 20:49:11 2009 +0100
 @@ -110,534 +110,534 @@
      MSG_PRIVATE,
      TOK_PRIVATE,
@@ -2132,23 +2159,27 @@ diff -r 329d644daf7d ircd/parse.c
  
    add_msg_element(&msg_tree, msg, msg->cmd);
    map->msg = msg;
-diff -r 329d644daf7d ircd/s_err.c
---- a/ircd/s_err.c     Mon Jan 26 12:47:49 2009 +0100
-+++ b/ircd/s_err.c     Mon Jan 26 13:29:19 2009 +0100
-@@ -1230,6 +1230,16 @@
- /* 598 */
+diff -r 3fc56aefcea6 ircd/s_err.c
+--- a/ircd/s_err.c     Tue Jan 27 18:27:54 2009 +0100
++++ b/ircd/s_err.c     Tue Jan 27 20:49:11 2009 +0100
+@@ -786,9 +786,9 @@
+ /* 376 */
+   { RPL_ENDOFMOTD, ":End of /MOTD command.", "376" },
+ /* 377 */
+-  { 0 },
++  { RPL_HELP, 0, "377" },
+ /* 378 */
+-  { 0 },
++  { RPL_ENDOFHELP, "%s :End of /HELP report.", "378" },
+ /* 379 */
    { 0 },
- /* 599 */
-+  { 0 },
-+/* 600 */
-+  { 0 },
-+/* 601 */
-+  { RPL_HELP, 0, "601" },
-+/* 602 */
-+  { RPL_ENDOFHELP, "%s :End of /HELP report.", "602" },
-+/* 603 */
-+  { ERR_NOHELP, "%s :No help found.", "603" },
-+/* 604 */
-   { 0 }
- };
+ /* 380 */
+@@ -868,7 +868,7 @@
+ /* 417 */
+   { ERR_INPUTTOOLONG, ":Input line was too long", "417" },
+ /* 418 */
+-  { 0 },
++  { ERR_NOHELP, "%s :No help found.", "418" },
+ /* 419 */
+   { 0 },
+ /* 420 */