]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - unsupported/m_force.c
Add description for LOCOPS message.
[irc/rqf/shadowircd.git] / unsupported / m_force.c
index d531977c779350eb6160623005ad7e7235da6112..4a621f46c95b3164667df87b4ee2abe882ff231b 100644 (file)
  *  IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  *  POSSIBILITY OF SUCH DAMAGE.
  *
- * $Id: m_force.c 1425 2006-05-23 16:41:33Z jilles $
+ * $Id: m_force.c 3297 2007-03-28 14:49:48Z jilles $
  */
 
 #include "stdinc.h"
-#include "tools.h"
 #include "channel.h"
 #include "class.h"
 #include "client.h"
 #include "common.h"
-#include "irc_string.h"
-#include "sprintf_irc.h"
+#include "match.h"
 #include "ircd.h"
 #include "hostmask.h"
 #include "numeric.h"
-#include "commio.h"
 #include "s_conf.h"
 #include "s_newconf.h"
-#include "s_log.h"
+#include "logger.h"
 #include "send.h"
 #include "hash.h"
 #include "s_serv.h"
 #include "msg.h"
 #include "parse.h"
 #include "modules.h"
-#include "event.h"
-
 
 static int mo_forcejoin(struct Client *client_p, struct Client *source_p,
                        int parc, const char *parv[]);
@@ -70,11 +65,10 @@ struct Message forcepart_msgtab = {
 
 mapi_clist_av1 force_clist[] = { &forcejoin_msgtab, &forcepart_msgtab, NULL };
 
-DECLARE_MODULE_AV1(force, NULL, NULL, force_clist, NULL, NULL, "$Revision: 1425 $");
+DECLARE_MODULE_AV1(force, NULL, NULL, force_clist, NULL, NULL, "$Revision: 3297 $");
 
 /*
  * m_forcejoin
- *      parv[0] = sender prefix
  *      parv[1] = user to force
  *      parv[2] = channel to force them into
  */
@@ -90,7 +84,7 @@ mo_forcejoin(struct Client *client_p, struct Client *source_p, int parc, const c
 
        if(!IsOperAdmin(source_p))
        {
-               sendto_one(source_p, form_str(ERR_NOPRIVS), me.name, source_p->name, "forcejoin");
+               sendto_one(source_p, form_str(ERR_NOPRIVS), me.name, source_p->name, "admin");
                return 0;
        }
 
@@ -146,8 +140,8 @@ mo_forcejoin(struct Client *client_p, struct Client *source_p, int parc, const c
                if(IsMember(target_p, chptr))
                {
                        /* debugging is fun... */
-                       sendto_one(source_p, ":%s NOTICE %s :*** Notice -- %s is already in %s",
-                                  me.name, source_p->name, target_p->name, chptr->chname);
+                       sendto_one_notice(source_p, ":*** Notice -- %s is already in %s",
+                                target_p->name, chptr->chname);
                        return 0;
                }
 
@@ -198,8 +192,7 @@ mo_forcejoin(struct Client *client_p, struct Client *source_p, int parc, const c
                /* newch can't be longer than CHANNELLEN */
                if(strlen(newch) > CHANNELLEN)
                {
-                       sendto_one(source_p, ":%s NOTICE %s :Channel name is too long", me.name,
-                                  source_p->name);
+                       sendto_one_notice(source_p, ":Channel name is too long");
                        return 0;
                }
 
@@ -220,15 +213,14 @@ mo_forcejoin(struct Client *client_p, struct Client *source_p, int parc, const c
 
                sendto_channel_local(ALL_MEMBERS, chptr, ":%s MODE %s +nt", me.name, chptr->chname);
 
-               target_p->localClient->last_join_time = CurrentTime;
+               target_p->localClient->last_join_time = rb_current_time();
                channel_member_names(chptr, target_p, 1);
 
                /* we do this to let the oper know that a channel was created, this will be
                 * seen from the server handling the command instead of the server that
                 * the oper is on.
                 */
-               sendto_one(source_p, ":%s NOTICE %s :*** Notice -- Creating channel %s", me.name,
-                          source_p->name, chptr->chname);
+               sendto_one_notice(source_p, ":*** Notice -- Creating channel %s", chptr->chname);
        }
        return 0;
 }
@@ -243,7 +235,7 @@ mo_forcepart(struct Client *client_p, struct Client *source_p, int parc, const c
 
        if(!IsOperAdmin(source_p))
        {
-               sendto_one(source_p, form_str(ERR_NOPRIVS), me.name, source_p->name, "forcepart");
+               sendto_one(source_p, form_str(ERR_NOPRIVS), me.name, source_p->name, "admin");
                return 0;
        }