]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - modules/core/m_join.c
Much clear maxconnections stuff - ported from ratbox3.
[irc/rqf/shadowircd.git] / modules / core / m_join.c
index af4c4bf38928be24d2b2599f1f4ba994e3d246e1..7c5d38464092633379147caa1614bc7e26141abb 100644 (file)
@@ -25,7 +25,6 @@
  */
 
 #include "stdinc.h"
-#include "tools.h"
 #include "channel.h"
 #include "client.h"
 #include "common.h"
@@ -263,7 +262,7 @@ m_join(struct Client *client_p, struct Client *source_p, int parc, const char *p
                        sendto_one(source_p, form_str(ERR_TOOMANYCHANNELS),
                                   me.name, source_p->name, name);
                        if(successful_join_count)
-                               source_p->localClient->last_join_time = CurrentTime;
+                               source_p->localClient->last_join_time = rb_current_time();
                        return 0;
                }
 
@@ -304,10 +303,10 @@ m_join(struct Client *client_p, struct Client *source_p, int parc, const char *p
                /* add the user to the channel */
                add_user_to_channel(chptr, source_p, flags);
                if (chptr->mode.join_num &&
-                       CurrentTime - chptr->join_delta >= chptr->mode.join_time)
+                       rb_current_time() - chptr->join_delta >= chptr->mode.join_time)
                {
                        chptr->join_count = 0;
-                       chptr->join_delta = CurrentTime;
+                       chptr->join_delta = rb_current_time();
                }
                chptr->join_count++;
 
@@ -321,7 +320,7 @@ m_join(struct Client *client_p, struct Client *source_p, int parc, const char *p
                /* its a new channel, set +nt and burst. */
                if(flags & CHFL_CHANOP)
                {
-                       chptr->channelts = CurrentTime;
+                       chptr->channelts = rb_current_time();
                        chptr->mode.mode |= MODE_TOPICLIMIT;
                        chptr->mode.mode |= MODE_NOPRIVMSGS;
 
@@ -368,7 +367,7 @@ m_join(struct Client *client_p, struct Client *source_p, int parc, const char *p
                channel_member_names(chptr, source_p, 1);
 
                if(successful_join_count)
-                       source_p->localClient->last_join_time = CurrentTime;
+                       source_p->localClient->last_join_time = rb_current_time();
 
                hook_info.client = source_p;
                hook_info.chptr = chptr;
@@ -495,10 +494,10 @@ ms_join(struct Client *client_p, struct Client *source_p, int parc, const char *
        {
                add_user_to_channel(chptr, source_p, CHFL_PEON);
                if (chptr->mode.join_num &&
-                       CurrentTime - chptr->join_delta >= chptr->mode.join_time)
+                       rb_current_time() - chptr->join_delta >= chptr->mode.join_time)
                {
                        chptr->join_count = 0;
-                       chptr->join_delta = CurrentTime;
+                       chptr->join_delta = rb_current_time();
                }
                chptr->join_count++;
                sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN :%s",
@@ -637,7 +636,7 @@ set_final_mode(struct Mode *mode, struct Mode *oldmode)
                        dir = MODE_DEL;
                }
                *mbuf++ = 'k';
-               len = ircsprintf(pbuf, "%s ", oldmode->key);
+               len = rb_sprintf(pbuf, "%s ", oldmode->key);
                pbuf += len;
        }
        if(oldmode->join_num && !mode->join_num)
@@ -666,7 +665,7 @@ set_final_mode(struct Mode *mode, struct Mode *oldmode)
                        dir = MODE_ADD;
                }
                *mbuf++ = 'l';
-               len = ircsprintf(pbuf, "%d ", mode->limit);
+               len = rb_sprintf(pbuf, "%d ", mode->limit);
                pbuf += len;
        }
        if(mode->key[0] && strcmp(oldmode->key, mode->key))
@@ -677,7 +676,7 @@ set_final_mode(struct Mode *mode, struct Mode *oldmode)
                        dir = MODE_ADD;
                }
                *mbuf++ = 'k';
-               len = ircsprintf(pbuf, "%s ", mode->key);
+               len = rb_sprintf(pbuf, "%s ", mode->key);
                pbuf += len;
        }
        if(mode->join_num && (oldmode->join_num != mode->join_num || oldmode->join_time != mode->join_time))
@@ -688,7 +687,7 @@ set_final_mode(struct Mode *mode, struct Mode *oldmode)
                        dir = MODE_ADD;
                }
                *mbuf++ = 'j';
-               len = ircsprintf(pbuf, "%d:%d ", mode->join_num, mode->join_time);
+               len = rb_sprintf(pbuf, "%d:%d ", mode->join_num, mode->join_time);
                pbuf += len;
        }
        if(mode->forward[0] && strcmp(oldmode->forward, mode->forward) && ConfigChannel.use_forward)
@@ -699,7 +698,7 @@ set_final_mode(struct Mode *mode, struct Mode *oldmode)
                        dir = MODE_ADD;
                }
                *mbuf++ = 'f';
-               len = ircsprintf(pbuf, "%s ", mode->forward);
+               len = rb_sprintf(pbuf, "%s ", mode->forward);
                pbuf += len;
        }
        *mbuf = '\0';