]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - modules/m_names.c
Add ERR_MLOCKRESTRICTED (735) to reflect bounces caused by MLOCK.
[irc/rqf/shadowircd.git] / modules / m_names.c
index e307ab9745f79b56fc717627fc06c123380b6799..298b87190626d355ac2e6d546cf46fd172d05954 100644 (file)
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_names.c 254 2005-09-21 23:35:12Z nenolod $
  */
 
 #include "stdinc.h"
-#include "sprintf_irc.h"
-#include "tools.h"
 #include "channel.h"
 #include "client.h"
 #include "common.h"
 #include "hash.h"
-#include "irc_string.h"
+#include "match.h"
 #include "ircd.h"
 #include "numeric.h"
 #include "send.h"
@@ -59,7 +56,6 @@ static void names_global(struct Client *source_p);
 
 /*
  * m_names
- *      parv[0] = sender prefix
  *      parv[1] = channel
  */
 static int
@@ -93,7 +89,7 @@ m_names(struct Client *client_p, struct Client *source_p, int parc, const char *
        {
                if(!IsOper(source_p))
                {
-                       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, "NAMES");
@@ -102,7 +98,7 @@ m_names(struct Client *client_p, struct Client *source_p, int parc, const char *
                                return 0;
                        }
                        else
-                               last_used = CurrentTime;
+                               last_used = rb_current_time();
                }
 
                names_global(source_p);
@@ -127,7 +123,7 @@ names_global(struct Client *source_p)
        int tlen;
        int cur_len;
        int dont_show = NO;
-       dlink_node *lp, *ptr;
+       rb_dlink_node *lp, *ptr;
        struct Client *target_p;
        struct Channel *chptr = NULL;
        struct membership *msptr;
@@ -135,17 +131,17 @@ names_global(struct Client *source_p)
        char *t;
 
        /* first do all visible channels */
-       DLINK_FOREACH(ptr, global_channel_list.head)
+       RB_DLINK_FOREACH(ptr, global_channel_list.head)
        {
                chptr = ptr->data;
                channel_member_names(chptr, source_p, 0);
        }
-       cur_len = mlen = ircsprintf(buf, form_str(RPL_NAMREPLY), 
+       cur_len = mlen = rb_sprintf(buf, form_str(RPL_NAMREPLY), 
                                    me.name, source_p->name, "*", "*");
        t = buf + mlen;
 
        /* Second, do all clients in one big sweep */
-       DLINK_FOREACH(ptr, global_client_list.head)
+       RB_DLINK_FOREACH(ptr, global_client_list.head)
        {
                target_p = ptr->data;
                dont_show = NO;
@@ -160,7 +156,7 @@ names_global(struct Client *source_p)
                 * both were missed out above.  if the target is on a
                 * common channel with source, its already been shown.
                 */
-               DLINK_FOREACH(lp, target_p->user->channel.head)
+               RB_DLINK_FOREACH(lp, target_p->user->channel.head)
                {
                        msptr = lp->data;
                        chptr = msptr->chptr;
@@ -183,7 +179,7 @@ names_global(struct Client *source_p)
                        t = buf + mlen;
                }
 
-               tlen = ircsprintf(t, "%s ", target_p->name);
+               tlen = rb_sprintf(t, "%s ", target_p->name);
                cur_len += tlen;
                t += tlen;
        }