]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - extensions/m_omode.c
Add extensions/m_oaccept , a module to allow opers to bypass +gGR with a command.
[irc/rqf/shadowircd.git] / extensions / m_omode.c
index 3c33f167034d36be0e3f6a786b8ae08157ebadfe..f80e26276b1fc564ba7f5fda17c04ffa07446cb5 100644 (file)
@@ -29,7 +29,7 @@
 #include "channel.h"
 #include "client.h"
 #include "hash.h"
-#include "irc_string.h"
+#include "match.h"
 #include "ircd.h"
 #include "numeric.h"
 #include "s_user.h"
@@ -55,7 +55,6 @@ DECLARE_MODULE_AV1(omode, NULL, NULL, omode_clist, NULL, NULL, "$Revision: 3121
 
 /*
  * mo_omode - MODE command handler
- * parv[0] - sender
  * parv[1] - channel
  */
 static int
@@ -95,7 +94,7 @@ mo_omode(struct Client *client_p, struct Client *source_p, int parc, const char
        msptr = find_channel_membership(chptr, source_p);
        wasonchannel = msptr != NULL;
 
-       if (is_chanop(msptr))
+       if (is_any_op(msptr))
        {
                sendto_one_notice(source_p, ":Use a normal MODE you idiot");
                return 0;
@@ -105,8 +104,8 @@ mo_omode(struct Client *client_p, struct Client *source_p, int parc, const char
        for (i = 2; i < parc; i++)
        {
                if (i != 2)
-                       strlcat(params, " ", sizeof params);
-               strlcat(params, parv[i], sizeof params);
+                       rb_strlcat(params, " ", sizeof params);
+               rb_strlcat(params, parv[i], sizeof params);
        }
 
        sendto_wallops_flags(UMODE_WALLOP, &me, 
@@ -140,9 +139,6 @@ mo_omode(struct Client *client_p, struct Client *source_p, int parc, const char
                                ":%s TMODE %ld %s +o %s",
                                me.id, (long) chptr->channelts, parv[1],
                                source_p->id);
-               sendto_server(NULL, chptr, NOCAPS, CAP_TS6,
-                               ":%s MODE %s +o %s",
-                               me.name, parv[1], source_p->name);
                msptr->flags |= CHFL_CHANOP;
        }
        else