]> jfr.im git - irc/quakenet/snircd-patchqueue.git/blame - addopkickcmd.patch
Add my common channel umode patch.
[irc/quakenet/snircd-patchqueue.git] / addopkickcmd.patch
CommitLineData
715c825d
CP
1add opkick command, similar to opmode command, but then for kicking
2priv controlled by LOCAL_OPMODE and OPMODE
3feature controlled by OPKICK (disabled by default), new p10 token OK
4if implemented, it must not be enabled until ALL servers and services are upgraded
5generates HACK(4) snomask notice for accountability with oper as source
6probably needs some work (for one i simply copied the header from m_kick.c)
7
8diff -r f1d6c059e808 include/handlers.h
9--- a/include/handlers.h Sun Jan 11 22:38:39 2009 +0000
10+++ b/include/handlers.h Sun Jan 11 22:38:39 2009 +0000
11@@ -167,6 +167,7 @@
12 extern int mo_kill(struct Client*, struct Client*, int, char*[]);
13 extern int mo_notice(struct Client*, struct Client*, int, char*[]);
14 extern int mo_oper(struct Client*, struct Client*, int, char*[]);
15+extern int mo_opkick(struct Client*, struct Client*, int, char*[]);
16 extern int mo_opmode(struct Client*, struct Client*, int, char*[]);
17 extern int mo_ping(struct Client*, struct Client*, int, char*[]);
18 extern int mo_privmsg(struct Client*, struct Client*, int, char*[]);
19@@ -216,6 +217,7 @@
20 extern int ms_nick(struct Client*, struct Client*, int, char*[]);
21 extern int ms_notice(struct Client*, struct Client*, int, char*[]);
22 extern int ms_oper(struct Client*, struct Client*, int, char*[]);
23+extern int ms_opkick(struct Client*, struct Client*, int, char*[]);
24 extern int ms_opmode(struct Client*, struct Client*, int, char*[]);
25 extern int ms_part(struct Client*, struct Client*, int, char*[]);
26 extern int ms_ping(struct Client*, struct Client*, int, char*[]);
27diff -r f1d6c059e808 include/ircd_features.h
28--- a/include/ircd_features.h Sun Jan 11 22:38:39 2009 +0000
29+++ b/include/ircd_features.h Sun Jan 11 22:38:39 2009 +0000
30@@ -105,6 +105,7 @@
31 /* features that affect all operators */
32 FEAT_EXTENDED_CHECKCMD,
33 FEAT_CONFIG_OPERCMDS,
34+ FEAT_OPKICK,
35 FEAT_SETHOST,
36 FEAT_SETHOST_USER,
37 FEAT_SETHOST_AUTO,
38diff -r f1d6c059e808 include/msg.h
39--- a/include/msg.h Sun Jan 11 22:38:39 2009 +0000
40+++ b/include/msg.h Sun Jan 11 22:38:39 2009 +0000
41@@ -236,6 +236,10 @@
42 #define TOK_KICK "K"
43 #define CMD_KICK MSG_KICK, TOK_KICK
44
45+#define MSG_OPKICK "OPKICK" /* OPKICK */
46+#define TOK_OPKICK "OK"
47+#define CMD_OPKICK MSG_OPKICK, TOK_OPKICK
48+
49 #define MSG_USERHOST "USERHOST" /* USER -> USRH */
50 #define TOK_USERHOST "USERHOST"
51 #define CMD_USERHOST MSG_USERHOST, TOK_USERHOST
52diff -r f1d6c059e808 ircd/Makefile.in
53--- a/ircd/Makefile.in Sun Jan 11 22:38:39 2009 +0000
54+++ b/ircd/Makefile.in Sun Jan 11 22:38:39 2009 +0000
55@@ -151,6 +151,7 @@
56 m_nick.c \
57 m_notice.c \
58 m_oper.c \
59+ m_opkick.c \
60 m_opmode.c \
61 m_part.c \
62 m_pass.c \
63@@ -884,6 +885,14 @@
64 ../include/ircd_features.h ../include/s_conf.h ../include/client.h \
65 ../include/s_debug.h ../include/s_user.h ../include/s_misc.h \
66 ../include/send.h
67+m_opkick.o: m_opkick.c ../config.h ../include/channel.h \
68+ ../include/ircd_defs.h ../include/res.h ../config.h ../include/client.h \
69+ ../include/dbuf.h ../include/msgq.h ../include/ircd_events.h \
70+ ../include/ircd_handler.h ../include/capab.h ../include/hash.h \
71+ ../include/ircd.h ../include/struct.h ../include/ircd_log.h \
72+ ../include/ircd_reply.h ../include/ircd_string.h \
73+ ../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \
74+ ../include/numnicks.h ../include/send.h ../include/ircd_features.h
75 m_opmode.o: m_opmode.c ../config.h ../include/client.h \
76 ../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \
77 ../include/ircd_events.h ../config.h ../include/ircd_handler.h \
78diff -r f1d6c059e808 ircd/ircd_features.c
79--- a/ircd/ircd_features.c Sun Jan 11 22:38:39 2009 +0000
80+++ b/ircd/ircd_features.c Sun Jan 11 22:38:39 2009 +0000
81@@ -359,6 +359,7 @@
82 /* features that affect all operators */
83 F_B(EXTENDED_CHECKCMD, 0, 0, 0),
84 F_B(CONFIG_OPERCMDS, 0, 0, 0),
85+ F_B(OPKICK, 0, 0, 0),
86 F_B(SETHOST, 0, 0, 0),
87 F_B(SETHOST_USER, 0, 0, 0),
88 F_B(SETHOST_AUTO, 0, 0, 0),
89diff -r f1d6c059e808 ircd/parse.c
90--- a/ircd/parse.c Sun Jan 11 22:38:39 2009 +0000
91+++ b/ircd/parse.c Sun Jan 11 22:38:39 2009 +0000
92@@ -656,6 +656,17 @@
93 0, MAXPARA, MFLG_SLOW, 0, NULL,
94 { m_unregistered, m_not_oper, m_check, m_check, m_ignore }
95 },
96+
97+ /*
98+ * Add the command for OPKICK.
99+ */
100+ {
101+ MSG_OPKICK,
102+ TOK_OPKICK,
103+ 0, MAXPARA, MFLG_SLOW, 0, NULL,
104+ /* UNREG, CLIENT, SERVER, OPER, SERVICE */
105+ { m_unregistered, m_not_oper, ms_opkick, mo_opkick, m_ignore }
106+ },
107
108 /* This command is an alias for QUIT during the unregistered part of
109 * of the server. This is because someone jumping via a broken web