]> jfr.im git - solanum.git/blobdiff - modules/m_invite.c
extensions/invite_notify: make the NOTICE optional, configurable
[solanum.git] / modules / m_invite.c
index 0b882aab2c47f41ceb0601bcf35d4158c324dcdc..af65e1b5231c21723a774703e072b31cbf95f951 100644 (file)
@@ -37,6 +37,7 @@
 #include "modules.h"
 #include "packet.h"
 #include "tgchange.h"
+#include "s_newconf.h"
 
 static const char invite_desc[] = "Provides /invite";
 
@@ -176,7 +177,7 @@ m_invite(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source
 
        if(MyConnect(source_p))
        {
-               if (ConfigFileEntry.target_change && !IsOper(source_p) &&
+               if (ConfigFileEntry.target_change && !IsOperGeneral(source_p) &&
                                !find_allowing_channel(source_p, target_p) &&
                                !add_target(source_p, target_p))
                {
@@ -217,9 +218,7 @@ m_invite(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source
                }
 
                add_reply_target(target_p, source_p);
-               sendto_one(target_p, ":%s!%s@%s INVITE %s :%s",
-                          source_p->name, source_p->username, source_p->host,
-                          target_p->name, chptr->chname);
+               sendto_anywhere(target_p, source_p, "INVITE", ":%s", chptr->chname);
 
                if(store_invite)
                        add_invite(chptr, target_p);