]> jfr.im git - solanum.git/commitdiff
Move PRIVS command from extensions to modules (shows effective oper privs).
authorJilles Tjoelker <redacted>
Sun, 30 Mar 2008 22:39:14 +0000 (00:39 +0200)
committerJilles Tjoelker <redacted>
Sun, 30 Mar 2008 22:39:14 +0000 (00:39 +0200)
extensions/Makefile.in
help/opers/privs [new file with mode: 0644]
include/numeric.h
modules/Makefile.in
modules/m_privs.c [moved from extensions/m_privs.c with 97% similarity]
src/messages.tab

index 17c3b475e41643b872629f94e4bd7bde9947f41f..55c69775df429f7c06ef8eeef7f0e09f546bc3e3 100644 (file)
@@ -55,7 +55,6 @@ SRCS =                          \
   m_okick.c                    \
   m_omode.c                    \
   m_opme.c                     \
-  m_privs.c                    \
   m_webirc.c                   \
   no_locops.c                  \
   no_oper_invis.c              \
diff --git a/help/opers/privs b/help/opers/privs
new file mode 100644 (file)
index 0000000..08badd9
--- /dev/null
@@ -0,0 +1,11 @@
+PRIVS [nick]
+
+PRIVS displays effective operator privileges for
+the specified nick, or for yourself if no nick is
+given. This includes all privileges from the operator
+block, the name of the operator block and those
+privileges from the auth block that have an effect
+after the initial connection.
+
+If the remote server does not support this
+extension, you will not receive a reply.
index 55dcdb4ba343e558c276640eeee2cd7f2be24eab..c53500861a6450640f298a068e0fe4b80015869b 100644 (file)
@@ -118,6 +118,8 @@ extern const char *form_str(int);
 #define RPL_LOCALUSERS       265
 #define RPL_GLOBALUSERS      266
 
+#define RPL_PRIVS            270 /* from ircu */
+
 #define RPL_ACCEPTLIST      281
 #define RPL_ENDOFACCEPT      282
 
index c2de26fd2addfaf98958ca8076a27d2c919d1d67..8426792b6ff62adaeeffe9825dc55da8e5cd00b6 100644 (file)
@@ -85,6 +85,7 @@ TSRCS =                          \
   m_ping.c \
   m_pong.c \
   m_post.c \
+  m_privs.c \
   m_rehash.c \
   m_restart.c \
   m_resv.c \
similarity index 97%
rename from extensions/m_privs.c
rename to modules/m_privs.c
index d005be26e97d4ce0253cf96e6f07cabcb9367de4..35c2f10e76d8862c9ffed3720dbf6b597ca75400 100644 (file)
@@ -40,8 +40,6 @@
 #include "s_conf.h"
 #include "s_newconf.h"
 
-#define RPL_PRIVS 270 /* from ircu */
-
 static int me_privs(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
 static int mo_privs(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
 
@@ -134,7 +132,8 @@ static void show_privs(struct Client *source_p, struct Client *target_p)
                }
                p++;
        }
-       sendto_one_numeric(source_p, RPL_PRIVS, "%s :%s", target_p->name, buf);
+       sendto_one_numeric(source_p, RPL_PRIVS, form_str(RPL_PRIVS),
+                       target_p->name, buf);
 }
 
 static int me_privs(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
index c7fe3b4f3c4774b9734e092fbe92d61da1144ef2..d4f1486555a822eac253401547be910c130fb41b 100644 (file)
@@ -291,7 +291,7 @@ static  const char *  replies[] = {
 /* 267 */       NULL,
 /* 268 */       NULL,
 /* 269 */       NULL,
-/* 270 */       NULL,
+/* 270 RPL_PRIVS, */            "%s :%s",
 /* 271 */       NULL,
 /* 272 */       NULL,
 /* 273 */       NULL,