]> jfr.im git - solanum.git/blobdiff - modules/m_xline.c
Move module description headers to the top
[solanum.git] / modules / m_xline.c
index 7d8bd0c325d79c126219bf03dce13434ee4b0d3f..c8c9edf393c50f6c9c4fab0a9cd435600a3d97d0 100644 (file)
@@ -26,8 +26,6 @@
  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
- *
- * $Id$
  */
 
 #include "stdinc.h"
 #include "bandbi.h"
 #include "operhash.h"
 
-static int mo_xline(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
-static int ms_xline(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
-static int me_xline(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
-static int mo_unxline(struct Client *client_p, struct Client *source_p, int parc,
+static const char xline_desc[] =
+       "Provides management of GECOS bans via (UN)XLINE command";
+
+static int mo_xline(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
+static int ms_xline(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
+static int me_xline(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
+static int mo_unxline(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc,
                      const char *parv[]);
-static int ms_unxline(struct Client *client_p, struct Client *source_p, int parc,
+static int ms_unxline(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc,
                      const char *parv[]);
-static int me_unxline(struct Client *client_p, struct Client *source_p, int parc,
+static int me_unxline(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc,
                      const char *parv[]);
 
-struct Message xline_msgtab = {
-       "XLINE", 0, 0, 0, MFLG_SLOW,
-       {mg_unreg, mg_not_oper, {ms_xline, 5}, {ms_xline, 5}, {me_xline, 5}, {mo_xline, 3}}
-};
-
-struct Message unxline_msgtab = {
-       "UNXLINE", 0, 0, 0, MFLG_SLOW,
-       {mg_unreg, mg_not_oper, {ms_unxline, 3}, {ms_unxline, 3}, {me_unxline, 2}, {mo_unxline, 2}}
-};
-
-mapi_clist_av1 xline_clist[] = { &xline_msgtab, &unxline_msgtab, NULL };
-
-DECLARE_MODULE_AV1(xline, NULL, NULL, xline_clist, NULL, NULL, "$Revision$");
-
 static int valid_xline(struct Client *, const char *, const char *);
 static void apply_xline(struct Client *client_p, const char *name,
                        const char *reason, int temp_time, int propagated);
@@ -88,10 +75,22 @@ static void cluster_xline(struct Client *source_p, int temp_time,
 static void handle_remote_xline(struct Client *source_p, int temp_time,
                                const char *name, const char *reason);
 static void handle_remote_unxline(struct Client *source_p, const char *name);
-
 static void remove_xline(struct Client *source_p, const char *name,
                         int propagated);
 
+struct Message xline_msgtab = {
+       "XLINE", 0, 0, 0, 0,
+       {mg_unreg, mg_not_oper, {ms_xline, 5}, {ms_xline, 5}, {me_xline, 5}, {mo_xline, 3}}
+};
+
+struct Message unxline_msgtab = {
+       "UNXLINE", 0, 0, 0, 0,
+       {mg_unreg, mg_not_oper, {ms_unxline, 3}, {ms_unxline, 3}, {me_unxline, 2}, {mo_unxline, 2}}
+};
+
+mapi_clist_av1 xline_clist[] = { &xline_msgtab, &unxline_msgtab, NULL };
+
+DECLARE_MODULE_AV2(xline, NULL, NULL, xline_clist, NULL, NULL, NULL, NULL, xline_desc);
 
 /* m_xline()
  *
@@ -100,7 +99,7 @@ static void remove_xline(struct Client *source_p, const char *name,
  * parv[3] - reason
  */
 static int
-mo_xline(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
+mo_xline(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
 {
        struct ConfItem *aconf;
        const char *name;
@@ -187,7 +186,7 @@ mo_xline(struct Client *client_p, struct Client *source_p, int parc, const char
  * handles a remote xline
  */
 static int
-ms_xline(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
+ms_xline(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
 {
        /* parv[0]  parv[1]      parv[2]  parv[3]  parv[4]
         * oper     target serv  xline    type     reason
@@ -206,7 +205,7 @@ ms_xline(struct Client *client_p, struct Client *source_p, int parc, const char
 }
 
 static int
-me_xline(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
+me_xline(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
 {
        /* time name type :reason */
        if(!IsPerson(source_p))
@@ -388,7 +387,7 @@ cluster_xline(struct Client *source_p, int temp_time, const char *name, const ch
  * parv[1] - thing to unxline
  */
 static int
-mo_unxline(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
+mo_unxline(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
 {
        int propagated = 1;
 
@@ -426,7 +425,7 @@ mo_unxline(struct Client *client_p, struct Client *source_p, int parc, const cha
  * handles a remote unxline
  */
 static int
-ms_unxline(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
+ms_unxline(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
 {
        /* parv[0]  parv[1]        parv[2]
         * oper     target server  gecos
@@ -444,7 +443,7 @@ ms_unxline(struct Client *client_p, struct Client *source_p, int parc, const cha
 }
 
 static int
-me_unxline(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
+me_unxline(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
 {
        /* name */
        if(!IsPerson(source_p))