]> jfr.im git - solanum.git/blobdiff - unsupported/m_force.c
irc_string.h -> match.h, irc_string.h; includes changed
[solanum.git] / unsupported / m_force.c
index d531977c779350eb6160623005ad7e7235da6112..146fa9c16105e65cb98bf17ace0168eba02f6d5a 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,7 +65,7 @@ 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
@@ -90,7 +85,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 +141,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 +193,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 +214,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 +236,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;
        }