]> jfr.im git - irc/quakenet/snircd-patchqueue.git/blobdiff - cmdhelp.patch
Update patchset for latest ircu changes
[irc/quakenet/snircd-patchqueue.git] / cmdhelp.patch
index 38be1f1c0b22a1c2b79d1f9d6e4492625df52565..a7d275d0a990703d05f167c93c882141ed41ed7d 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 7fa4708bac45 include/handlers.h
---- a/include/handlers.h       Sun Jan 25 12:48:01 2009 +0100
-+++ b/include/handlers.h       Sun Jan 25 23:52:18 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 5a1e5e09c766 include/handlers.h
+--- a/include/handlers.h       Sat Jan 31 18:46:47 2009 +0100
++++ b/include/handlers.h       Sat Jan 31 18:51:08 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 7fa4708bac45 include/handlers.h
 +
  #endif /* INCLUDED_handlers_h */
  
-diff -r 7fa4708bac45 include/ircd_handler.h
---- a/include/ircd_handler.h   Sun Jan 25 12:48:01 2009 +0100
-+++ b/include/ircd_handler.h   Sun Jan 25 23:52:18 2009 +0100
+diff -r 5a1e5e09c766 include/ircd_handler.h
+--- a/include/ircd_handler.h   Sat Jan 31 18:46:47 2009 +0100
++++ b/include/ircd_handler.h   Sat Jan 31 18:51:08 2009 +0100
 @@ -36,6 +36,7 @@
    SERVER_HANDLER,       /**< Used for server conections. */
    OPER_HANDLER,         /**< Used for IRC operators. */
@@ -93,9 +113,9 @@ diff -r 7fa4708bac45 include/ircd_handler.h
    LAST_HANDLER_TYPE     /**< NUmber of handler types. */
  } HandlerType;
  
-diff -r 7fa4708bac45 include/msg.h
---- a/include/msg.h    Sun Jan 25 12:48:01 2009 +0100
-+++ b/include/msg.h    Sun Jan 25 23:52:18 2009 +0100
+diff -r 5a1e5e09c766 include/msg.h
+--- a/include/msg.h    Sat Jan 31 18:46:47 2009 +0100
++++ b/include/msg.h    Sat Jan 31 18:51:08 2009 +0100
 @@ -410,7 +410,7 @@
     * parv = parameter variable array
     */
@@ -105,31 +125,38 @@ diff -r 7fa4708bac45 include/msg.h
     */
    MessageHandler handlers[LAST_HANDLER_TYPE];
  };
-diff -r 7fa4708bac45 include/numeric.h
---- a/include/numeric.h        Sun Jan 25 12:48:01 2009 +0100
-+++ b/include/numeric.h        Sun Jan 25 23:52:18 2009 +0100
-@@ -475,7 +475,6 @@
- /*      ERR_NOMANAGER_LONG   565      no longer used */
+diff -r 5a1e5e09c766 include/numeric.h
+--- a/include/numeric.h        Sat Jan 31 18:46:47 2009 +0100
++++ b/include/numeric.h        Sat Jan 31 18:51:08 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 7fa4708bac45 include/parse.h
---- a/include/parse.h  Sun Jan 25 12:48:01 2009 +0100
-+++ b/include/parse.h  Sun Jan 25 23:52:18 2009 +0100
+       RPL_WATCHOFF         602        dalnet,unreal
+diff -r 5a1e5e09c766 include/parse.h
+--- a/include/parse.h  Sat Jan 31 18:46:47 2009 +0100
++++ b/include/parse.h  Sat Jan 31 18:51:08 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 7fa4708bac45 include/parse.h
  
  extern int register_mapping(struct s_map *map);
  extern int unregister_mapping(struct s_map *map);
-diff -r 7fa4708bac45 ircd/m_defaults.c
---- a/ircd/m_defaults.c        Sun Jan 25 12:48:01 2009 +0100
-+++ b/ircd/m_defaults.c        Sun Jan 25 23:52:18 2009 +0100
+diff -r 5a1e5e09c766 ircd/m_defaults.c
+--- a/ircd/m_defaults.c        Sat Jan 31 18:46:47 2009 +0100
++++ b/ircd/m_defaults.c        Sat Jan 31 18:51:08 2009 +0100
 @@ -119,3 +119,18 @@
  {
    return 0;
@@ -160,11 +187,18 @@ diff -r 7fa4708bac45 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 7fa4708bac45 ircd/m_help.c
---- a/ircd/m_help.c    Sun Jan 25 12:48:01 2009 +0100
-+++ b/ircd/m_help.c    Sun Jan 25 23:52:18 2009 +0100
-@@ -90,6 +90,7 @@
+diff -r 5a1e5e09c766 ircd/m_help.c
+--- a/ircd/m_help.c    Sat Jan 31 18:46:47 2009 +0100
++++ b/ircd/m_help.c    Sat Jan 31 18:51:08 2009 +0100
+@@ -82,6 +82,7 @@
+ #include "config.h"
+ #include "client.h"
++#include "handlers.h"
+ #include "hash.h"
+ #include "ircd.h"
+ #include "ircd_log.h"
+@@ -90,6 +91,7 @@
  #include "msg.h"
  #include "numeric.h"
  #include "numnicks.h"
@@ -172,7 +206,7 @@ diff -r 7fa4708bac45 ircd/m_help.c
  #include "send.h"
  
  /* #include <assert.h> -- Now using assert in ircd_log.h */
-@@ -100,9 +101,1124 @@
+@@ -100,9 +102,1212 @@
  int m_help(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
  {
    int i;
@@ -284,7 +318,7 @@ diff -r 7fa4708bac45 ircd/m_help.c
 +    "CHECK :Shows detailed information about a user, a channel, a hostmask, or a server.");
 +  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
 +    "CHECK :Flags are: -C show clones, -c show channels, -s show servernames, -e show more, "
-+    "-i show IPs, -I show hostnames and IPs, -u do not show users, -o show only channel operators.");
++    "-i show IPs, -I show hostnames and IPs, -u do not show users, -o show only channel operators, -l show oplevels.");
 +  return 0;
 +}
 +
