Remove trailing whitespace from all .c and .h files.

3134 bytes were removed.
This commit is contained in:
Keith Buck 2014-03-03 04:25:47 +00:00
parent 00533129dc
commit 55abcbb20a
147 changed files with 2365 additions and 2365 deletions

View file

@ -128,7 +128,7 @@ static void wipe_schema(void);
static void drop_dupes(const char *user, const char *host, const char *t);
/**
* swing your pants
* swing your pants
*/
int
main(int argc, char *argv[])

View file

@ -3,7 +3,7 @@
*
* Copyright (C) 2003-2006 Lee Hardy <leeh@leeh.co.uk>
* Copyright (C) 2003-2006 ircd-ratbox development team
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
@ -27,7 +27,7 @@
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*
* $Id: rsdb_sqlite3.c 26182 2008-11-11 02:52:41Z androsyn $
*/
#include "stdinc.h"
@ -82,7 +82,7 @@ rsdb_init(rsdb_error_cb * ecb)
{
rb_snprintf(errbuf, sizeof(errbuf), "Unable to open sqlite database for write: %s", strerror(errno));
mlog(errbuf);
return -1;
return -1;
}
return 0;
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -94,7 +94,7 @@ mapi_clist_av1 test_clist[] = { &test_msgtab, NULL };
* terminated with NULLs.
*/
int doing_example_hook;
mapi_hlist_av1 test_hlist[] = {
mapi_hlist_av1 test_hlist[] = {
{ "doing_example_hook", &doing_example_hook, },
{ NULL, NULL }
};

View file

@ -173,7 +173,7 @@ modfini(void)
/* {{{ static int mo_hurt()
*
* HURT [<expire>] <ip> <reason>
*
*
* parv[1] - expire or ip
* parv[2] - ip or reason
* parv[3] - reason or NULL
@ -459,7 +459,7 @@ new_local_user_hook(struct Client *source_p)
SetTGChange(source_p);
rb_dlinkAddAlloc(source_p, &hurt_state.hurt_clients);
sendto_one_notice(source_p, ":You are hurt. Please identify to services immediately, or use /stats p for assistance.");
}
}
}
/* }}} */

View file

@ -1,4 +1,4 @@
/*
/*
* Charybdis: an advanced ircd
* ip_cloaking.c: provide user hostname cloaking
*
@ -88,7 +88,7 @@ do_host_cloak_ip(const char *inbuf, char *outbuf)
{
ipv6 = 1;
/* Damn you IPv6...
/* Damn you IPv6...
* We count the number of colons so we can calculate how much
* of the host to cloak. This is because some hostmasks may not
* have as many octets as we'd like.
@ -103,7 +103,7 @@ do_host_cloak_ip(const char *inbuf, char *outbuf)
else if (!strchr(outbuf, '.'))
return;
for (tptr = outbuf; *tptr != '\0'; tptr++)
for (tptr = outbuf; *tptr != '\0'; tptr++)
{
if (*tptr == ':' || *tptr == '.')
{
@ -131,7 +131,7 @@ do_host_cloak_host(const char *inbuf, char *outbuf)
rb_strlcpy(outbuf, inbuf, HOSTLEN + 1);
/* pass 1: scramble first section of hostname using base26
/* pass 1: scramble first section of hostname using base26
* alphabet toasted against the FNV hash of the string.
*
* numbers are not changed at this time, only letters.
@ -157,7 +157,7 @@ do_host_cloak_host(const char *inbuf, char *outbuf)
*tptr = '0' + (*tptr + accum) % 10;
accum = (accum << 1) | (accum >> 31);
}
}
}
static void

View file

@ -141,7 +141,7 @@ do_host_cloak_host(const char *inbuf, char *outbuf)
strncpy(outbuf, inbuf, HOSTLEN);
/* pass 1: scramble first section of hostname using base26
/* pass 1: scramble first section of hostname using base26
* alphabet toasted against the weighted entropy of the string.
*
* numbers are not changed at this time, only letters.
@ -164,7 +164,7 @@ do_host_cloak_host(const char *inbuf, char *outbuf)
{
*tptr = 48 + ((*tptr * accum) % 10);
}
}
}
}
static void

View file

@ -1,4 +1,4 @@
/*
/*
* Charybdis: an advanced ircd
* ip_cloaking.c: provide user hostname cloaking
*
@ -88,7 +88,7 @@ do_host_cloak_ip(const char *inbuf, char *outbuf)
{
ipv6 = 1;
/* Damn you IPv6...
/* Damn you IPv6...
* We count the number of colons so we can calculate how much
* of the host to cloak. This is because some hostmasks may not
* have as many octets as we'd like.
@ -103,7 +103,7 @@ do_host_cloak_ip(const char *inbuf, char *outbuf)
else if (!strchr(outbuf, '.'))
return;
for (tptr = outbuf; *tptr != '\0'; tptr++)
for (tptr = outbuf; *tptr != '\0'; tptr++)
{
if (*tptr == ':' || *tptr == '.')
{
@ -131,7 +131,7 @@ do_host_cloak_host(const char *inbuf, char *outbuf)
rb_strlcpy(outbuf, inbuf, HOSTLEN + 1);
/* pass 1: scramble first section of hostname using base26
/* pass 1: scramble first section of hostname using base26
* alphabet toasted against the FNV hash of the string.
*
* numbers are not changed at this time, only letters.
@ -157,7 +157,7 @@ do_host_cloak_host(const char *inbuf, char *outbuf)
*tptr = '0' + (*tptr + accum) % 10;
accum = (accum << 1) | (accum >> 31);
}
}
}
static void

View file

@ -73,7 +73,7 @@ do_host_cloak(const char *inbuf, char *outbuf, int ipmask)
{
int cyc;
unsigned int hosthash = 1, hosthash2 = 1;
unsigned int maxcycle = strlen(inbuf);
unsigned int maxcycle = strlen(inbuf);
int len1;
const char *rest, *next;

View file

@ -1,7 +1,7 @@
/*
* Copyright (C) infinity-infinity God <God@Heaven>
*
* Bob was here
* Bob was here
* $Id: m_42.c 3161 2007-01-25 07:23:01Z nenolod $
*/

View file

@ -46,7 +46,7 @@ struct Message adminwall_msgtab = {
"ADMINWALL", 0, 0, 0, MFLG_SLOW,
{mg_unreg, mg_not_oper, mg_ignore, mg_ignore, {me_adminwall, 2}, {mo_adminwall, 2}}
};
mapi_clist_av1 adminwall_clist[] = { &adminwall_msgtab, NULL };
DECLARE_MODULE_AV1(adminwall, NULL, NULL, adminwall_clist, NULL, NULL, "$Revision: 20702 $");
@ -58,8 +58,8 @@ DECLARE_MODULE_AV1(adminwall, NULL, NULL, adminwall_clist, NULL, NULL, "$Revisio
*/
static int
mo_adminwall(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
mo_adminwall(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
if(!IsAdmin(source_p))
{
sendto_one(source_p, form_str(ERR_NOPRIVS),
@ -69,11 +69,11 @@ mo_adminwall(struct Client *client_p, struct Client *source_p, int parc, const c
sendto_wallops_flags(UMODE_ADMIN, source_p, "ADMINWALL - %s", parv[1]);
sendto_match_servs(source_p, "*", CAP_ENCAP, NOCAPS, "ENCAP * ADMINWALL :%s", parv[1]);
return 0;
}
}
static int
me_adminwall(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
me_adminwall(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
sendto_wallops_flags(UMODE_ADMIN, source_p, "ADMINWALL - %s", parv[1]);
return 0;
}

View file

@ -89,7 +89,7 @@ m_findforwards(struct Client *client_p, struct Client *source_p, int parc, const
else
last_used = rb_current_time();
}
RB_DLINK_FOREACH(ptr, global_channel_list.head)
{
chptr = ptr->data;

View file

@ -21,17 +21,17 @@
#include "stdinc.h"
#include "channel.h"
#include "client.h"
#include "client.h"
#include "ircd.h"
#include "numeric.h"
#include "logger.h"
#include "s_serv.h"
#include "s_conf.h"
#include "s_newconf.h"
#include "s_newconf.h"
#include "send.h"
#include "whowas.h"
#include "match.h"
#include "hash.h"
#include "hash.h"
#include "msg.h"
#include "parse.h"
#include "modules.h"

View file

@ -101,7 +101,7 @@ mo_okick(struct Client *client_p, struct Client *source_p, int parc, const char
if((p = strchr(parv[2], ',')))
*p = '\0';
user = LOCAL_COPY(parv[2]); // strtoken(&p2, parv[2], ",");
user = LOCAL_COPY(parv[2]); // strtoken(&p2, parv[2], ",");
if(!(who = find_chasing(source_p, user, &chasing)))
{
return 0;

View file

@ -110,20 +110,20 @@ mo_omode(struct Client *client_p, struct Client *source_p, int parc, const char
rb_strlcat(params, parv[i], sizeof params);
}
sendto_wallops_flags(UMODE_WALLOP, &me,
sendto_wallops_flags(UMODE_WALLOP, &me,
"OMODE called for [%s] [%s] by %s!%s@%s",
parv[1], params, source_p->name, source_p->username, source_p->host);
ilog(L_MAIN, "OMODE called for [%s] [%s] by %s",
parv[1], params, get_oper_name(source_p));
if(*chptr->chname != '&')
sendto_server(NULL, NULL, NOCAPS, NOCAPS,
sendto_server(NULL, NULL, NOCAPS, NOCAPS,
":%s WALLOPS :OMODE called for [%s] [%s] by %s!%s@%s",
me.name, parv[1], params, source_p->name, source_p->username,
source_p->host);
#if 0
set_channel_mode(client_p, source_p->servptr, chptr, msptr,
set_channel_mode(client_p, source_p->servptr, chptr, msptr,
parc - 2, parv + 2);
#else
if (parc == 4 && !strcmp(parv[2], "+o") && !irccmp(parv[3], source_p->name))
@ -153,7 +153,7 @@ mo_omode(struct Client *client_p, struct Client *source_p, int parc, const char
add_user_to_channel(chptr, source_p, CHFL_CHANOP);
msptr = find_channel_membership(chptr, source_p);
}
set_channel_mode(client_p, source_p, chptr, msptr,
set_channel_mode(client_p, source_p, chptr, msptr,
parc - 2, parv + 2);
/* We know they were not opped before and they can't have opped
* themselves as set_channel_mode() does not allow that

View file

@ -131,12 +131,12 @@ m_remove(struct Client *client_p, struct Client *source_p, int parc, const char
* There are two cases we can get to this point then...
*
* 1) connect burst is happening, and for some reason a legit
* op has sent a KICK, but the SJOIN hasn't happened yet or
* op has sent a KICK, but the SJOIN hasn't happened yet or
* been seen. (who knows.. due to lag...)
*
* 2) The channel is desynced. That can STILL happen with TS
*
* Now, the old code roger wrote, would allow the KICK to
*
* Now, the old code roger wrote, would allow the KICK to
* go through. Thats quite legit, but lets weird things like
* KICKS by users who appear not to be chanopped happen,
* or even neater, they appear not to be on the channel.

View file

@ -6,9 +6,9 @@
* to clearly show that it is fake. SCENE is a special case and not underlined.
* these commands only work on channels set +N
*
* also adds oper commands FSAY and FACTION, which are like NPC and NPCA
* also adds oper commands FSAY and FACTION, which are like NPC and NPCA
* except without the underline.
*
*
* all of these messages have the hostmask npc.fakeuser.invalid, and their ident
* is the nickname of the user running the commands.
*/
@ -66,32 +66,32 @@ struct Message scene_msgtab = {
struct Message ambiance_msgtab = {
"AMBIANCE", 0, 0, 0, MFLG_SLOW,
{mg_unreg, {m_scene, 3}, mg_ignore, mg_ignore, mg_ignore, {m_scene, 3}}
};
};
struct Message fsay_msgtab = {
"FSAY", 0, 0, 0, MFLG_SLOW,
{mg_unreg, {m_npc, 4}, mg_ignore, mg_ignore, mg_ignore, {m_fsay, 4}}
};
};
struct Message faction_msgtab = {
"FACTION", 0, 0, 0, MFLG_SLOW,
{mg_unreg, {m_npca, 4}, mg_ignore, mg_ignore, mg_ignore, {m_faction, 4}}
};
};
struct Message npc_msgtab = {
"NPC", 0, 0, 0, MFLG_SLOW,
{mg_unreg, {m_npc, 4}, mg_ignore, mg_ignore, mg_ignore, {m_npc, 4}}
};
};
struct Message npca_msgtab = {
"NPCA", 0, 0, 0, MFLG_SLOW,
{mg_unreg, {m_npca, 4}, mg_ignore, mg_ignore, mg_ignore, {m_npca, 4}}
};
};
struct Message roleplay_msgtab = {
"ROLEPLAY", 0, 0, 0, MFLG_SLOW,
{mg_ignore, mg_ignore, mg_ignore, mg_ignore, {me_roleplay, 4}, mg_ignore}
};
};
mapi_clist_av1 roleplay_clist[] = { &scene_msgtab, &ambiance_msgtab, &fsay_msgtab, &faction_msgtab, &npc_msgtab, &npca_msgtab, &roleplay_msgtab, NULL };
@ -221,6 +221,6 @@ me_roleplay(struct Client *client_p, struct Client *source_p, int parc, const ch
if((chptr = find_channel(parv[1])) == NULL)
return 0;
sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@npc.fakeuser.invalid PRIVMSG %s :%s", parv[2], source_p->name, parv[1], parv[3]);
sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@npc.fakeuser.invalid PRIVMSG %s :%s", parv[2], source_p->name, parv[1], parv[3]);
return 0;
}

View file

@ -69,7 +69,7 @@ DECLARE_MODULE_AV1(webirc, NULL, NULL, webirc_clist, NULL, NULL, "$Revision: 207
* mr_webirc - webirc message handler
* parv[1] = password
* parv[2] = fake username (we ignore this)
* parv[3] = fake hostname
* parv[3] = fake hostname
* parv[4] = fake ip
*/
static int
@ -87,7 +87,7 @@ mr_webirc(struct Client *client_p, struct Client *source_p, int parc, const char
return 0;
}
aconf = find_address_conf(client_p->host, client_p->sockhost,
aconf = find_address_conf(client_p->host, client_p->sockhost,
IsGotId(client_p) ? client_p->username : "webirc",
IsGotId(client_p) ? client_p->username : "webirc",
(struct sockaddr *) &client_p->localClient->ip,
@ -143,7 +143,7 @@ mr_webirc(struct Client *client_p, struct Client *source_p, int parc, const char
source_p->localClient->ip = addr;
/* Check dlines now, klines will be checked on registration */
if((aconf = find_dline((struct sockaddr *)&source_p->localClient->ip,
if((aconf = find_dline((struct sockaddr *)&source_p->localClient->ip,
source_p->localClient->ip.ss_family)))
{
if(!(aconf->status & CONF_EXEMPTDLINE))

View file

@ -221,7 +221,7 @@ handle_client_exit(void *vdata)
rb_dlinkDelete(n, &overriding_opers);
rb_free(session_p);
}
}
}
struct ev_entry *expire_override_deadlines_ev = NULL;

View file

@ -48,7 +48,7 @@ show_whois(hook_data_client *data)
struct Client *source_p = data->client;
struct Client *target_p = data->target;
if(MyClient(target_p) &&
if(MyClient(target_p) &&
#ifdef OPERONLY
IsOper(target_p) &&
#endif

View file

@ -215,7 +215,7 @@ void free_ban(struct Ban *bptr);
extern void destroy_channel(struct Channel *);
extern int can_send(struct Channel *chptr, struct Client *who,
extern int can_send(struct Channel *chptr, struct Client *who,
struct membership *);
extern int flood_attack_channel(int p_or_n, struct Client *source_p,
struct Channel *chptr, char *chname);

View file

@ -133,10 +133,10 @@ struct Client
/* client->name is the unique name for a client nick or host */
char name[HOSTLEN + 1];
/*
* client->username is the username from ident or the USER message,
* If the client is idented the USER message is ignored, otherwise
* the username part of the USER message is put here prefixed with a
/*
* client->username is the username from ident or the USER message,
* If the client is idented the USER message is ignored, otherwise
* the username part of the USER message is put here prefixed with a
* tilde depending on the I:line, Once a client has registered, this
* field should be considered read-only.
*/
@ -177,13 +177,13 @@ struct LocalUser
* (directly connected to *this* server with a socket.
*/
/* Anti flooding part, all because of lamers... */
time_t last_join_time; /* when this client last
time_t last_join_time; /* when this client last
joined a channel */
time_t last_leave_time; /* when this client last
time_t last_leave_time; /* when this client last
* left a channel */
int join_leave_count; /* count of JOIN/LEAVE in less than
int join_leave_count; /* count of JOIN/LEAVE in less than
MIN_JOIN_LEAVE_TIME seconds */
int oper_warn_count_down; /* warn opers of this possible
int oper_warn_count_down; /* warn opers of this possible
spambot every time this gets to 0 */
time_t last_caller_id_time;
@ -197,10 +197,10 @@ struct LocalUser
* we want to use unsigned int here so the sizes have a better chance of
* staying the same on 64 bit machines. The current trend is to use
* I32LP64, (32 bit ints, 64 bit longs and pointers) and since ircd
* will NEVER run on an operating system where ints are less than 32 bits,
* will NEVER run on an operating system where ints are less than 32 bits,
* it's a relatively safe bet to use ints. Since right shift operations are
* performed on these, it's not safe to allow them to become negative,
* which is possible for long running server connections. Unsigned values
* performed on these, it's not safe to allow them to become negative,
* which is possible for long running server connections. Unsigned values
* generally overflow gracefully. --Bleep
*/
unsigned int sendM; /* Statistics: protocol messages send */

View file

@ -29,7 +29,7 @@
#include "setup.h"
/*
/*
* Directory paths and filenames for UNIX systems.
* IRCD_PREFIX is set using ./configure --prefix, see INSTALL.
* The other defaults should be fine.
@ -53,7 +53,7 @@
#define LIBPATH IRCD_PREFIX "/lib/"
#define MODPATH MODULE_DIR
#define AUTOMODPATH MODULE_DIR "/autoload/"
#define ETCPATH ETC_DIR
#define ETCPATH ETC_DIR
#define LOGPATH LOG_DIR
#define UHPATH HELP_DIR "/users"
#define HPATH HELP_DIR "/opers"
@ -95,7 +95,7 @@
#define KILLCHASETIMELIMIT 90 /* Recommended value: 90 */
/* RATBOX_SOMAXCONN
* Use SOMAXCONN if OS has it, otherwise use this value for the
* Use SOMAXCONN if OS has it, otherwise use this value for the
* listen(); backlog. 5 for AIX/SUNOS, 25 for other OSs.
*/
#define RATBOX_SOMAXCONN 25

View file

@ -47,7 +47,7 @@ void delete_one_address_conf(const char *, struct ConfItem *);
void clear_out_address_conf(void);
void clear_out_address_conf_bans(void);
void init_host_hash(void);
struct ConfItem *find_address_conf(const char *host, const char *sockhost,
struct ConfItem *find_address_conf(const char *host, const char *sockhost,
const char *, const char *, struct sockaddr *,
int, char *);

View file

@ -27,7 +27,7 @@
/*
* NOTE: NICKLEN and TOPICLEN do not live here anymore. Set it with configure
* Otherwise there are no user servicable part here.
* Otherwise there are no user servicable part here.
*
*/
@ -91,8 +91,8 @@
#define HELPLEN 400
/*
* message return values
/*
* message return values
*/
#define CLIENT_EXITED -2
#define CLIENT_PARSE_ERROR -1

View file

@ -52,9 +52,9 @@ int comp_with_mask(void *addr, void *dest, u_int mask);
int comp_with_mask_sock(struct sockaddr *addr, struct sockaddr *dest, u_int mask);
/*
* collapse - collapse a string in place, converts multiple adjacent *'s
* collapse - collapse a string in place, converts multiple adjacent *'s
* into a single *.
* collapse - modifies the contents of pattern
* collapse - modifies the contents of pattern
*
* collapse_esc() - collapse with support for escaping chars
*/

View file

@ -1,4 +1,4 @@
/*
/*
* ircd-ratbox: an advanced Internet Relay Chat Daemon(ircd).
* monitor.h: Code for server-side notify lists.
*

View file

@ -73,7 +73,7 @@
#define RPL_STATSYLINE 218
#define RPL_ENDOFSTATS 219
/* note ircu uses 217 for STATSPLINE frip. conflict
* as RPL_STATSQLINE was used in old 2.8 for Q line
* as RPL_STATSQLINE was used in old 2.8 for Q line
* I'm going to steal 220 for now *sigh*
* -Dianora
*/
@ -302,7 +302,7 @@
#define ERR_USERNOTONSERV 504
/* #define ERR_LAST_ERR_MSG 505
/* #define ERR_LAST_ERR_MSG 505
* moved to 999
*/
#define ERR_WRONGPONG 513

View file

@ -33,7 +33,7 @@ struct Message;
struct Client;
extern void parse(struct Client *, char *, char *);
extern void handle_encap(struct Client *, struct Client *,
extern void handle_encap(struct Client *, struct Client *,
const char *, int, const char *parv[]);
extern void clear_hash_parse(void);
extern void mod_add_cmd(struct Message *msg);

View file

@ -13,7 +13,7 @@
#include "match.h"
#include "ircd.h"
/* Maximum number of nameservers in /etc/resolv.conf we care about
/* Maximum number of nameservers in /etc/resolv.conf we care about
* In hybrid, this was 2 -- but in Charybdis, we want to track
* a few more than that ;) --nenolod
*/

View file

@ -150,7 +150,7 @@ struct config_file_entry
char *identifyservice;
char *identifycommand;
char *fname_userlog;
char *fname_fuserlog;
char *fname_operlog;

View file

@ -220,7 +220,7 @@ extern struct server_conf *find_server_conf(const char *name);
extern void attach_server_conf(struct Client *, struct server_conf *);
extern void detach_server_conf(struct Client *);
extern void set_server_conf_autoconn(struct Client *source_p, const char *name,
extern void set_server_conf_autoconn(struct Client *source_p, const char *name,
int newval);
extern void disable_server_conf_autoconn(const char *name);

View file

@ -39,7 +39,7 @@
/*
* number of seconds to wait after server starts up, before
* starting try_connections()
* TOO SOON and you can nick collide like crazy.
* TOO SOON and you can nick collide like crazy.
*/
#define STARTUP_CONNECTIONS_TIME 60
@ -105,7 +105,7 @@ extern int MaxConnectionCount; /* GLOBAL - highest number of connections */
extern int refresh_user_links;
/*
* return values for hunt_server()
* return values for hunt_server()
*/
#define HUNTED_NOSUCH (-1) /* if the hunted server is not found */
#define HUNTED_ISME 0 /* if this server should execute the command */

View file

@ -43,7 +43,7 @@ extern void send_umode_out(struct Client *, struct Client *, int);
extern int show_lusers(struct Client *source_p);
extern int register_local_user(struct Client *, struct Client *, const char *);
extern int introduce_client(struct Client *client_p, struct Client *source_p,
extern int introduce_client(struct Client *client_p, struct Client *source_p,
struct User *user, const char *nick, int use_euid);
extern void change_nick_user_host(struct Client *target_p, const char *nick, const char *user,

View file

@ -74,7 +74,7 @@ extern void sendto_common_channels_local_butone(struct Client *, int cap, const
extern void sendto_match_butone(struct Client *, struct Client *,
const char *, int, const char *, ...) AFP(5, 6);
extern void sendto_match_servs(struct Client *source_p, const char *mask,
extern void sendto_match_servs(struct Client *source_p, const char *mask,
int capab, int, const char *, ...) AFP(5, 6);
extern void sendto_monitor(struct monitor *monptr, const char *, ...) AFP(2, 3);
@ -89,7 +89,7 @@ extern void sendto_wallops_flags(int, struct Client *, const char *, ...) AFP(3,
extern void kill_client(struct Client *client_p, struct Client *diedie,
const char *pattern, ...) AFP(3, 4);
extern void kill_client_serv_butone(struct Client *one, struct Client *source_p,
extern void kill_client_serv_butone(struct Client *one, struct Client *source_p,
const char *pattern, ...) AFP(3, 4);
#define L_ALL 0

View file

@ -49,7 +49,7 @@ char *alloca ();
# endif
# endif
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
@ -143,7 +143,7 @@ extern int errno;
#ifdef strdupa
#define LOCAL_COPY(s) strdupa(s)
#define LOCAL_COPY(s) strdupa(s)
#else
#if defined(__INTEL_COMPILER) || defined(__GNUC__)
# define LOCAL_COPY(s) __extension__({ char *_s = alloca(strlen(s) + 1); strcpy(_s, s); _s; })

View file

@ -4,11 +4,11 @@
*
* Entirely rewritten, August 2006 by Jilles Tjoelker
* Copyright (C) 2006 Jilles Tjoelker
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
*
* 1.Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2.Redistributions in binary form must reproduce the above copyright
@ -16,7 +16,7 @@
* documentation and/or other materials provided with the distribution.
* 3.The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

View file

@ -1,7 +1,7 @@
/*
* ircd-ratbox: A slightly useful ircd
* helper.h: Starts and deals with ircd helpers
*
*
* Copyright (C) 2006 Aaron Sethman <androsyn@ratbox.org>
*
* This program is free software; you can redistribute it and/or modify

View file

@ -3,7 +3,7 @@
* Dave Plonka <plonka@doit.wisc.edu>
*
* This product includes software developed by the University of Michigan,
* Merit Network, Inc., and their contributors.
* Merit Network, Inc., and their contributors.
*
* This file had been called "radix.h" in the MRT sources.
*

View file

@ -69,14 +69,14 @@ void rb_init_rb_dlink_nodes(size_t dh_size);
*/
/*
* Walks forward of a list.
* Walks forward of a list.
* pos is your node
* head is your list head
*/
#define RB_DLINK_FOREACH(pos, head) for (pos = (head); pos != NULL; pos = pos->next)
/*
* Walks forward of a list safely while removing nodes
* Walks forward of a list safely while removing nodes
* pos is your node
* n is another list head for temporary storage
* head is your list head
@ -94,7 +94,7 @@ void rb_init_rb_dlink_nodes(size_t dh_size);
#define rb_dlinkDestroy(node, list) do { rb_dlinkDelete(node, list); rb_free_rb_dlink_node(node); } while(0)
/*
/*
* dlink_ routines are stolen from squid, except for rb_dlinkAddBefore,
* which is mine.
* -- adrian
@ -183,7 +183,7 @@ rb_dlinkMoveTail(rb_dlink_node *m, rb_dlink_list *list)
if(list->tail == m)
return;
/* From here assume that m->next != NULL as that can only
/* From here assume that m->next != NULL as that can only
* be at the tail and assume that the node is on the list
*/
@ -293,7 +293,7 @@ rb_dlinkFindDestroy(void *data, rb_dlink_list *list)
/*
* rb_dlinkFind
* inputs - list to search
* inputs - list to search
* - data
* output - pointer to link or NULL if not found
* side effects - Look for ptr in the linked listed pointed to by link.

View file

@ -6,11 +6,11 @@
* Copyright (C) 1996-2002 Hybrid Development Team
* Copyright (C) 2002-2006 ircd-ratbox development team
*
* Below are the orignal headers from the old blalloc.c
* Below are the orignal headers from the old blalloc.c
*
* File: blalloc.c
* Owner: Wohali (Joan Touzet)
*
*
* Modified 2001/11/29 for mmap() support by Aaron Sethman <androsyn@ratbox.org>
*
* This program is free software; you can redistribute it and/or modify
@ -31,7 +31,7 @@
* $Id: balloc.c 26100 2008-09-20 01:27:19Z androsyn $
*/
/*
/*
* About the block allocator
*
* Basically we have three ways of getting memory off of the operating
@ -39,11 +39,11 @@
*
* 1. mmap() anonymous pages with the MMAP_ANON flag.
* 2. mmap() via the /dev/zero trick.
* 3. HeapCreate/HeapAlloc (on win32)
* 4. malloc()
* 3. HeapCreate/HeapAlloc (on win32)
* 4. malloc()
*
* The advantages of 1 and 2 are this. We can munmap() the pages which will
* return the pages back to the operating system, thus reducing the size
* return the pages back to the operating system, thus reducing the size
* of the process as the memory is unused. malloc() on many systems just keeps
* a heap of memory to itself, which never gets given back to the OS, except on
* exit. This of course is bad, if say we have an event that causes us to allocate
@ -52,7 +52,7 @@
* malloc() has it locked up in its heap. With the mmap() method, we can munmap()
* the block and return it back to the OS, thus causing our memory consumption to go
* down after we no longer need it.
*
*
*
*
*/
@ -138,7 +138,7 @@ free_block(void *ptr, size_t size)
/*
* void rb_init_bh(void)
*
*
* Inputs: None
* Outputs: None
* Side Effects: Initializes the block heap
@ -171,7 +171,7 @@ rb_init_bh(void)
#ifndef NOBALLOC
/*
* static inline void *get_block(size_t size)
*
*
* Input: Size of block to allocate
* Output: Pointer to new block
* Side Effects: None

View file

@ -199,7 +199,7 @@ rb_getmaxconnect(void)
/*
* set_sock_buffers - set send and receive buffers for socket
*
*
* inputs - fd file descriptor
* - size to set
* output - returns true (1) if successful, false (0) otherwise
@ -218,7 +218,7 @@ rb_set_buffers(rb_fde_t *F, int size)
}
/*
* set_non_blocking - Set the client connection into non-blocking mode.
* set_non_blocking - Set the client connection into non-blocking mode.
*
* inputs - fd to set into non blocking mode
* output - 1 if successful 0 if not
@ -696,7 +696,7 @@ rb_socket(int family, int sock_type, int proto, const char *note)
return NULL; /* errno will be passed through, yay.. */
#if defined(RB_IPV6) && defined(IPV6_V6ONLY)
/*
/*
* Make sure we can take both IPv4 and IPv6 connections
* on an AF_INET6 socket
*/
@ -991,8 +991,8 @@ rb_read(rb_fde_t *F, void *buf, int count)
if(F == NULL)
return 0;
/* This needs to be *before* RB_FD_SOCKET otherwise you'll process
* an SSL socket as a regular socket
/* This needs to be *before* RB_FD_SOCKET otherwise you'll process
* an SSL socket as a regular socket
*/
#ifdef HAVE_SSL
if(F->type & RB_FD_SSL)
@ -1104,7 +1104,7 @@ rb_writev(rb_fde_t *F, struct rb_iovec * vector, int count)
#endif
/*
/*
* From: Thomas Helvey <tomh@inxpress.net>
*/
static const char *IpQuadTab[] = {

View file

@ -143,7 +143,7 @@ rb_crypt(const char *key, const char *salt)
*/
/* Re-entrantify me -- all this junk needs to be in
/* Re-entrantify me -- all this junk needs to be in
* struct crypt_data to make this really reentrant... */
static uint8_t inv_key_perm[64];
static uint8_t inv_comp_perm[56];
@ -160,8 +160,8 @@ static uint32_t old_salt;
static uint32_t old_rawkey0, old_rawkey1;
/* Static stuff that stays resident and doesn't change after
* being initialized, and therefore doesn't need to be made
/* Static stuff that stays resident and doesn't change after
* being initialized, and therefore doesn't need to be made
* reentrant. */
static uint8_t init_perm[64], final_perm[64];
static uint8_t m_sbox[4][4096];
@ -777,7 +777,7 @@ static void MD5Final (unsigned char [16], MD5_CTX *);
#ifndef WORDS_BIGENDIAN
#define Encode memcpy
#define Decode memcpy
#else
#else
/*
* Encodes input (uint32_t) into output (unsigned char). Assumes len is
@ -866,7 +866,7 @@ MD5Init (context)
context->state[3] = 0x10325476;
}
/*
/*
* MD5 block update operation. Continues an MD5 message-digest
* operation, processing another message block, and updating the
* context.

View file

@ -54,7 +54,7 @@ static rb_dlink_list event_list;
static time_t event_time_min = -1;
/*
* struct ev_entry *
* struct ev_entry *
* rb_event_find(EVH *func, void *arg)
*
* Input: Event function and the argument passed to it
@ -77,7 +77,7 @@ rb_event_find(EVH * func, void *arg)
}
/*
* struct ev_entry *
* struct ev_entry *
* rb_event_add(const char *name, EVH *func, void *arg, time_t when)
*
* Input: Name of event, function to call, arguments to pass, and frequency
@ -158,7 +158,7 @@ rb_event_find_delete(EVH * func, void *arg)
rb_event_delete(rb_event_find(func, arg));
}
/*
/*
* struct ev_entry *
* rb_event_addish(const char *name, EVH *func, void *arg, time_t delta_isa)
*
@ -266,7 +266,7 @@ rb_event_io_register_all(void)
*
* Input: None
* Output: None
* Side Effects: Initializes the event system.
* Side Effects: Initializes the event system.
*/
void
rb_event_init(void)
@ -298,7 +298,7 @@ rb_dump_events(void (*func) (char *, void *), void *ptr)
}
}
/*
/*
* void rb_set_back_events(time_t by)
* Input: Time to set back events by.
* Output: None.

View file

@ -14,7 +14,7 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
@ -128,7 +128,7 @@ rb_ssl_tryaccept(rb_fde_t *F, void *data)
F->accept = NULL;
rb_settimeout(F, 0, NULL, NULL);
rb_setselect(F, RB_SELECT_READ | RB_SELECT_WRITE, NULL, NULL);
if(ret > 0)
ad->callback(F, RB_OK, (struct sockaddr *)&ad->S, ad->addrlen, ad->data);
else
@ -617,9 +617,9 @@ rb_supports_ssl(void)
void
rb_get_ssl_info(char *buf, size_t len)
{
rb_snprintf(buf, len, "GNUTLS: compiled (%s), library(%s)",
rb_snprintf(buf, len, "GNUTLS: compiled (%s), library(%s)",
LIBGNUTLS_VERSION, gnutls_check_version(NULL));
}
#endif /* HAVE_GNUTLS */

View file

@ -1,7 +1,7 @@
/*
* ircd-ratbox: A slightly useful ircd
* helper.c: Starts and deals with ircd helpers
*
*
* Copyright (C) 2006 Aaron Sethman <androsyn@ratbox.org>
*
* This program is free software; you can redistribute it and/or modify

View file

@ -185,7 +185,7 @@ rb_linebuf_donebuf(buf_head_t * bufhead)
* rb_linebuf_copy_line
*
* Okay..this functions comments made absolutely no sense.
*
*
* Basically what we do is this. Find the first chunk of text
* and then scan for a CRLF. If we didn't find it, but we didn't
* overflow our buffer..we wait for some more data.
@ -700,8 +700,8 @@ rb_linebuf_flush(rb_fde_t *F, buf_head_t * bufhead)
buf_line_t *bufline;
int retval;
/*
* autoconf checks for this..but really just want to use it if we have a
/*
* autoconf checks for this..but really just want to use it if we have a
* native version even if libircd provides a fake version...
*/
#ifdef HAVE_WRITEV

View file

@ -1,4 +1,4 @@
/*
/*
* libratbox: a library used by ircd-ratbox and other things
* nossl.c: ssl stub code
*
@ -14,12 +14,12 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA
*
*
* $Id: commio.c 24808 2008-01-02 08:17:05Z androsyn $
*/
@ -172,7 +172,7 @@ rb_ssl_clear_handshake_count(rb_fde_t *F)
void
rb_get_ssl_info(char *buf, size_t len)
{
rb_snprintf(buf, len, "Not compiled with SSL support");
rb_snprintf(buf, len, "Not compiled with SSL support");
}
#endif /* !HAVE_OPENSSL */

View file

@ -14,7 +14,7 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
@ -682,7 +682,7 @@ rb_supports_ssl(void)
void
rb_get_ssl_info(char *buf, size_t len)
{
rb_snprintf(buf, len, "Using SSL: %s compiled: 0x%lx, library 0x%lx",
rb_snprintf(buf, len, "Using SSL: %s compiled: 0x%lx, library 0x%lx",
SSLeay_version(SSLEAY_VERSION),
(long)OPENSSL_VERSION_NUMBER, SSLeay());
}

View file

@ -1,6 +1,6 @@
/*
* Yanked out of Net::Patricia by Aaron Sethman <androsyn@ratbox.org>
*
*
* This was then yanked out of the ratbox/devel/src tree and stuffed into
* libratbox and had function names changed, but otherwise not really altered.
*
@ -8,7 +8,7 @@
* Dave Plonka <plonka@doit.wisc.edu>
*
* This product includes software developed by the University of Michigan,
* Merit Network, Inc., and their contributors.
* Merit Network, Inc., and their contributors.
*
* This file had been called "radix.c" in the MRT sources.
*
@ -263,7 +263,7 @@ Deref_Prefix(rb_prefix_t *prefix)
/* } */
// #define PATRICIA_DEBUG 1
// #define PATRICIA_DEBUG 1
static int num_active_patricia = 0;

View file

@ -106,9 +106,9 @@ rb_setselect_ports(rb_fde_t *F, unsigned int type, PF * handler, void *client_da
port_dissociate(pe, PORT_SOURCE_FD, F->fd);
return;
}
port_associate(pe, PORT_SOURCE_FD, F->fd, F->pflags, F);
}
/*
@ -191,24 +191,24 @@ rb_ports_sched_event(struct ev_entry *event, int when)
event->comm_ptr = rb_malloc(sizeof(timer_t));
id = event->comm_ptr;
memset(&ev, 0, sizeof(ev));
ev.sigev_notify = SIGEV_PORT;
ev.sigev_value.sival_ptr = &not;
memset(&not, 0, sizeof(not));
memset(&not, 0, sizeof(not));
not.portnfy_port = pe;
not.portnfy_user = event;
if(timer_create(CLOCK_REALTIME, &ev, id) < 0)
{
rb_lib_log("timer_create: %s\n", strerror(errno));
return 0;
}
memset(&ts, 0, sizeof(ts));
ts.it_value.tv_sec = when;
ts.it_value.tv_nsec = 0;
ts.it_value.tv_nsec = 0;
if(event->frequency != 0)
ts.it_interval = ts.it_value;
@ -217,7 +217,7 @@ rb_ports_sched_event(struct ev_entry *event, int when)
rb_lib_log("timer_settime: %s\n", strerror(errno));
return 0;
}
return 1;
return 1;
}
void
@ -241,14 +241,14 @@ rb_ports_init_event(void)
{
return;
}
int
rb_ports_sched_event(struct ev_entry *event, int when)
{
errno = ENOSYS;
return -1;
}
void
rb_ports_unsched_event(struct ev_entry *event)
{

View file

@ -1,7 +1,7 @@
/*
* ircd-ratbox: A slight useful ircd
* rawbuf.c: raw buffer (non-line oriented buffering)
*
*
* Copyright (C) 2007 Aaron Sethman <androsyn@ratbox.org>
* Copyright (C) 2007 ircd-ratbox development team
*

View file

@ -121,7 +121,7 @@ resize_pollarray(int fd)
/*
* void setup_sigio_fd(int fd)
*
*
* Input: File descriptor
* Output: None
* Side Effect: Sets the FD up for SIGIO

View file

@ -18,7 +18,7 @@
* Wirzenius wrote this portably, Torvalds fucked it up :-)
*/
/*
/*
* Fri Jul 13 2001 Crutcher Dunnavant <crutcher+kernel@datastacks.com>
* - changed to provide snprintf and vsnprintf functions
* So Feb 1 16:51:32 CET 2004 Juergen Quade <quade@hsnr.de>

View file

@ -70,7 +70,7 @@ rb_make_rb_dlink_node(void)
*
* inputs - pointer to rb_dlink_node
* output - NONE
* side effects - free given rb_dlink_node
* side effects - free given rb_dlink_node
*/
void
rb_free_rb_dlink_node(rb_dlink_node *ptr)
@ -206,7 +206,7 @@ rb_strnlen(const char *s, size_t count)
*
* input -
* output -
* side effects -
* side effects -
*/
char *
rb_basename(const char *path)
@ -233,11 +233,11 @@ rb_dirname (const char *path)
if(s == NULL)
{
return rb_strdup(".");
}
}
/* remove extra slashes */
while(s > path && *s == '/')
--s;
return rb_strndup(path, ((uintptr_t)s - (uintptr_t)path) + 2);
return rb_strndup(path, ((uintptr_t)s - (uintptr_t)path) + 2);
}

View file

@ -36,7 +36,7 @@
#include <spawn.h>
#ifdef __APPLE__
#include <crt_externs.h>
#include <crt_externs.h>
#endif
#ifndef __APPLE__

View file

@ -157,7 +157,7 @@ rb_kill(int pid, int sig)
HANDLE hProcess;
int ret = -1;
hProcess = OpenProcess(PROCESS_ALL_ACCESS, TRUE, pid);
if(hProcess)
{
switch (sig)
@ -188,7 +188,7 @@ rb_kill(int pid, int sig)
WSAPROTOCOL_INFO * count
size_t datasize
data
*/
static int
@ -477,7 +477,7 @@ rb_select_win32(long delay)
if(has_set_timer == 0)
{
/* XXX should probably have this handle all the events
* instead of busy looping
* instead of busy looping
*/
SetTimer(hwnd, 0, delay, NULL);
has_set_timer = 1;

View file

@ -1,7 +1,7 @@
/*
* charybdis: An advanced ircd.
* m_ban.c: Propagates network bans across servers.
*
*
* Copyright (C) 2010 Jilles Tjoelker
*
* Redistribution and use in source and binary forms, with or without

View file

@ -640,7 +640,7 @@ ms_sjoin(struct Client *client_p, struct Client *source_p, int parc, const char
if(isnew)
chptr->channelts = newts;
else if(newts == 0 || oldts == 0)
chptr->channelts = 0;
else if(newts == oldts)
@ -1183,8 +1183,8 @@ set_final_mode(struct Mode *mode, struct Mode *oldmode)
* remove_our_modes
*
* inputs -
* output -
* side effects -
* output -
* side effects -
*/
static void
remove_our_modes(struct Channel *chptr, struct Client *source_p)

View file

@ -120,12 +120,12 @@ m_kick(struct Client *client_p, struct Client *source_p, int parc, const char *p
* There are two cases we can get to this point then...
*
* 1) connect burst is happening, and for some reason a legit
* op has sent a KICK, but the SJOIN hasn't happened yet or
* op has sent a KICK, but the SJOIN hasn't happened yet or
* been seen. (who knows.. due to lag...)
*
* 2) The channel is desynced. That can STILL happen with TS
*
* Now, the old code roger wrote, would allow the KICK to
*
* Now, the old code roger wrote, would allow the KICK to
* go through. Thats quite legit, but lets weird things like
* KICKS by users who appear not to be chanopped happen,
* or even neater, they appear not to be on the channel.

View file

@ -141,7 +141,7 @@ mo_kill(struct Client *client_p, struct Client *source_p, int parc, const char *
* that have been around for ever, for no reason.. */
sendto_realops_snomask(SNO_GENERAL, L_ALL,
"Received KILL message for %s!%s@%s. From %s Path: %s (%s)",
target_p->name, target_p->username, target_p->orighost,
target_p->name, target_p->username, target_p->orighost,
source_p->name, me.name, reason);
ilog(L_KILL, "%c %s %s!%s@%s %s %s",
@ -217,7 +217,7 @@ ms_kill(struct Client *client_p, struct Client *source_p, int parc, const char *
if((target_p = find_person(user)) == NULL)
{
/*
* If the user has recently changed nick, but only if its
* If the user has recently changed nick, but only if its
* not an uid, automatically rewrite the KILL for this new nickname.
* --this keeps servers in synch when nick change and kill collide
*/
@ -258,7 +258,7 @@ ms_kill(struct Client *client_p, struct Client *source_p, int parc, const char *
{
sendto_realops_snomask(IsService(source_p) ? SNO_SKILL : SNO_GENERAL, L_ALL,
"Received KILL message for %s!%s@%s. From %s Path: %s!%s!%s!%s %s",
target_p->name, target_p->username, target_p->orighost, source_p->name,
target_p->name, target_p->username, target_p->orighost, source_p->name,
source_p->servptr->name, source_p->host, source_p->username,
source_p->name, reason);

View file

@ -618,7 +618,7 @@ msg_channel_opmod(enum message_type msgtype,
/*
* msg_channel_flags
*
* inputs - flag 0 if PRIVMSG 1 if NOTICE. RFC
* inputs - flag 0 if PRIVMSG 1 if NOTICE. RFC
* say NOTICE must not auto reply
* - pointer to client_p
* - pointer to source_p
@ -704,7 +704,7 @@ expire_tgchange(void *unused)
/*
* msg_client
*
* inputs - flag 0 if PRIVMSG 1 if NOTICE. RFC
* inputs - flag 0 if PRIVMSG 1 if NOTICE. RFC
* say NOTICE must not auto reply
* - pointer to source_p source (struct Client *)
* - pointer to target_p target (struct Client *)
@ -746,7 +746,7 @@ msg_client(enum message_type msgtype,
}
}
/* reset idle time for message only if its not to self
/* reset idle time for message only if its not to self
* and its not a notice */
if(msgtype != MESSAGE_TYPE_NOTICE)
source_p->localClient->last = rb_current_time();
@ -878,7 +878,7 @@ msg_client(enum message_type msgtype,
* flood_attack_client
* inputs - flag 0 if PRIVMSG 1 if NOTICE. RFC
* say NOTICE must not auto reply
* - pointer to source Client
* - pointer to source Client
* - pointer to target Client
* output - 1 if target is under flood attack
* side effects - check for flood attack on target target_p

View file

@ -239,7 +239,7 @@ m_nick(struct Client *client_p, struct Client *source_p, int parc, const char *p
}
/* mc_nick()
*
*
* server -> server nick change
* parv[1] = nickname
* parv[2] = TS when nick change
@ -529,7 +529,7 @@ ms_save(struct Client *client_p, struct Client *source_p, int parc, const char *
*
* input - nickname to check
* output - 0 if erroneous, else 1
* side effects -
* side effects -
*/
static int
clean_nick(const char *nick, int loc_client)
@ -740,7 +740,7 @@ change_local_nick(struct Client *client_p, struct Client *source_p,
monitor_signon(source_p);
/* Make sure everyone that has this client on its accept list
* loses that reference.
* loses that reference.
*/
/* we used to call del_all_accepts() here, but theres no real reason
* to clear a clients own list of accepted clients. So just remove

View file

@ -98,7 +98,7 @@ m_part(struct Client *client_p, struct Client *source_p, int parc, const char *p
* - pointer to source client to remove
* - char pointer of name of channel to remove from
* output - none
* side effects - remove ONE client given the channel name
* side effects - remove ONE client given the channel name
*/
static void
part_one_client(struct Client *client_p, struct Client *source_p, char *name, const char *reason)

View file

@ -93,7 +93,7 @@ mr_server(struct Client *client_p, struct Client *source_p, int parc, const char
return 0;
}
/*
/*
* Reject a direct nonTS server connection if we're TS_ONLY -orabidoo
*/
if(!DoesTS(client_p))
@ -178,7 +178,7 @@ mr_server(struct Client *client_p, struct Client *source_p, int parc, const char
sendto_realops_snomask(SNO_GENERAL, L_ALL,
"Connection from servername %s requires SSL/TLS but is plaintext",
name);
ilog(L_SERVER, "Access denied, requires SSL/TLS but is plaintext from %s",
ilog(L_SERVER, "Access denied, requires SSL/TLS but is plaintext from %s",
log_client_name(client_p, SHOW_IP));
exit_client(client_p, client_p, client_p, "Access denied, requires SSL/TLS but is plaintext");
@ -325,7 +325,7 @@ ms_server(struct Client *client_p, struct Client *source_p, int parc, const char
* that already exists, then sends you a client burst, you squit the
* server, but you keep getting the burst of clients on a server that
* doesnt exist, although ircd can handle it, its not a realistic
* solution.. --fl_
* solution.. --fl_
*/
ilog(L_SERVER, "Link %s cancelled, server %s already exists",
client_p->name, name);
@ -337,7 +337,7 @@ ms_server(struct Client *client_p, struct Client *source_p, int parc, const char
return 0;
}
/*
/*
* User nicks never have '.' in them and server names
* must always have '.' in them.
*/
@ -393,7 +393,7 @@ ms_server(struct Client *client_p, struct Client *source_p, int parc, const char
* name = "irc.bighub.net";
* hub_mask="*";
* ...
*
*
* That would allow "irc.bighub.net" to introduce anything it wanted..
*
* However
@ -431,7 +431,7 @@ ms_server(struct Client *client_p, struct Client *source_p, int parc, const char
"Link %s introduced leafed server %s.",
client_p->name, name);
ilog(L_SERVER, "Link %s introduced leafed server %s.",
client_p->name, name);
client_p->name, name);
rb_snprintf(squitreason, sizeof squitreason,
"Matching leaf_mask for %s",
@ -601,7 +601,7 @@ ms_sid(struct Client *client_p, struct Client *source_p, int parc, const char *p
"Link %s introduced leafed server %s.",
client_p->name, parv[1]);
ilog(L_SERVER, "Link %s introduced leafed server %s.",
client_p->name, parv[1]);
client_p->name, parv[1]);
rb_snprintf(squitreason, sizeof squitreason,
"Matching leaf_mask for %s",

View file

@ -140,7 +140,7 @@ m_accept(struct Client *client_p, struct Client *source_p, int parc, const char
* - pointer to addbuffer
* - pointer to remove buffer
* - pointer to list of nicks
* output -
* output -
* side effects - addbuf/delbuf are modified to give valid nicks
*/
static void
@ -167,7 +167,7 @@ build_nicklist(struct Client *source_p, char *addbuf, char *delbuf, const char *
if(find_named_person(name) == NULL)
{
sendto_one_numeric(source_p, ERR_NOSUCHNICK,
sendto_one_numeric(source_p, ERR_NOSUCHNICK,
form_str(ERR_NOSUCHNICK), name);
continue;
}
@ -251,10 +251,10 @@ list_accepts(struct Client *source_p)
}
if(*nicks)
sendto_one(source_p, form_str(RPL_ACCEPTLIST),
sendto_one(source_p, form_str(RPL_ACCEPTLIST),
me.name, source_p->name, nicks);
sendto_one(source_p, form_str(RPL_ENDOFACCEPT),
sendto_one(source_p, form_str(RPL_ENDOFACCEPT),
me.name, source_p->name);
}

View file

@ -51,7 +51,7 @@ struct Message admin_msgtab = {
int doing_admin_hook;
mapi_clist_av1 admin_clist[] = { &admin_msgtab, NULL };
mapi_hlist_av1 admin_hlist[] = {
mapi_hlist_av1 admin_hlist[] = {
{ "doing_admin", &doing_admin_hook },
{ NULL, NULL }
};
@ -60,7 +60,7 @@ DECLARE_MODULE_AV1(admin, NULL, NULL, admin_clist, admin_hlist, NULL, "$Revision
/*
* mr_admin - ADMIN command handler
* parv[1] = servername
* parv[1] = servername
*/
static int
mr_admin(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
@ -69,9 +69,9 @@ mr_admin(struct Client *client_p, struct Client *source_p, int parc, const char
if((last_used + ConfigFileEntry.pace_wait) > rb_current_time())
{
sendto_one(source_p, form_str(RPL_LOAD2HI),
me.name,
EmptyString(source_p->name) ? "*" : source_p->name,
sendto_one(source_p, form_str(RPL_LOAD2HI),
me.name,
EmptyString(source_p->name) ? "*" : source_p->name,
"ADMIN");
return 0;
}
@ -102,7 +102,7 @@ m_admin(struct Client *client_p, struct Client *source_p, int parc, const char *
}
else
last_used = rb_current_time();
if(hunt_server(client_p, source_p, ":%s ADMIN :%s", 1, parc, parv) != HUNTED_ISME)
return 0;
}

View file

@ -48,7 +48,7 @@ mapi_clist_av1 away_clist[] = { &away_msgtab, NULL };
DECLARE_MODULE_AV1(away, NULL, NULL, away_clist, NULL, NULL, "$Revision: 3370 $");
/***********************************************************************
* m_away() - Added 14 Dec 1988 by jto.
* m_away() - Added 14 Dec 1988 by jto.
* Not currently really working, I don't like this
* call at all...
*
@ -56,7 +56,7 @@ DECLARE_MODULE_AV1(away, NULL, NULL, away_clist, NULL, NULL, "$Revision: 3370 $"
* but perhaps it's worth the load it causes to net.
* This requires flooding of the whole net like NICK,
* USER, MODE, etc messages... --msa
*
*
* The above comments have long since irrelvant, but
* are kept for historical purposes now ;)
***********************************************************************/
@ -116,7 +116,7 @@ m_away(struct Client *client_p, struct Client *source_p, int parc, const char *p
if(strncmp(source_p->user->away, parv[1], AWAYLEN - 1))
{
rb_strlcpy(source_p->user->away, parv[1], AWAYLEN);
sendto_server(client_p, NULL, CAP_TS6, NOCAPS,
sendto_server(client_p, NULL, CAP_TS6, NOCAPS,
":%s AWAY :%s", use_id(source_p), source_p->user->away);
sendto_common_channels_local_butone(source_p,
CLICAP_AWAY_NOTIFY,

View file

@ -1,5 +1,5 @@
/* modules/m_cap.c
*
*
* Copyright (C) 2005 Lee Hardy <lee@leeh.co.uk>
* Copyright (C) 2005 ircd-ratbox development team
*
@ -151,7 +151,7 @@ clicap_find(const char *data, int *negate, int *finished)
if((s = strchr(p, ' ')))
*s++ = '\0';
if((cap = bsearch(p, clicap_list, CLICAP_LIST_LEN,
if((cap = bsearch(p, clicap_list, CLICAP_LIST_LEN,
sizeof(struct clicap), (bqcmp) clicap_compare)))
{
if(s)
@ -182,8 +182,8 @@ clicap_generate(struct Client *source_p, const char *subcmd, int flags, int clea
size_t i;
mlen = rb_sprintf(buf, ":%s CAP %s %s",
me.name,
EmptyString(source_p->name) ? "*" : source_p->name,
me.name,
EmptyString(source_p->name) ? "*" : source_p->name,
subcmd);
p = capbuf;
@ -229,7 +229,7 @@ clicap_generate(struct Client *source_p, const char *subcmd, int flags, int clea
buflen++;
/* needs a client ack */
if(clicap_list[i].cap_cli &&
if(clicap_list[i].cap_cli &&
IsCapable(source_p, clicap_list[i].cap_cli))
{
*p++ = '~';
@ -305,7 +305,7 @@ cap_ack(struct Client *source_p, const char *arg)
static void
cap_clear(struct Client *source_p, const char *arg)
{
clicap_generate(source_p, "ACK",
clicap_generate(source_p, "ACK",
source_p->localClient->caps ? source_p->localClient->caps : -1, 1);
/* XXX - sticky capabs */

View file

@ -60,7 +60,7 @@
static int challenge_load(void)
{
#ifndef STATIC_MODULES
sendto_realops_snomask(SNO_GENERAL, L_ALL,
sendto_realops_snomask(SNO_GENERAL, L_ALL,
"Challenge module not loaded because OpenSSL is not available.");
ilog(L_MAIN, "Challenge module not loaded because OpenSSL is not available.");
return -1;
@ -90,7 +90,7 @@ cleanup_challenge(struct Client *target_p)
{
if(target_p->localClient == NULL)
return;
rb_free(target_p->localClient->challenge);
rb_free(target_p->localClient->opername);
target_p->localClient->challenge = NULL;
@ -108,7 +108,7 @@ m_challenge(struct Client *client_p, struct Client *source_p, int parc, const ch
{
struct oper_conf *oper_p;
char *challenge = NULL; /* to placate gcc */
char chal_line[CHALLENGE_WIDTH];
char chal_line[CHALLENGE_WIDTH];
unsigned char *b_response;
size_t cnt;
int len = 0;
@ -140,7 +140,7 @@ m_challenge(struct Client *client_p, struct Client *source_p, int parc, const ch
source_p->name, source_p->username,
source_p->host);
cleanup_challenge(source_p);
return 0;
return 0;
}
parv[1]++;
@ -167,8 +167,8 @@ m_challenge(struct Client *client_p, struct Client *source_p, int parc, const ch
rb_free(b_response);
oper_p = find_oper_conf(source_p->username, source_p->orighost,
source_p->sockhost,
oper_p = find_oper_conf(source_p->username, source_p->orighost,
source_p->sockhost,
source_p->localClient->opername);
if(oper_p == NULL)
@ -192,14 +192,14 @@ m_challenge(struct Client *client_p, struct Client *source_p, int parc, const ch
oper_up(source_p, oper_p);
ilog(L_OPERED, "OPER %s by %s!%s@%s (%s)",
source_p->localClient->opername, source_p->name,
source_p->localClient->opername, source_p->name,
source_p->username, source_p->host, source_p->sockhost);
return 0;
}
cleanup_challenge(source_p);
oper_p = find_oper_conf(source_p->username, source_p->orighost,
oper_p = find_oper_conf(source_p->username, source_p->orighost,
source_p->sockhost, parv[1]);
if(oper_p == NULL)
@ -269,9 +269,9 @@ m_challenge(struct Client *client_p, struct Client *source_p, int parc, const ch
chal += CHALLENGE_WIDTH - 1;
else
break;
}
sendto_one(source_p, form_str(RPL_ENDOFRSACHALLENGE2),
sendto_one(source_p, form_str(RPL_ENDOFRSACHALLENGE2),
me.name, source_p->name);
rb_free(challenge);
source_p->localClient->opername = rb_strdup(oper_p->name);

View file

@ -58,7 +58,7 @@ clean_host(const char *host)
{
int len = 0;
const char *last_slash = 0;
if (*host == '\0' || *host == ':')
return 0;

View file

@ -105,7 +105,7 @@ m_cmessage(int p_or_n, const char *command,
{
if(p_or_n != NOTICE)
sendto_one_numeric(source_p, ERR_NOTONCHANNEL,
form_str(ERR_NOTONCHANNEL),
form_str(ERR_NOTONCHANNEL),
chptr->chname);
return 0;
}

View file

@ -53,7 +53,7 @@ DECLARE_MODULE_AV1(connect, NULL, NULL, connect_clist, NULL, NULL, "$Revision: 3
/*
* mo_connect - CONNECT command handler
*
*
* Added by Jto 11 Feb 1989
*
* m_connect
@ -83,7 +83,7 @@ mo_connect(struct Client *client_p, struct Client *source_p, int parc, const cha
if((target_p = find_server(source_p, parv[1])))
{
sendto_one_notice(source_p, ":Connect: Server %s already exists from %s.", parv[1],
sendto_one_notice(source_p, ":Connect: Server %s already exists from %s.", parv[1],
target_p->from->name);
return 0;
}
@ -156,7 +156,7 @@ mo_connect(struct Client *client_p, struct Client *source_p, int parc, const cha
/*
* ms_connect - CONNECT command handler
*
*
* Added by Jto 11 Feb 1989
*
* m_connect
@ -222,7 +222,7 @@ ms_connect(struct Client *client_p, struct Client *source_p, int parc, const cha
* Notify all operators about remote connect requests
*/
sendto_wallops_flags(UMODE_WALLOP, &me,
"Remote CONNECT %s %d from %s",
"Remote CONNECT %s %d from %s",
parv[1], port, source_p->name);
sendto_server(NULL, NULL, CAP_TS6, NOCAPS,
":%s WALLOPS :Remote CONNECT %s %d from %s",

View file

@ -69,7 +69,7 @@ static int apply_dline(struct Client *, const char *, int, char *);
static int apply_undline(struct Client *, const char *);
/* mo_dline()
*
*
* parv[1] - dline to add
* parv[2] - reason
*/

View file

@ -70,7 +70,7 @@ ms_encap(struct Client *client_p, struct Client *source_p, int parc, const char
int i;
ptr = buffer;
for(i = 1; i < parc - 1; i++)
{
len = strlen(parv[i]) + 1;

View file

@ -134,7 +134,7 @@ me_etrace(struct Client *client_p, struct Client *source_p, int parc, const char
if((target_p = find_person(parv[1])) && MyClient(target_p))
do_single_etrace(source_p, target_p);
sendto_one_numeric(source_p, RPL_ENDOFTRACE, form_str(RPL_ENDOFTRACE),
sendto_one_numeric(source_p, RPL_ENDOFTRACE, form_str(RPL_ENDOFTRACE),
target_p ? target_p->name : parv[1]);
return 0;
@ -158,8 +158,8 @@ do_etrace(struct Client *source_p, int ipv4, int ipv6)
#endif
sendto_one(source_p, form_str(RPL_ETRACE),
me.name, source_p->name,
IsOper(target_p) ? "Oper" : "User",
me.name, source_p->name,
IsOper(target_p) ? "Oper" : "User",
get_client_class(target_p),
target_p->name, target_p->username, target_p->host,
show_ip(source_p, target_p) ? target_p->sockhost : "255.255.255.255",
@ -197,17 +197,17 @@ do_single_etrace(struct Client *source_p, struct Client *target_p)
*/
if(!show_ip(source_p, target_p))
sendto_one(source_p, form_str(RPL_ETRACEFULL),
me.name, source_p->name,
me.name, source_p->name,
IsOper(target_p) ? "Oper" : "User",
get_client_class(target_p),
target_p->name, target_p->username, target_p->host,
target_p->name, target_p->username, target_p->host,
"255.255.255.255", "<hidden> <hidden>", target_p->info);
else
sendto_one(source_p, form_str(RPL_ETRACEFULL),
me.name, source_p->name,
me.name, source_p->name,
IsOper(target_p) ? "Oper" : "User",
get_client_class(target_p),
target_p->name, target_p->username,
target_p->name, target_p->username,
target_p->host, target_p->sockhost,
target_p->localClient->fullcaps, target_p->info);
}
@ -269,7 +269,7 @@ m_chantrace(struct Client *client_p, struct Client *source_p, int parc, const ch
sockhost = target_p->sockhost;
sendto_one(source_p, form_str(RPL_ETRACE),
me.name, source_p->name,
me.name, source_p->name,
IsOper(target_p) ? "Oper" : "User",
/* class field -- pretend its server.. */
target_p->servptr->name,
@ -288,14 +288,14 @@ match_masktrace(struct Client *source_p, rb_dlink_list *list,
{
struct Client *target_p;
rb_dlink_node *ptr;
const char *sockhost;
const char *sockhost;
RB_DLINK_FOREACH(ptr, list->head)
{
target_p = ptr->data;
if(!IsPerson(target_p))
continue;
if(EmptyString(target_p->sockhost))
sockhost = empty_sockhost;
else if(!show_ip(source_p, target_p))
@ -313,9 +313,9 @@ match_masktrace(struct Client *source_p, rb_dlink_list *list,
if(gecos != NULL && !match_esc(gecos, target_p->info))
continue;
sendto_one(source_p, form_str(RPL_ETRACE),
me.name, source_p->name,
me.name, source_p->name,
IsOper(target_p) ? "Oper" : "User",
/* class field -- pretend its server.. */
target_p->servptr->name,
@ -326,15 +326,15 @@ match_masktrace(struct Client *source_p, rb_dlink_list *list,
}
static int
mo_masktrace(struct Client *client_p, struct Client *source_p, int parc,
mo_masktrace(struct Client *client_p, struct Client *source_p, int parc,
const char *parv[])
{
char *name, *username, *hostname, *gecos;
const char *mask;
int operspy = 0;
mask = parv[1];
name = LOCAL_COPY(parv[1]);
mask = parv[1];
name = LOCAL_COPY(parv[1]);
collapse(name);
if(IsOperSpy(source_p) && parv[1][0] == '!')
@ -342,15 +342,15 @@ mo_masktrace(struct Client *client_p, struct Client *source_p, int parc,
name++;
mask++;
operspy = 1;
}
}
if(parc > 2 && !EmptyString(parv[2]))
{
gecos = LOCAL_COPY(parv[2]);
collapse_esc(gecos);
} else
gecos = NULL;
if((hostname = strchr(name, '@')) == NULL)
{
@ -359,7 +359,7 @@ mo_masktrace(struct Client *client_p, struct Client *source_p, int parc,
}
*hostname++ = '\0';
if((username = strchr(name, '!')) == NULL)
{
username = name;
@ -372,7 +372,7 @@ mo_masktrace(struct Client *client_p, struct Client *source_p, int parc,
sendto_one_notice(source_p, ":Invalid parameters");
return 0;
}
if(operspy) {
if (!ConfigFileEntry.operspy_dont_care_user_info)
{
@ -381,14 +381,14 @@ mo_masktrace(struct Client *client_p, struct Client *source_p, int parc,
if(!EmptyString(gecos)) {
rb_strlcat(buf, " ", sizeof(buf));
rb_strlcat(buf, gecos, sizeof(buf));
}
}
report_operspy(source_p, "MASKTRACE", buf);
report_operspy(source_p, "MASKTRACE", buf);
}
match_masktrace(source_p, &global_client_list, username, hostname, name, gecos);
match_masktrace(source_p, &global_client_list, username, hostname, name, gecos);
} else
match_masktrace(source_p, &lclient_list, username, hostname, name, gecos);
sendto_one_numeric(source_p, RPL_ENDOFTRACE, form_str(RPL_ENDOFTRACE), me.name);
sendto_one_numeric(source_p, RPL_ENDOFTRACE, form_str(RPL_ENDOFTRACE), me.name);
return 0;
}

View file

@ -413,7 +413,7 @@ static struct InfoStruct info_table[] = {
{
"reject_after_count",
OUTPUT_DECIMAL,
&ConfigFileEntry.reject_after_count,
&ConfigFileEntry.reject_after_count,
"Client rejection threshold setting",
},
{
@ -485,13 +485,13 @@ static struct InfoStruct info_table[] = {
{
"throttle_count",
OUTPUT_DECIMAL,
&ConfigFileEntry.throttle_count,
&ConfigFileEntry.throttle_count,
"Connection throttle threshold",
},
{
"throttle_duration",
OUTPUT_DECIMAL,
&ConfigFileEntry.throttle_duration,
&ConfigFileEntry.throttle_duration,
"Connection throttle duration",
},
{
@ -758,11 +758,11 @@ send_birthdate_online_time(struct Client *source_p)
{
char tbuf[26]; /* this needs to be 26 - see ctime_r manpage */
sendto_one(source_p, ":%s %d %s :Birth Date: %s, compile # %s",
get_id(&me, source_p), RPL_INFO,
get_id(&me, source_p), RPL_INFO,
get_id(source_p, source_p), creation, generation);
sendto_one(source_p, ":%s %d %s :On-line since %s",
get_id(&me, source_p), RPL_INFO,
get_id(&me, source_p), RPL_INFO,
get_id(source_p, source_p), rb_ctime(startup_time, tbuf, sizeof(tbuf)));
}
@ -790,7 +790,7 @@ send_conf_options(struct Client *source_p)
sendto_one(source_p, ":%s %d %s :%-30s %-5d [%-30s]",
get_id(&me, source_p), RPL_INFO,
get_id(source_p, source_p),
infoptr->name, infoptr->intvalue,
infoptr->name, infoptr->intvalue,
infoptr->desc);
}
else
@ -798,7 +798,7 @@ send_conf_options(struct Client *source_p)
sendto_one(source_p, ":%s %d %s :%-30s %-5s [%-30s]",
get_id(&me, source_p), RPL_INFO,
get_id(source_p, source_p),
infoptr->name, infoptr->strvalue,
infoptr->name, infoptr->strvalue,
infoptr->desc);
}
}
@ -914,7 +914,7 @@ send_conf_options(struct Client *source_p)
}
/* info_spy()
*
*
* input - pointer to client
* output - none
* side effects - hook doing_info is called

View file

@ -74,12 +74,12 @@ m_invite(struct Client *client_p, struct Client *source_p, int parc, const char
if(target_p == NULL)
{
if(!MyClient(source_p) && IsDigit(parv[1][0]))
sendto_one_numeric(source_p, ERR_NOSUCHNICK,
"* :Target left IRC. Failed to invite to %s",
sendto_one_numeric(source_p, ERR_NOSUCHNICK,
"* :Target left IRC. Failed to invite to %s",
parv[2]);
else
sendto_one_numeric(source_p, ERR_NOSUCHNICK,
form_str(ERR_NOSUCHNICK),
sendto_one_numeric(source_p, ERR_NOSUCHNICK,
form_str(ERR_NOSUCHNICK),
parv[1]);
return 0;
}
@ -93,7 +93,7 @@ m_invite(struct Client *client_p, struct Client *source_p, int parc, const char
}
/* Do not send local channel invites to users if they are not on the
* same server as the person sending the INVITE message.
* same server as the person sending the INVITE message.
*/
if(parv[2][0] == '&' && !MyConnect(target_p))
{
@ -163,7 +163,7 @@ m_invite(struct Client *client_p, struct Client *source_p, int parc, const char
me.name, source_p->name, target_p->name);
return 0;
}
sendto_one(source_p, form_str(RPL_INVITING),
sendto_one(source_p, form_str(RPL_INVITING),
me.name, source_p->name,
target_p->name, parv[2]);
if(target_p->user->away)
@ -208,8 +208,8 @@ m_invite(struct Client *client_p, struct Client *source_p, int parc, const char
}
}
add_reply_target(target_p, source_p);
sendto_one(target_p, ":%s!%s@%s INVITE %s :%s",
source_p->name, source_p->username, source_p->host,
sendto_one(target_p, ":%s!%s@%s INVITE %s :%s",
source_p->name, source_p->username, source_p->host,
target_p->name, chptr->chname);
if(store_invite)
@ -243,7 +243,7 @@ add_invite(struct Channel *chptr, struct Client *who)
}
/* ok, if their invite list is too long, remove the tail */
if((int)rb_dlink_list_length(&who->user->invited) >=
if((int)rb_dlink_list_length(&who->user->invited) >=
ConfigChannel.max_chans_per_user)
{
ptr = who->user->invited.tail;

View file

@ -428,7 +428,7 @@ mo_unkline(struct Client *client_p, struct Client *source_p, int parc, const cha
sendto_one_notice(source_p, ":No K-Line for %s@%s", user, host);
return 0;
}
if(aconf->lifetime)
{
if(propagated)
@ -509,7 +509,7 @@ handle_remote_unkline(struct Client *source_p, const char *user, const char *hos
/* apply_kline()
*
* inputs -
* inputs -
* output - NONE
* side effects - kline as given, is added to the hashtable
* and conf file
@ -632,7 +632,7 @@ apply_prop_kline(struct Client *source_p, struct ConfItem *aconf,
}
/* find_user_host()
*
*
* inputs - client placing kline, user@host, user buffer, host buffer
* output - 0 if not ok to kline, 1 to kline i.e. if valid user host
* side effects -

View file

@ -94,8 +94,8 @@ m_knock(struct Client *client_p, struct Client *source_p, int parc, const char *
return 0;
}
if(!((chptr->mode.mode & MODE_INVITEONLY) || (*chptr->mode.key) ||
(chptr->mode.limit &&
if(!((chptr->mode.mode & MODE_INVITEONLY) || (*chptr->mode.key) ||
(chptr->mode.limit &&
rb_dlink_list_length(&chptr->members) >= (unsigned long)chptr->mode.limit)))
{
sendto_one_numeric(source_p, ERR_CHANOPEN,
@ -111,7 +111,7 @@ m_knock(struct Client *client_p, struct Client *source_p, int parc, const char *
return 0;
}
if(MyClient(source_p))
{
/* don't allow a knock if the user is banned */
@ -127,7 +127,7 @@ m_knock(struct Client *client_p, struct Client *source_p, int parc, const char *
* allow one knock per user per knock_delay
* allow one knock per channel per knock_delay_channel
*/
if(!IsOper(source_p) &&
if(!IsOper(source_p) &&
(source_p->localClient->last_knock + ConfigChannel.knock_delay) > rb_current_time())
{
sendto_one(source_p, form_str(ERR_TOOMANYKNOCK),

View file

@ -62,7 +62,7 @@ DECLARE_MODULE_AV1(links, NULL, NULL, links_clist, links_hlist, NULL, "$Revision
* m_links - LINKS message handler
* parv[1] = servername mask
* or
* parv[1] = server to query
* parv[1] = server to query
* parv[2] = servername mask
*/
static int
@ -117,7 +117,7 @@ mo_links(struct Client *client_p, struct Client *source_p, int parc, const char
continue;
/* We just send the reply, as if theyre here theres either no SHIDE,
* or theyre an oper..
* or theyre an oper..
*/
sendto_one_numeric(source_p, RPL_LINKS, form_str(RPL_LINKS),
target_p->name, target_p->servptr->name,

View file

@ -200,7 +200,7 @@ static int mo_list(struct Client *client_p, struct Client *source_p, int parc, c
params->users_min = 3;
params->users_max = INT_MAX;
params->operspy = operspy;
params->created_min = params->topic_min =
params->created_min = params->topic_min =
params->created_max = params->topic_max = 0;
if (args && !EmptyString(args))
@ -484,7 +484,7 @@ static void safelist_iterate_client(struct Client *source_p)
return;
}
RB_DLINK_FOREACH(ptr, channelTable[iter].head)
RB_DLINK_FOREACH(ptr, channelTable[iter].head)
safelist_one_channel(source_p, (struct Channel *) ptr->data);
}
@ -495,6 +495,6 @@ static void safelist_iterate_clients(void *unused)
{
rb_dlink_node *n, *n2;
RB_DLINK_FOREACH_SAFE(n, n2, safelisting_clients.head)
RB_DLINK_FOREACH_SAFE(n, n2, safelisting_clients.head)
safelist_iterate_client((struct Client *)n->data);
}

View file

@ -60,7 +60,7 @@ static int
m_locops(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
sendto_wallops_flags(UMODE_LOCOPS, source_p, "LOCOPS - %s", parv[1]);
if(rb_dlink_list_length(&cluster_conf_list) > 0)
cluster_generic(source_p, "LOCOPS", SHARED_LOCOPS, CAP_CLUSTER,
":%s", parv[1]);
@ -74,7 +74,7 @@ ms_locops(struct Client *client_p, struct Client *source_p, int parc, const char
/* source_p parv[1] parv[2]
* oper target serv message
*/
propagate_generic(source_p, "LOCOPS", parv[1], CAP_CLUSTER,
propagate_generic(source_p, "LOCOPS", parv[1], CAP_CLUSTER,
":%s", parv[2]);
if(!match(parv[1], me.name))

View file

@ -51,7 +51,7 @@ DECLARE_MODULE_AV1(lusers, NULL, NULL, lusers_clist, NULL, NULL, "$Revision: 254
* m_lusers - LUSERS message handler
* parv[1] = host/server mask.
* parv[2] = server to query
*
*
* 199970918 JRL hacked to ignore parv[1] completely and require parc > 3
* to cause a force
*/
@ -86,7 +86,7 @@ m_lusers(struct Client *client_p, struct Client *source_p, int parc, const char
* ms_lusers - LUSERS message handler for servers and opers
* parv[1] = host/server mask.
* parv[2] = server to query
*
*
* 199970918 JRL hacked to ignore parv[1] completely and require parc > 3
* to cause a force
*/

View file

@ -1,5 +1,5 @@
/* modules/m_monitor.c
*
*
* Copyright (C) 2005 Lee Hardy <lee@leeh.co.uk>
* Copyright (C) 2005 ircd-ratbox development team
*
@ -111,7 +111,7 @@ add_monitor(struct Client *client_p, const char *nicks)
if((target_p = find_named_person(name)) != NULL)
{
if(cur_onlen + strlen(target_p->name) +
if(cur_onlen + strlen(target_p->name) +
strlen(target_p->username) + strlen(target_p->host) + 3 >= BUFSIZE-3)
{
sendto_one(client_p, "%s", onbuf);
@ -228,7 +228,7 @@ list_monitor(struct Client *client_p)
}
sendto_one(client_p, "%s", buf);
sendto_one(client_p, form_str(RPL_ENDOFMONLIST),
sendto_one(client_p, form_str(RPL_ENDOFMONLIST),
me.name, client_p->name);
}
@ -257,7 +257,7 @@ show_monitor_status(struct Client *client_p)
if((target_p = find_named_person(monptr->name)) != NULL)
{
if(cur_onlen + strlen(target_p->name) +
if(cur_onlen + strlen(target_p->name) +
strlen(target_p->username) + strlen(target_p->host) + 3 >= BUFSIZE-3)
{
sendto_one(client_p, "%s", onbuf);

View file

@ -83,7 +83,7 @@ m_names(struct Client *client_p, struct Client *source_p, int parc, const char *
if((chptr = find_channel(p)) != NULL)
channel_member_names(chptr, source_p, 1);
else
sendto_one(source_p, form_str(RPL_ENDOFNAMES),
sendto_one(source_p, form_str(RPL_ENDOFNAMES),
me.name, source_p->name, p);
}
else
@ -103,7 +103,7 @@ m_names(struct Client *client_p, struct Client *source_p, int parc, const char *
}
names_global(source_p);
sendto_one(source_p, form_str(RPL_ENDOFNAMES),
sendto_one(source_p, form_str(RPL_ENDOFNAMES),
me.name, source_p->name, "*");
}
@ -137,7 +137,7 @@ names_global(struct Client *source_p)
chptr = ptr->data;
channel_member_names(chptr, source_p, 0);
}
cur_len = mlen = rb_sprintf(buf, form_str(RPL_NAMREPLY),
cur_len = mlen = rb_sprintf(buf, form_str(RPL_NAMREPLY),
me.name, source_p->name, "*", "*");
t = buf + mlen;

View file

@ -79,7 +79,7 @@ m_oper(struct Client *client_p, struct Client *source_p, int parc, const char *p
if(!IsFloodDone(source_p))
flood_endgrace(source_p);
oper_p = find_oper_conf(source_p->username, source_p->orighost,
oper_p = find_oper_conf(source_p->username, source_p->orighost,
source_p->sockhost, name);
if(oper_p == NULL)
@ -167,7 +167,7 @@ m_oper(struct Client *client_p, struct Client *source_p, int parc, const char *p
* match_oper_password
*
* inputs - pointer to given password
* - pointer to Conf
* - pointer to Conf
* output - YES or NO if match
* side effects - none
*/
@ -183,7 +183,7 @@ match_oper_password(const char *password, struct oper_conf *oper_p)
if(IsOperConfEncrypted(oper_p))
{
/* use first two chars of the password they send in as salt */
/* If the password in the conf is MD5, and ircd is linked
/* If the password in the conf is MD5, and ircd is linked
* to scrypt on FreeBSD, or the standard crypt library on
* glibc Linux, then this code will work fine on generating
* the proper encrypted hash for comparison.

View file

@ -61,7 +61,7 @@ mr_pass(struct Client *client_p, struct Client *source_p, int parc, const char *
{
char *auth_user, *pass, *buf;
buf = LOCAL_COPY(parv[1]);
if(client_p->localClient->passwd)
{
memset(client_p->localClient->passwd, 0,
@ -80,24 +80,24 @@ mr_pass(struct Client *client_p, struct Client *source_p, int parc, const char *
if ((pass = strchr(buf, ':')) != NULL)
{
*pass++ = '\0';
auth_user = buf;
*pass++ = '\0';
auth_user = buf;
}
else
{
pass = buf;
auth_user = NULL;
}
client_p->localClient->passwd = *pass ? rb_strndup(pass, PASSWDLEN) : NULL;
if(auth_user && *auth_user)
client_p->localClient->auth_user = rb_strndup(auth_user, PASSWDLEN);
/* These are for servers only */
if(parc > 2 && client_p->user == NULL)
{
/*
/*
* It looks to me as if orabidoo wanted to have more
* than one set of option strings possible here...
* i.e. ":AABBTS" as long as TS was the last two chars

View file

@ -96,7 +96,7 @@ ms_ping(struct Client *client_p, struct Client *source_p, int parc, const char *
irccmp(destination, me.id))
{
if((target_p = find_client(destination)) && IsServer(target_p))
sendto_one(target_p, ":%s PING %s :%s",
sendto_one(target_p, ":%s PING %s :%s",
get_id(source_p, target_p), source_p->name,
get_id(target_p, target_p));
/* not directed at an id.. */
@ -106,8 +106,8 @@ ms_ping(struct Client *client_p, struct Client *source_p, int parc, const char *
destination);
}
else
sendto_one(source_p, ":%s PONG %s :%s",
get_id(&me, source_p), me.name,
sendto_one(source_p, ":%s PONG %s :%s",
get_id(&me, source_p), me.name,
get_id(source_p, source_p));
return 0;

View file

@ -70,8 +70,8 @@ ms_pong(struct Client *client_p, struct Client *source_p, int parc, const char *
irccmp(destination, me.id))
{
if((target_p = find_client(destination)))
sendto_one(target_p, ":%s PONG %s %s",
get_id(source_p, target_p), parv[1],
sendto_one(target_p, ":%s PONG %s %s",
get_id(source_p, target_p), parv[1],
get_id(target_p, target_p));
else
{

View file

@ -76,7 +76,7 @@ rehash_bans_loc(struct Client *source_p)
static void
rehash_dns(struct Client *source_p)
{
sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s is rehashing DNS",
sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s is rehashing DNS",
get_oper_name(source_p));
if (!MyConnect(source_p))
remote_rehash_oper_p = source_p;
@ -245,7 +245,7 @@ static void
rehash_help(struct Client *source_p)
{
sendto_realops_snomask(SNO_GENERAL, L_ALL,
"%s is forcing re-reading of HELP files",
"%s is forcing re-reading of HELP files",
get_oper_name(source_p));
if (!MyConnect(source_p))
remote_rehash_oper_p = source_p;
@ -268,7 +268,7 @@ rehash_nickdelay(struct Client *source_p)
RB_DLINK_FOREACH_SAFE(ptr, safe_ptr, nd_list.head)
{
nd = ptr->data;
free_nd_entry(nd);
}
}

View file

@ -56,7 +56,7 @@ struct Message sasl_msgtab = {
{mg_ignore, mg_ignore, mg_ignore, mg_ignore, {me_sasl, 5}, mg_ignore}
};
mapi_clist_av1 sasl_clist[] = {
mapi_clist_av1 sasl_clist[] = {
&authenticate_msgtab, &sasl_msgtab, NULL
};
mapi_hfn_list_av1 sasl_hfnlist[] = {
@ -174,7 +174,7 @@ me_sasl(struct Client *client_p, struct Client *source_p,
}
else if(*parv[3] == 'M')
sendto_one(target_p, form_str(RPL_SASLMECHS), me.name, EmptyString(target_p->name) ? "*" : target_p->name, parv[4]);
return 0;
}

View file

@ -63,7 +63,7 @@ struct Message scan_msgtab = {
mapi_clist_av1 scan_clist[] = { &scan_msgtab, NULL };
DECLARE_MODULE_AV1(scan, NULL, NULL, scan_clist, NULL, NULL, "$Revision: 1853 $");
typedef int (*scan_handler)(struct Client *, struct Client *, int,
typedef int (*scan_handler)(struct Client *, struct Client *, int,
const char **);
struct scan_cmd {
@ -84,7 +84,7 @@ static const char *spoofed_sockhost = "0";
* parv[2] = [target]
*/
static int
mo_scan(struct Client *client_p, struct Client *source_p, int parc,
mo_scan(struct Client *client_p, struct Client *source_p, int parc,
const char *parv[])
{
struct scan_cmd *sptr;
@ -267,7 +267,7 @@ scan_umodes(struct Client *client_p, struct Client *source_p, int parc,
sendto_one_numeric(source_p, RPL_SCANUMODES,
form_str(RPL_SCANUMODES),
target_p->name, target_p->username,
target_p->host, sockhost,
target_p->host, sockhost,
target_p->servptr->name, modebuf,
target_p->info);
}

View file

@ -82,7 +82,7 @@ struct Message nickdelay_msgtab = {
{mg_unreg, mg_ignore, mg_ignore, mg_ignore, {me_nickdelay, 3}, mg_ignore}
};
mapi_clist_av1 services_clist[] = {
mapi_clist_av1 services_clist[] = {
&su_msgtab, &login_msgtab, &rsfnc_msgtab, &nickdelay_msgtab, NULL
};
mapi_hfn_list_av1 services_hfnlist[] = {
@ -214,7 +214,7 @@ me_rsfnc(struct Client *client_p, struct Client *source_p,
char buf[BUFSIZE];
/* this would be one hell of a race condition to trigger
* this one given the tsinfo check above, but its here for
* this one given the tsinfo check above, but its here for
* safety --anfl
*/
if(target_p == exist_p)

View file

@ -80,7 +80,7 @@ static void quote_splitusers(struct Client *, const char *, int);
static void list_quote_commands(struct Client *);
/*
/*
* If this ever needs to be expanded to more than one arg of each
* type, want_char/want_int could be the count of the arguments,
* instead of just a boolean flag...
@ -235,7 +235,7 @@ quote_max(struct Client *source_p, const char *arg, int newval)
sendto_realops_snomask(SNO_GENERAL, L_ALL,
"%s!%s@%s set new MAXCLIENTS to %d (%lu current)",
source_p->name, source_p->username, source_p->host,
GlobalSetOptions.maxclients,
GlobalSetOptions.maxclients,
rb_dlink_list_length(&lclient_list));
return;
@ -259,7 +259,7 @@ quote_operstring(struct Client *source_p, const char *arg, int newval)
{
rb_strlcpy(GlobalSetOptions.operstring, arg,
sizeof(GlobalSetOptions.operstring));
sendto_realops_snomask(SNO_GENERAL, L_ALL,
"%s has changed OPERSTRING to '%s'",
get_oper_name(source_p), arg);
@ -278,7 +278,7 @@ quote_adminstring(struct Client *source_p, const char *arg, int newval)
{
rb_strlcpy(GlobalSetOptions.adminstring, arg,
sizeof(GlobalSetOptions.adminstring));
sendto_realops_snomask(SNO_GENERAL, L_ALL,
"%s has changed ADMINSTRING to '%s'",
get_oper_name(source_p), arg);
@ -407,7 +407,7 @@ quote_splitmode(struct Client *source_p, const char *charval, int intval)
}
}
else
/* if we add splitchecking to splitmode*2 we get a unique table to
/* if we add splitchecking to splitmode*2 we get a unique table to
* pull values back out of, splitmode can be four states - but you can
* only set to three, which means we cant use the same table --fl_
*/

View file

@ -65,7 +65,7 @@ struct Message signon_msgtab = {
{mg_ignore, mg_ignore, {ms_signon, 6}, mg_ignore, mg_ignore, mg_ignore}
};
mapi_clist_av1 signon_clist[] = {
mapi_clist_av1 signon_clist[] = {
&svslogin_msgtab, &signon_msgtab, NULL
};
@ -345,17 +345,17 @@ ms_signon(struct Client *client_p, struct Client *source_p,
"Nick change collision from SIGNON from %s to %s(%s <- %s)(both killed)",
source_p->name, target_p->name, target_p->from->name,
client_p->name);
ServerStats.is_kill++;
sendto_one_numeric(target_p, ERR_NICKCOLLISION,
form_str(ERR_NICKCOLLISION), target_p->name);
kill_client_serv_butone(NULL, source_p, "%s (Nick change collision)", me.name);
ServerStats.is_kill++;
kill_client_serv_butone(NULL, target_p, "%s (Nick change collision)", me.name);
target_p->flags |= FLAGS_KILLED;
exit_client(NULL, target_p, &me, "Nick collision(new)");
source_p->flags |= FLAGS_KILLED;
@ -366,7 +366,7 @@ ms_signon(struct Client *client_p, struct Client *source_p,
{
sameuser = !irccmp(target_p->username, source_p->username) &&
!irccmp(target_p->host, source_p->host);
if((sameuser && newts < target_p->tsinfo) ||
(!sameuser && newts > target_p->tsinfo))
{
@ -380,18 +380,18 @@ ms_signon(struct Client *client_p, struct Client *source_p,
"Nick change collision from SIGNON from %s to %s(%s <- %s)(newer killed)",
source_p->name, target_p->name,
target_p->from->name, client_p->name);
ServerStats.is_kill++;
sendto_one_numeric(target_p, ERR_NICKCOLLISION,
form_str(ERR_NICKCOLLISION), target_p->name);
/* kill the client issuing the nickchange */
kill_client_serv_butone(client_p, source_p,
"%s (Nick change collision)", me.name);
source_p->flags |= FLAGS_KILLED;
if(sameuser)
exit_client(client_p, source_p, &me, "Nick collision(old)");
else
@ -410,21 +410,21 @@ ms_signon(struct Client *client_p, struct Client *source_p,
"Nick collision from SIGNON on %s(%s <- %s)(newer killed)",
target_p->name, target_p->from->name,
client_p->name);
sendto_one_numeric(target_p, ERR_NICKCOLLISION,
form_str(ERR_NICKCOLLISION), target_p->name);
/* kill the client who existed before hand */
kill_client_serv_butone(client_p, target_p,
kill_client_serv_butone(client_p, target_p,
"%s (Nick collision)", me.name);
ServerStats.is_kill++;
target_p->flags |= FLAGS_KILLED;
(void) exit_client(client_p, target_p, &me, "Nick collision");
}
}
}
}

View file

@ -66,7 +66,7 @@ DECLARE_MODULE_AV1(snote, NULL, NULL, snote_clist, NULL, NULL, "$Revision: 623 $
* parv[2] = message
*/
static int
me_snote(struct Client *client_p, struct Client *source_p, int parc,
me_snote(struct Client *client_p, struct Client *source_p, int parc,
const char *parv[])
{
/* if there's more than just two params, this is a protocol

View file

@ -183,7 +183,7 @@ static struct StatsStruct stats_cmd_table[] = {
* parv[2] = (if present) server/mask in stats L, or target
*
* This will search the tables for the appropriate stats letter,
* if found execute it.
* if found execute it.
*/
static int
m_stats(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
@ -202,7 +202,7 @@ m_stats(struct Client *client_p, struct Client *source_p, int parc, const char *
/* safe enough to give this on a local connect only */
sendto_one(source_p, form_str(RPL_LOAD2HI),
me.name, source_p->name, "STATS");
sendto_one_numeric(source_p, RPL_ENDOFSTATS,
sendto_one_numeric(source_p, RPL_ENDOFSTATS,
form_str(RPL_ENDOFSTATS), statchar);
return 0;
}
@ -246,7 +246,7 @@ m_stats(struct Client *client_p, struct Client *source_p, int parc, const char *
}
/* Send the end of stats notice, and the stats_spy */
sendto_one_numeric(source_p, RPL_ENDOFSTATS,
sendto_one_numeric(source_p, RPL_ENDOFSTATS,
form_str(RPL_ENDOFSTATS), statchar);
return 0;
@ -285,7 +285,7 @@ stats_connect(struct Client *source_p)
char *s;
rb_dlink_node *ptr;
if((ConfigFileEntry.stats_c_oper_only ||
if((ConfigFileEntry.stats_c_oper_only ||
(ConfigServerHide.flatten_links && !IsExemptShide(source_p))) &&
!IsOper(source_p))
{
@ -320,9 +320,9 @@ stats_connect(struct Client *source_p)
*s = '\0';
sendto_one_numeric(source_p, RPL_STATSCLINE,
sendto_one_numeric(source_p, RPL_STATSCLINE,
form_str(RPL_STATSCLINE),
"*@127.0.0.1",
"*@127.0.0.1",
buf, server_p->name,
server_p->port, server_p->class_name);
}
@ -355,7 +355,7 @@ stats_tdeny (struct Client *source_p)
get_printable_kline(source_p, aconf, &host, &pass, &user, &oper_reason);
sendto_one_numeric(source_p, RPL_STATSDLINE,
sendto_one_numeric(source_p, RPL_STATSDLINE,
form_str (RPL_STATSDLINE),
'd', host, pass,
oper_reason ? "|" : "",
@ -392,7 +392,7 @@ stats_deny (struct Client *source_p)
get_printable_kline(source_p, aconf, &host, &pass, &user, &oper_reason);
sendto_one_numeric(source_p, RPL_STATSDLINE,
sendto_one_numeric(source_p, RPL_STATSDLINE,
form_str (RPL_STATSDLINE),
'D', host, pass,
oper_reason ? "|" : "",
@ -434,7 +434,7 @@ stats_exempt(struct Client *source_p)
get_printable_conf (aconf, &name, &host, &pass,
&user, &port, &classname);
sendto_one_numeric(source_p, RPL_STATSDLINE,
sendto_one_numeric(source_p, RPL_STATSDLINE,
form_str(RPL_STATSDLINE),
'e', host, pass, "", "");
}
@ -469,7 +469,7 @@ stats_prop_klines(struct Client *source_p)
if(aconf->status != CONF_KILL)
continue;
get_printable_kline(source_p, aconf, &host, &pass,
get_printable_kline(source_p, aconf, &host, &pass,
&user, &oper_reason);
sendto_one_numeric(source_p, RPL_STATSKLINE,
@ -486,7 +486,7 @@ stats_hubleaf(struct Client *source_p)
struct remote_conf *hub_p;
rb_dlink_node *ptr;
if((ConfigFileEntry.stats_h_oper_only ||
if((ConfigFileEntry.stats_h_oper_only ||
(ConfigServerHide.flatten_links && !IsExemptShide(source_p))) &&
!IsOper(source_p))
{
@ -587,7 +587,7 @@ stats_tklines(struct Client *source_p)
get_printable_kline(source_p, aconf, &host, &pass, &user, &oper_reason);
sendto_one_numeric(source_p, RPL_STATSKLINE,
sendto_one_numeric(source_p, RPL_STATSKLINE,
form_str(RPL_STATSKLINE), aconf->flags & CONF_FLAGS_TEMPORARY ? 'k' : 'K',
host, user, pass, oper_reason ? "|" : "",
oper_reason ? oper_reason : "");
@ -606,7 +606,7 @@ stats_tklines(struct Client *source_p)
{
aconf = ptr->data;
get_printable_kline(source_p, aconf, &host, &pass,
get_printable_kline(source_p, aconf, &host, &pass,
&user, &oper_reason);
sendto_one_numeric(source_p, RPL_STATSKLINE,
@ -700,8 +700,8 @@ stats_oper(struct Client *source_p)
RB_DLINK_FOREACH(ptr, oper_conf_list.head)
{
oper_p = ptr->data;
sendto_one_numeric(source_p, RPL_STATSOLINE,
sendto_one_numeric(source_p, RPL_STATSOLINE,
form_str(RPL_STATSOLINE),
oper_p->username, oper_p->host, oper_p->name,
IsOper(source_p) ? oper_p->privset->name : "0", "-1");
@ -755,7 +755,7 @@ stats_operedup (struct Client *source_p)
sendto_one_numeric(source_p, RPL_STATSDEBUG,
"p :%s (%s@%s)",
target_p->name, target_p->username,
target_p->name, target_p->username,
target_p->host);
}
@ -786,7 +786,7 @@ stats_tresv(struct Client *source_p)
{
aconf = ptr->data;
if(aconf->hold)
sendto_one_numeric(source_p, RPL_STATSQLINE,
sendto_one_numeric(source_p, RPL_STATSQLINE,
form_str(RPL_STATSQLINE),
'q', aconf->port, aconf->host, aconf->passwd);
}
@ -795,7 +795,7 @@ stats_tresv(struct Client *source_p)
{
aconf = ptr->data;
if(aconf->hold)
sendto_one_numeric(source_p, RPL_STATSQLINE,
sendto_one_numeric(source_p, RPL_STATSQLINE,
form_str(RPL_STATSQLINE),
'q', aconf->port, aconf->host, aconf->passwd);
}
@ -814,7 +814,7 @@ stats_resv(struct Client *source_p)
{
aconf = ptr->data;
if(!aconf->hold)
sendto_one_numeric(source_p, RPL_STATSQLINE,
sendto_one_numeric(source_p, RPL_STATSQLINE,
form_str(RPL_STATSQLINE),
'Q', aconf->port, aconf->host, aconf->passwd);
}
@ -823,7 +823,7 @@ stats_resv(struct Client *source_p)
{
aconf = ptr->data;
if(!aconf->hold)
sendto_one_numeric(source_p, RPL_STATSQLINE,
sendto_one_numeric(source_p, RPL_STATSQLINE,
form_str(RPL_STATSQLINE),
'Q', aconf->port, aconf->host, aconf->passwd);
}
@ -859,17 +859,17 @@ stats_usage (struct Client *source_p)
rup = (rb_current_time() - startup_time) * hzz;
if(0 == rup)
rup = 1;
sendto_one_numeric(source_p, RPL_STATSDEBUG,
"R :CPU Secs %d:%02d User %d:%02d System %d:%02d",
(int) (secs / 60), (int) (secs % 60),
(int) (rus.ru_utime.tv_sec / 60),
(int) (rus.ru_utime.tv_sec % 60),
(int) (rus.ru_stime.tv_sec / 60),
(int) (rus.ru_stime.tv_sec / 60),
(int) (rus.ru_stime.tv_sec % 60));
sendto_one_numeric(source_p, RPL_STATSDEBUG,
"R :RSS %ld ShMem %ld Data %ld Stack %ld",
rus.ru_maxrss, (rus.ru_ixrss / rup),
rus.ru_maxrss, (rus.ru_ixrss / rup),
(rus.ru_idrss / rup), (rus.ru_isrss / rup));
sendto_one_numeric(source_p, RPL_STATSDEBUG,
"R :Swaps %d Reclaims %d Faults %d",
@ -882,7 +882,7 @@ stats_usage (struct Client *source_p)
(int) rus.ru_msgrcv, (int) rus.ru_msgsnd);
sendto_one_numeric(source_p, RPL_STATSDEBUG,
"R :Signals %d Context Vol. %d Invol %d",
(int) rus.ru_nsignals, (int) rus.ru_nvcsw,
(int) rus.ru_nsignals, (int) rus.ru_nvcsw,
(int) rus.ru_nivcsw);
}
@ -923,7 +923,7 @@ stats_tstats (struct Client *source_p)
sendto_one_numeric(source_p, RPL_STATSDEBUG,
"T :accepts %u refused %u", sp.is_ac, sp.is_ref);
sendto_one_numeric(source_p, RPL_STATSDEBUG,
"T :rejected %u delaying %lu",
"T :rejected %u delaying %lu",
sp.is_rej, delay_exit_length());
sendto_one_numeric(source_p, RPL_STATSDEBUG,
"T :throttled refused %u throttle list size %lu", sp.is_thr, throttle_size());
@ -937,7 +937,7 @@ stats_tstats (struct Client *source_p)
"T :nick collisions %u saves %u unknown closes %u",
sp.is_kill, sp.is_save, sp.is_ni);
sendto_one_numeric(source_p, RPL_STATSDEBUG,
"T :wrong direction %u empty %u",
"T :wrong direction %u empty %u",
sp.is_wrdi, sp.is_empt);
sendto_one_numeric(source_p, RPL_STATSDEBUG,
"T :numerics seen %u", sp.is_num);
@ -957,11 +957,11 @@ stats_tstats (struct Client *source_p)
"T :connected %u %u", sp.is_cl, sp.is_sv);
sendto_one_numeric(source_p, RPL_STATSDEBUG,
"T :bytes sent %lluK %lluK",
sp.is_cbs / 1024,
sp.is_cbs / 1024,
sp.is_sbs / 1024);
sendto_one_numeric(source_p, RPL_STATSDEBUG,
"T :bytes recv %lluK %lluK",
sp.is_cbr / 1024,
sp.is_cbr / 1024,
sp.is_sbr / 1024);
sendto_one_numeric(source_p, RPL_STATSDEBUG,
"T :time connected %llu %llu",
@ -974,13 +974,13 @@ stats_uptime (struct Client *source_p)
time_t now;
now = rb_current_time() - startup_time;
sendto_one_numeric(source_p, RPL_STATSUPTIME,
sendto_one_numeric(source_p, RPL_STATSUPTIME,
form_str (RPL_STATSUPTIME),
(int)(now / 86400), (int)((now / 3600) % 24),
(int)((now / 60) % 60), (int)(now % 60));
sendto_one_numeric(source_p, RPL_STATSCONN,
form_str (RPL_STATSCONN),
MaxConnectionCount, MaxClientCount,
MaxConnectionCount, MaxClientCount,
Count.totalrestartcount);
}
@ -1034,7 +1034,7 @@ stats_shared (struct Client *source_p)
*p = '\0';
sendto_one_numeric(source_p, RPL_STATSULINE,
sendto_one_numeric(source_p, RPL_STATSULINE,
form_str(RPL_STATSULINE),
shared_p->server, shared_p->username,
shared_p->host, buf);
@ -1056,7 +1056,7 @@ stats_shared (struct Client *source_p)
*p = '\0';
sendto_one_numeric(source_p, RPL_STATSULINE,
sendto_one_numeric(source_p, RPL_STATSULINE,
form_str(RPL_STATSULINE),
shared_p->server, "*", "*", buf);
}
@ -1106,7 +1106,7 @@ stats_servers (struct Client *source_p)
(target_p->serv->by[0] ? target_p->serv->by : "Remote."),
(int) (rb_current_time() - target_p->localClient->lasttime),
(int) rb_linebuf_len (&target_p->localClient->buf_sendq),
days, (days == 1) ? "" : "s", hours, minutes,
days, (days == 1) ? "" : "s", hours, minutes,
(int) seconds);
}
@ -1145,7 +1145,7 @@ stats_gecos(struct Client *source_p)
if(!aconf->hold)
sendto_one_numeric(source_p, RPL_STATSXLINE,
form_str(RPL_STATSXLINE),
'X', aconf->port, aconf->host,
'X', aconf->port, aconf->host,
aconf->passwd);
}
}
@ -1283,7 +1283,7 @@ stats_memory (struct Client *source_p)
"z :Users %u(%lu) Invites %u(%lu)",
users_counted,
(unsigned long) users_counted * sizeof(struct User),
users_invited_count,
users_invited_count,
(unsigned long) users_invited_count * sizeof(rb_dlink_node));
sendto_one_numeric(source_p, RPL_STATSDEBUG,
@ -1302,7 +1302,7 @@ stats_memory (struct Client *source_p)
sendto_one_numeric(source_p, RPL_STATSDEBUG,
"z :Classes %u(%lu)",
class_count,
class_count,
(unsigned long) class_count * sizeof(struct Class));
sendto_one_numeric(source_p, RPL_STATSDEBUG,
@ -1320,7 +1320,7 @@ stats_memory (struct Client *source_p)
"z :Channel members %u(%lu) invite %u(%lu)",
channel_users,
(unsigned long) channel_users * sizeof(rb_dlink_node),
channel_invites,
channel_invites,
(unsigned long) channel_invites * sizeof(rb_dlink_node));
total_channel_memory = channel_memory +
@ -1335,7 +1335,7 @@ stats_memory (struct Client *source_p)
sendto_one_numeric(source_p, RPL_STATSDEBUG,
"z :Hash: client %u(%ld) chan %u(%ld)",
U_MAX, (long)(U_MAX * sizeof(rb_dlink_list)),
U_MAX, (long)(U_MAX * sizeof(rb_dlink_list)),
CH_MAX, (long)(CH_MAX * sizeof(rb_dlink_list)));
sendto_one_numeric(source_p, RPL_STATSDEBUG,
@ -1357,8 +1357,8 @@ stats_memory (struct Client *source_p)
total_memory += mem_servers_cached;
sendto_one_numeric(source_p, RPL_STATSDEBUG,
"z :Total: whowas %d channel %d conf %d",
(int) totww, (int) total_channel_memory,
"z :Total: whowas %d channel %d conf %d",
(int) totww, (int) total_channel_memory,
(int) conf_memory);
count_local_client_memory(&local_client_count, &local_client_memory_used);
@ -1391,7 +1391,7 @@ stats_ziplinks (struct Client *source_p)
target_p = ptr->data;
if(IsCapable (target_p, CAP_ZIP))
{
zipstats = target_p->localClient->zipstats;
zipstats = target_p->localClient->zipstats;
sprintf(buf, "%.2f%%", zipstats->out_ratio);
sprintf(buf1, "%.2f%%", zipstats->in_ratio);
sendto_one_numeric(source_p, RPL_STATSDEBUG,
@ -1399,8 +1399,8 @@ stats_ziplinks (struct Client *source_p)
"(%llu kB data/%llu kB wire)] recv[%s compression "
"(%llu kB data/%llu kB wire)]",
target_p->name,
buf, zipstats->out >> 10,
zipstats->out_wire >> 10, buf1,
buf, zipstats->out >> 10,
zipstats->out_wire >> 10, buf1,
zipstats->in >> 10, zipstats->in_wire >> 10);
sent_data++;
}
@ -1447,7 +1447,7 @@ stats_servlinks (struct Client *source_p)
(int) target_p->localClient->receiveM,
(int) target_p->localClient->receiveK,
rb_current_time() - target_p->localClient->firsttime,
(rb_current_time() > target_p->localClient->lasttime) ?
(rb_current_time() > target_p->localClient->lasttime) ?
(rb_current_time() - target_p->localClient->lasttime) : 0,
IsOper (source_p) ? show_capabilities (target_p) : "TS");
}
@ -1466,7 +1466,7 @@ stats_servlinks (struct Client *source_p)
uptime = (rb_current_time() - startup_time);
snprintf(buf, sizeof buf, "%7.2f %s (%4.1f K/s)",
_GMKv (me.localClient->sendK),
_GMKv (me.localClient->sendK),
_GMKs (me.localClient->sendK),
(float) ((float) me.localClient->sendK / (float) uptime));
sendto_one_numeric(source_p, RPL_STATSDEBUG, "? :Server send: %s", buf);
@ -1610,7 +1610,7 @@ stats_l_client(struct Client *source_p, struct Client *target_p,
(int) target_p->localClient->receiveM,
(int) target_p->localClient->receiveK,
rb_current_time() - target_p->localClient->firsttime,
(rb_current_time() > target_p->localClient->lasttime) ?
(rb_current_time() > target_p->localClient->lasttime) ?
(rb_current_time() - target_p->localClient->lasttime) : 0,
IsOper(source_p) ? show_capabilities(target_p) : "-");
}
@ -1629,7 +1629,7 @@ stats_l_client(struct Client *source_p, struct Client *target_p,
(int) target_p->localClient->receiveM,
(int) target_p->localClient->receiveK,
rb_current_time() - target_p->localClient->firsttime,
(rb_current_time() > target_p->localClient->lasttime) ?
(rb_current_time() > target_p->localClient->lasttime) ?
(rb_current_time() - target_p->localClient->lasttime) : 0,
"-");
}

View file

@ -1,5 +1,5 @@
/* modules/m_tb.c
*
*
* Copyright (C) 2003 Lee Hardy <lee@leeh.co.uk>
* Copyright (C) 2003-2005 ircd-ratbox development team
*

Some files were not shown because too many files have changed in this diff Show more