*/
#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"
/*
* m_names
- * parv[0] = sender prefix
* parv[1] = channel
*/
static int
{
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");
return 0;
}
else
- last_used = CurrentTime;
+ last_used = rb_current_time();
}
names_global(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;
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;
* 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;
t = buf + mlen;
}
- tlen = ircsprintf(t, "%s ", target_p->name);
+ tlen = rb_sprintf(t, "%s ", target_p->name);
cur_len += tlen;
t += tlen;
}