@@ -814,6 +848,94 @@ diff -r 7fa4708bac45 ircd/m_help.c
 +    "PRIVS :PRIVS <nick> [<nick> [..]]");
 +  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
 +    "PRIVS :Shows the privileges an IRC Operator has.");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :CHAN_LIMIT            oper has no channel limit (JOIN)");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :MODE_LCHAN            oper can mode local chans without channel operator status");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :WALK_LCHAN            oper can walk through local modes (JOIN &chan override)");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :DEOP_LCHAN            oper cannot be deoped on local chans");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :SHOW_INVIS            show local invisible users");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :SHOW_ALL_INVIS        show all invisible users");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :UNLIMIT_QUERY         unlimited results in WHO");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :KILL                  oper can KILL");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :LOCAL_KILL            oper can local KILL");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :REHASH                oper can REHASH");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :RESTART               oper can RESTART");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :DIE                   oper can DIE");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :GLINE                 oper can GLINE");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :LOCAL_GLINE           oper can local GLINE");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :JUPE                  oper can JUPE");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :LOCAL_JUPE            oper can local JUPE");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :OPMODE                oper can OPMODE and CLEARMODE");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :LOCAL_OPMODE          oper can local OPMODE and CLEARMODE");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :SET                   oper can SET");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :WHOX                  log oper's usage of WHO x");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :BADCHAN               oper can BADCHAN (GLINE)");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :LOCAL_BADCHAN         oper can local BADCHAN (GLINE)");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :SEE_CHAN              oper can see in secret chans");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :PROPAGATE             propagate oper status");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :DISPLAY               oper status is displayed");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :SEE_OPERS             oper can see hidden opers");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :WIDE_GLINE            oper can set wider GLINE");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :LIST_CHAN             oper can LIST secret channels");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :FORCE_OPMODE          can hack modes on quarantined channels");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :FORCE_LOCAL_OPMODE    can hack modes on quarantined local channels");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :APASS_OPMODE          can hack modes +A/-A/+U/-U");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :CHANSERV              oper can set usermode +k");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :XTRA_OPER             oper can set usermode +X");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :NOIDLE                oper can set usermode +I");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :FREEFORM              oper can use freeform SETHOST");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :PARANOID              oper can set usermode +P");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :CHECK                 oper can use CHECK");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :WALL                  oper can use WALLOPS and WALLUSERS");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :CLOSE                 oper can use CLOSE");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :ROUTE                 oper can use CONNECT and SQUIT");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :ROUTEINFO             oper can use MAP, TRACE, ASLL, LINKS, and view JUPE list");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :USER_PRIVACY          oper can bypass user privacy (see through usermode +x)");
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :CHANNEL_PRIVACY       oper can bypass channel privacy (see info on channels they are not on)"); 
++  send_reply(sptr, SND_EXPLICIT | RPL_HELP,
++    "PRIVS :SERVERINFO            oper can use GET, STATS, HASH, and retrieve remote information");
 +  return 0;
 +}
 +
@@ -1299,10 +1421,9 @@ diff -r 7fa4708bac45 ircd/m_help.c
 +  }
 +  return 0;
 +}
-\ No newline at end of file
-diff -r 7fa4708bac45 ircd/parse.c
---- a/ircd/parse.c     Sun Jan 25 12:48:01 2009 +0100
-+++ b/ircd/parse.c     Sun Jan 25 23:52:18 2009 +0100
+diff -r 5a1e5e09c766 ircd/parse.c
+--- a/ircd/parse.c     Sat Jan 31 18:46:47 2009 +0100
++++ b/ircd/parse.c     Sat Jan 31 18:51:08 2009 +0100
 @@ -110,534 +110,534 @@
      MSG_PRIVATE,
      TOK_PRIVATE,
@@ -2044,23 +2165,27 @@ diff -r 7fa4708bac45 ircd/parse.c
  
    add_msg_element(&msg_tree, msg, msg->cmd);
    map->msg = msg;
-diff -r 7fa4708bac45 ircd/s_err.c
---- a/ircd/s_err.c     Sun Jan 25 12:48:01 2009 +0100
-+++ b/ircd/s_err.c     Sun Jan 25 23:52:18 2009 +0100
-@@ -1230,6 +1230,16 @@
- /* 598 */
+diff -r 5a1e5e09c766 ircd/s_err.c
+--- a/ircd/s_err.c     Sat Jan 31 18:46:47 2009 +0100
++++ b/ircd/s_err.c     Sat Jan 31 18:51:08 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 */