]> jfr.im git - solanum.git/blobdiff - extensions/m_findforwards.c
extensions: update for API change
[solanum.git] / extensions / m_findforwards.c
index 488c610f661f796be50879d4eb6e42d47f870553..d277981546efa6de0d06c99a5a956c4e169d7edb 100644 (file)
  *   $Id: m_findforwards.c 986 2006-03-08 00:10:46Z jilles $
  */
 #include "stdinc.h"
-#include "tools.h"
 #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"
@@ -35,8 +34,9 @@
 #include "parse.h"
 #include "modules.h"
 #include "packet.h"
+#include "messages.h"
 
-static int m_findforwards(struct Client *client_p, struct Client *source_p,
+static int m_findforwards(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p,
                        int parc, const char *parv[]);
 
 struct Message findforwards_msgtab = {
@@ -50,16 +50,15 @@ DECLARE_MODULE_AV1(findforwards, NULL, NULL, findforwards_clist, NULL, NULL, "$R
 
 /*
 ** mo_findforwards
-**      parv[0] = sender prefix
 **      parv[1] = channel
 */
 static int
-m_findforwards(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
+m_findforwards(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
 {
        static time_t last_used = 0;
        struct Channel *chptr;
        struct membership *msptr;
-       dlink_node *ptr;
+       rb_dlink_node *ptr;
        char buf[414];
        char *p = buf, *end = buf + sizeof buf - 1;
        *p = '\0';
@@ -81,20 +80,20 @@ m_findforwards(struct Client *client_p, struct Client *source_p, int parc, const
                        return 0;
                }
 
-               if((last_used + ConfigFileEntry.pace_wait) > CurrentTime)
+               if((last_used + ConfigFileEntry.pace_wait) > rb_current_time())
                {
                        sendto_one(source_p, form_str(RPL_LOAD2HI),
                                        me.name, source_p->name, "FINDFORWARDS");
                        return 0;
                }
                else
-                       last_used = CurrentTime;
+                       last_used = rb_current_time();
        }
-       
-       DLINK_FOREACH(ptr, global_channel_list.head)
+
+       RB_DLINK_FOREACH(ptr, global_channel_list.head)
        {
                chptr = ptr->data;
-               if(chptr->mode.forward && !irccmp(chptr->mode.forward, parv[1]))
+               if(!irccmp(chptr->mode.forward, parv[1]))
                {
                        if(p + strlen(chptr->chname) >= end - 13)
                        {