+2005-03-20 Michael Poole <mdpoole@troilus.org>
+
+ * ircd/IPcheck.c: Fix typos in comments and strings to reduce
+ future slumming for credit.
+
+ * ircd/channel.c, ircd/crule.c, ircd/engine_epoll.c: Likewise.
+ * ircd/fileio.c, ircd/hash.c, ircd/ircd.c: Likewise.
+ * ircd/ircd_auth.c, ircd/ircd_crypt.c: Likewise.
+ * ircd/ircd_crypt_native.c, ircd/ircd_crypt_smd5.c: Likewise.
+ * ircd/ircd_features.c, ircd/ircd_log.c: Likewise.
+ * ircd/ircd_parser.y, ircd/ircd_res.c: Likewise.
+ * ircd/ircd_reslib.c, ircd/ircd_string.c, ircd/list.c: Likewise.
+ * ircd/m_burst.c, ircd/m_clearmode.c, ircd/m_destruct.c: Likewise.
+ * ircd/m_invite.c, ircd/m_ison.c, ircd/m_kill.c: Likewise.
+ * ircd/m_server.c, ircd/m_squit.c, ircd/m_topic.c: Likewise.
+ * ircd/m_who.c, ircd/m_whois.c, ircd/m_whowas.c: Likewise.
+ * ircd/match.c, ircd/msgq.c, ircd/numnicks.c: Likewise.
+ * ircd/os_generic.c, ircd/parse.c, ircd/s_auth.c: Likewise.
+ * ircd/s_bsd.c, ircd/s_conf.c, ircd/s_debug.c: Likewise.
+ * ircd/s_misc.c, ircd/s_numeric.c, ircd/s_serv.c: Likewise.
+ * ircd/s_stats.c, ircd/s_user.c, ircd/table_gen.c: Likewise.
+ * ircd/umkpasswd.c, ircd/uping.c, ircd/whowas.c: Likewise.
+
+ * ircd/test/test_stub.c: Make exit_client() argument list
+ consistent with that in s_misc.c so doxygen is not confused.
+
2005-03-20 Michael Poole <mdpoole@troilus.org>
(Thanks to Reed Loden for pointing these out.)
if (0 == --entry->connected) {
if (CONNECTED_SINCE(entry->last_connect) > IPCHECK_CLONE_LIMIT * IPCHECK_CLONE_PERIOD) {
/*
- * Otherwise we'd penetalize for this old value if the client reconnects within 20 seconds
+ * Otherwise we'd penalize for this old value if the client reconnects within 20 seconds
*/
entry->attempts = 0;
}
/*
* This calculation can be pretty unfair towards large multi-user hosts, but
* there is "nothing" we can do without also allowing spam bots to send more
- * messages or by drastically increasing the ammount of memory used in the IPregistry.
+ * messages or by drastically increasing the amount of memory used in the IPregistry.
*
* The problem is that when a client disconnects, leaving no free targets, then
* the next client from that IP number has to pay for it (getting no free targets).
*/
free_targets += (CurrentTime - cli_firsttime(cptr) - 600) / TARGET_DELAY;
/*
- * Finally, store smallest value for Judgement Day
+ * Finally, store smallest value for Judgment Day
*/
if (free_targets < entry->target->count)
entry->target->count = free_targets;
/** Handle a client being rejected during connection through no fault
* of their own. This "undoes" the effect of ip_registry_check_local()
* so the client's address is not penalized for the failure.
- * @param[in] a Address of rejected client.
+ * @param[in] cptr Client who has been rejected.
*/
void IPcheck_connect_fail(const struct Client *cptr)
{
* numeric nicks is no longer quite as important.
*
* @param sptr Pointer to the client that has requested the search
- * @param user a string represeting the client to be found
+ * @param user a string representing the client to be found
* @param chasing a variable set to 0 if the user was found directly,
* 1 otherwise
* @returns a pointer the client, or NULL if the client wasn't found.
return (member && !IsZombie(member)) ? member : 0;
}
-/** Searches for a ban from a banlist that matches a user.
+/** Searches for a ban from a ban list that matches a user.
* @param[in] cptr The client to test.
* @param[in] banlist The list of bans to test.
* @return Pointer to a matching ban, or NULL if none exit.
/** Remove a user from a channel
* This is the generic entry point for removing a user from a channel, this
- * function will remove the client from the channel, and destory the channel
+ * function will remove the client from the channel, and destroy the channel
* if there are no more normal users left.
*
* @param cptr The client
if (IsVoicedOrOpped(member))
return 1;
/*
- * If it's moderated, and you aren't a priviledged user, you can't
+ * If it's moderated, and you aren't a privileged user, you can't
* speak.
*/
if (member->channel->mode.mode & MODE_MODERATED)
* @param chptr The channel to join
* @param key The key to use
*
- * @returns any error that occured bitwised OR'd with MAGIC_OPER_OVERRIDE
- * if the oper used the magic key, 0 if no error occured.
+ * @returns any error that occurred bit-wise OR'd with MAGIC_OPER_OVERRIDE
+ * if the oper used the magic key, 0 if no error occurred.
*/
int can_join(struct Client *sptr, struct Channel *chptr, char *key)
{
*
* We also need to turn 'who' into a zombie on servers 1 and 6,
* because a KICK from 'who' (kicking someone else in that direction)
- * can arrive there afterwards - which should not be bounced itself.
+ * can arrive there afterward - which should not be bounced itself.
* Therefore case a) also applies for servers 1 and 6.
*
* --Run
*
* @param strptr The buffer to concatenate into
* @param strptr_i modified offset to the position to modify
- * @param str1 The string to contatenate from.
+ * @param str1 The string to concatenate from.
* @param str2 The second string to contatenate from.
* @param c Charactor to separate the string from str1 and str2.
*/
*
* @param[in,out] banlist Pointer to head of list.
* @param[in] newban Ban (or exception) to add (or remove).
+ * @param[in] do_free If non-zero, free \a newban on failure.
* @return Zero if \a newban could be applied, non-zero if not.
*/
int apply_ban(struct Ban **banlist, struct Ban *newban, int do_free)
*
* by Tony Vencill (Tonto on IRC) <vencill@bga.com>
*
- * The majority of this file is a recusive descent parser used to convert
+ * The majority of this file is a recursive descent parser used to convert
* connection rules into expression trees when the conf file is read.
* All parsing structures and types are hidden in the interest of good
* programming style and to make possible future data structure changes
strcpy(x,y); \
} while(0)
-/* We don't care about collation discrepacies here, it seems.... */
+/* We don't care about collation discrepancies here, it seems.... */
#define ircd_strcmp strcasecmp
#endif
/*
* This function is recursive.. I wish I knew a nonrecursive way but
- * I dont. anyway, recursion is fun.. :)
- * DO NOT CALL THIS FUNTION WITH A POINTER TO A NULL POINTER
- * (ie: If *elem is NULL, you're doing it wrong - seg fault)
+ * I don't. Anyway, recursion is fun.. :)
+ * DO NOT CALL THIS FUNCTION WITH A POINTER TO A NULL POINTER
+ * (i.e.: If *elem is NULL, you're doing it wrong - seg fault)
*/
/** Free a connection rule and all its children.
* @param[in,out] elem Pointer to pointer to element to free. MUST NOT BE NULL.
if ((*(elem))->funcptr == crule__not)
{
- /* type conversions and ()'s are fun! ;) here have an asprin.. */
+ /* type conversions and ()'s are fun! ;) here have an aspirin.. */
if ((*(elem))->arg[0] != NULL)
crule_free((struct CRuleNode**) &((*(elem))->arg[0]));
}
MyFree(events);
}
-/** Descriptor for dpoll event engine. */
+/** Descriptor for epoll event engine. */
struct Engine engine_epoll = {
"epoll()",
engine_init,
}
/*
* stop NFS hangs...most systems should be able to open a file in
- * 3 seconds. -avalon (curtesy of wumpus)
+ * 3 seconds. -avalon (courtesy of wumpus)
*/
alarm(3);
if ((fd = open(filename, openmode, pmode)) == -1) {
* I avoided introducing new variables to do the work myself and I did let
* the optimizer play with more free registers, actual tests proved this
* solution to be faster than doing things like tmp2=tmp->hnext... and then
- * use tmp2 myself wich would have given less freedom to the optimizer.
+ * use tmp2 myself which would have given less freedom to the optimizer.
*/
/** Prepend a client to the appropriate hash bucket.
*/
void server_panic(const char *message)
{
- /* inhibit sending server notice--we may be panicing due to low memory */
+ /* inhibit sending server notice--we may be panicking due to low memory */
log_write(LS_SYSTEM, L_CRIT, LOG_NOSNOTICE, "Server panic: %s", message);
flush_connections(0);
log_close();
/* Ok, the thing that will happen most frequently, is that someone will
* have sent something recently. Cover this first for speed.
* --
- * If it's an unregisterd client and hasn't managed to register within
+ * If it's an unregistered client and hasn't managed to register within
* max_ping then it's obviously having problems (broken client) or it's
* just up to no good, so we won't skip it, even if its been sending
* data to us.
if (!IsPingSent(cptr))
{
- /* If we havent PINGed the connection and we havent heard from it in a
+ /* If we haven't PINGed the connection and we haven't heard from it in a
* while, PING it to make sure it is still alive.
*/
SetPingSent(cptr);
if (thisServer.euid != thisServer.uid)
setuid(thisServer.uid);
- /* Do we really need to santiy check the non-NULLness of optarg? That's
+ /* Do we really need to sanity check the non-NULLness of optarg? That's
* getopt()'s job... Removing those... -zs
*/
while ((opt = getopt(argc, argv, options)) != EOF)
}
/** Handle a DoneAuth response from %IAuth.
- * THis means the client is authorized, so let them in.
+ * This means the client is authorized, so let them in.
* @param[in] iauth Connection that sent the message.
* @param[in] argc Argument count.
* @param[in] argv Argument list.
* @version $Id$
*
* This is a new look crypto API for ircu, it can handle different
- * password formats by the grace of magic tokens at the begining of the
+ * password formats by the grace of magic tokens at the beginning of the
* password e.g. $SMD5 for Salted MD5, $CRYPT for native crypt(), etc.
*
* Currently crypt routines are implemented for: the native crypt()
* function, Salted MD5 and a plain text mechanism which should only
- * be used for testing. I intend to add Blowish, 3DES and possibly
+ * be used for testing. I intend to add Blowfish, 3DES and possibly
* SHA1 support as well at some point, but I'll need to check the
* possible problems that'll cause with stupid crypto laws.
*
{
crypt_mechs_t* crypt_mech;
- Debug((DEBUG_INFO, "ircd_crypt_register_mech: resistering mechanism: %s", mechanism->shortname));
+ Debug((DEBUG_INFO, "ircd_crypt_register_mech: registering mechanism: %s", mechanism->shortname));
/* try to allocate some memory for the new mechanism */
if ((crypt_mech = (crypt_mechs_t*)MyMalloc(sizeof(crypt_mechs_t))) == NULL)
}
/* we're done */
- Debug((DEBUG_INFO, "ircd_crypt_register_mech: resistered mechanism: %s, crypt_function is at 0x%X.", crypt_mech->mech->shortname, &crypt_mech->mech->crypt_function));
+ Debug((DEBUG_INFO, "ircd_crypt_register_mech: registered mechanism: %s, crypt_function is at 0x%X.", crypt_mech->mech->shortname, &crypt_mech->mech->crypt_function));
Debug((DEBUG_INFO, "ircd_crypt_register_mech: %s: %s", crypt_mech->mech->shortname, crypt_mech->mech->description));
return 0;
}
ircd_strncpy(hashed_pass + crypt_mech->mech->crypt_token_size, temp_hashed_pass, strlen(temp_hashed_pass));
Debug((DEBUG_DEBUG, "ircd_crypt: tagged pass is %s", hashed_pass));
} else {
- Debug((DEBUG_DEBUG, "ircd_crypt: will try next mechansim at 0x%X",
+ Debug((DEBUG_DEBUG, "ircd_crypt: will try next mechanism at 0x%X",
crypt_mech->next));
crypt_mech = crypt_mech->next;
continue;
crypt_mechs_root->mech = NULL;
crypt_mechs_root->next = crypt_mechs_root->prev = NULL;
-/* temporary kludge until we're modular. manualy call the
- register funtions for crypt mechanisms */
+/* temporary kludge until we're modular. manually call the
+ register functions for crypt mechanisms */
ircd_register_crypt_smd5();
ircd_register_crypt_plain();
ircd_register_crypt_native();
* @version $Id$
*
* Routines for handling passwords encrypted with the system's native crypt()
- * function (typicaly a DES encryption routine, but can be anything nowdays).
+ * function (typically a DES encryption routine, but can be anything nowadays).
*
*/
#define _XOPEN_SOURCE
*
* ircd_crypt_smd5 is largely taken from md5_crypt.c from the Linux PAM
* source code. it's been modified to fit in with ircu and some of the
- * undeeded code has been removed. the source file md5_crypt.c has the
- * following licence, so if any of our opers or admins are in Denmark
+ * unneeded code has been removed. the source file md5_crypt.c has the
+ * following license, so if any of our opers or admins are in Denmark
* they better go buy them a drink ;) -- hikari
*
* ----------------------------------------------------------------------------
* @param v The unsigned long we're working on
* @param n The number of bytes we're working with
*
- * This is used to produce the normal MD5 hash everyone is familar with.
+ * This is used to produce the normal MD5 hash everyone is familiar with.
* It takes the value v and converts n bytes of it it into an ASCII string in
* 6-bit chunks, the resulting string is put at the address pointed to by s.
*
* @return The Salted MD5 password of key and salt
*
* Erm does exactly what the brief comment says. If you think I'm writing a
- * description of how MD5 works, you have another thing comming. Go and read
- * Applied Cryptopgraphy by Bruce Schneier. The only difference is we use a
- * salt at the begining of the password to perturb it so that the same password
+ * description of how MD5 works, you have another think coming. Go and read
+ * Applied Cryptography by Bruce Schneier. The only difference is we use a
+ * salt at the beginning of the password to perturb it so that the same password
* doesn't always produce the same hash.
*
*/
static struct LogTypes {
char *type; /**< Settable name. */
int (*set)(const char *, const char *); /**< Function to set the value. */
- char *(*get)(const char *); /**< Functino to get the value. */
+ char *(*get)(const char *); /**< Function to get the value. */
} logTypes[] = {
{ "FILE", log_set_file, log_get_file },
{ "FACILITY", log_set_facility, log_get_facility },
/** Sets a feature to the given value.
* @param[in] from Client trying to set parameters.
- * @param[in] fields Array of paraters to set.
+ * @param[in] fields Array of parameters to set.
* @param[in] count Number of fields in \a count.
* @return <0 to clear the feature mark, 0 to leave it, >0 to set the feature mark.
*/
typedef int (*feat_set_call)(struct Client* from, const char* const* fields, int count);
/** Gets the value of a feature.
* @param[in] from Client trying to get parameters.
- * @param[in] fields Array of paraters to set.
+ * @param[in] fields Array of parameters to set.
* @param[in] count Number of fields in \a count.
*/
typedef void (*feat_get_call)(struct Client* from, const char* const* fields, int count);
return log_sno_name(desc->snomask);
}
-/** Set the verbosity level for a subystem.
+/** Set the verbosity level for a subsystem.
* @param[in] subsys Subsystem name.
* @param[in] level Minimum log level.
* @return Zero on success; non-zero on error.
%token USERMODE
%token IAUTH
%token TIMEOUT
-/* and now a lot of priviledges... */
+/* and now a lot of privileges... */
%token TPRIV_CHAN_LIMIT TPRIV_MODE_LCHAN TPRIV_DEOP_LCHAN TPRIV_WALK_LCHAN
%token TPRIV_LOCAL_KILL TPRIV_REHASH TPRIV_RESTART TPRIV_DIE
%token TPRIV_GLINE TPRIV_LOCAL_GLINE TPRIV_LOCAL_JUPE TPRIV_LOCAL_BADCHAN
}
;
-/* this is an arithmatic expression */
+/* this is an arithmetic expression */
expr: NUMBER
{
$$ = $1;
$$ = $1 / $3;
}
/* leave this out until we find why it makes BSD yacc dump core -larne
- | '-' expr %prec NEG
- = {
+ | '-' expr %prec NEG {
$$ = -$2;
} */
| '(' expr ')' {
char type; /**< Current request type. */
char retries; /**< Retry counter. */
char sends; /**< Number of sends (>1 means resent). */
- char resend; /**< Send flag; 0 == dont resend. */
+ char resend; /**< Send flag; 0 == don't resend. */
time_t sentat; /**< Timestamp we last sent this request. */
time_t timeout; /**< When this request times out. */
struct irc_in_addr addr; /**< Address for this request. */
do_query_name(NULL, request->name, request, request->type);
break;
case T_AAAA:
- /* didnt work, try A */
+ /* didn't work, try A */
if (request->state == REQ_AAAA)
do_query_name(NULL, request->name, request, T_A);
default:
return(1);
break;
- case T_CNAME: /* first check we already havent started looking
+ case T_CNAME: /* first check we already haven't started looking
into a cname */
if (request->type != T_PTR)
return(0);
else
{
/*
- * If we havent already tried this, and we're looking up AAAA, try A
+ * If we haven't already tried this, and we're looking up AAAA, try A
* now
*/
else
{
/*
- * If a bad error was returned, we stop here and dont send
+ * If a bad error was returned, we stop here and don't send
* send any more (no retries granted).
*/
Debug((DEBUG_DNS, "Request %p has bad response (state %d type %d)", request, request->state, request->type));
*/
/* Original copyright ISC as above.
- * Code modified specifically for ircd use from the following orginal files
+ * Code modified specifically for ircd use from the following original files
* in bind ...
*
* res_comp.c
continue;
p = input;
- /* skip until something thats not a space is seen */
+ /* skip until something that's not a space is seen */
while (IsSpace(*p))
p++;
/* if at this point, have a '\0' then continue */
/**
* Expand compressed domain name to full domain name.
* Like irc_ns_name_uncompress(), but checks for a well-formed result.
- * @param[in] msg Pointer to the begining of the message.
+ * @param[in] msg Pointer to the beginning of the message.
* @param[in] eom First location after the message.
* @param[in] src Pointer to where to starting decoding.
* @param[out] dst Output buffer.
/**
* Expand compressed domain name to full domain name.
- * @param[in] msg Pointer to the begining of the message.
+ * @param[in] msg Pointer to the beginning of the message.
* @param[in] eom First location after the message.
* @param[in] src Pointer to where to starting decoding.
* @param[out] dst Output buffer.
/**
* Unpack compressed domain name to uncompressed form.
- * @param[in] msg Pointer to the begining of the message.
+ * @param[in] msg Pointer to the beginning of the message.
* @param[in] eom First location after the message.
* @param[in] src Pointer to where to starting decoding.
* @param[out] dst Output buffer.
return((bitlen + 7 ) / 8 + 1);
}
- return(-1); /* unknwon ELT */
+ return(-1); /* unknown ELT */
}
return(l);
if (beg_blen == NULL) {
if (c == '0') {
- /* blen never begings with 0 */
+ /* blen never begins with 0 */
return(EINVAL);
}
beg_blen = cp;
* On top of that (which seems to be the RFC) we demand that the
* top domain does not contain any digits.
*/
-/** Regular expresion to match a hostname.
+/** Regular expression to match a hostname.
* Matches zero or more alphanumeric labels followed by '.' and a
* final label that may only contain alphabetic characters.
*/
* This is pretty straightforward; the only trick is borrowed
* from Paul Vixie (BIND): when it sees a "::" continue as if
* it were a single ":", but note where it happened, and fill
- * with zeros afterwards.
+ * with zeros afterward.
*/
if (input[pos] == ':') {
if ((input[pos+1] != ':') || (input[pos+2] == ':'))
/* Verify that the list hasn't become circular */
assert(cli_next(client) != GlobalClientList);
assert(visited <= clientAllocCount);
- /* Remember what should preceed us */
+ /* Remember what should precede us */
prev = client;
}
}
current_mode_needs_reset = 0;
}
current_mode = (current_mode & ~CHFL_DELAYED) | CHFL_VOICE;
- oplevel = -1; /* subsequential digits are an absolute op-level value. */
+ oplevel = -1; /* subsequent digits are an absolute op-level value. */
}
else if (isdigit(*ptr)) {
int level_increment = 0;
return need_more_params(sptr, "CLEARMODE");
if (!IsPrivileged(sptr)) {
- protocol_violation(sptr,"No priviledges on source for CLEARMODE, desync?");
+ protocol_violation(sptr,"No privileges on source for CLEARMODE, desync?");
return send_reply(sptr, ERR_NOPRIVILEGES);
}
* not been destructed and recreated in the meantime,
* this means that the normal synchronization rules
* account and we react as if we decided to destruct
- * the channel ourselfs: we destruct the channel and
+ * the channel ourselves: we destruct the channel and
* send a DESTRUCT in all directions.
* 2) The channel is not empty. In case we cannot remove
* it and do not propagate the DESTRUCT message. Instead
* then could have generated the DESTRUCT. In the meantime
* our user also left the channel. We can ignore the
* destruct because it comes from an 'area' that will
- * be overriden by our own CREATE: the state that generated
+ * be overridden by our own CREATE: the state that generated
* this DESTRUCT is 'history'.
*/
int ms_destruct(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
if (!(chptr = FindChannel(parv[2]))) {
/*
- * allow invites to non existant channels, bleah
+ * allow invites to non existent channels, bleah
* avoid JOIN, INVITE, PART abuse
*/
sendcmdto_one(sptr, CMD_INVITE, acptr, "%C :%s", acptr, parv[2]);
/*
* m_ison
*
- * Added by Darren Reed 13/8/91 to act as an efficent user indicator
+ * Added by Darren Reed 13/8/91 to act as an efficient user indicator
* with respect to cpu/bandwidth used. Implemented for NOTIFY feature in
* clients. Designed to reduce number of whois requests. Can process
* nicknames in batches as long as the maximum buffer length.
if (!(victim = FindClient(user))) {
/*
- * If the user has recently changed nick, we automaticly
+ * If the user has recently changed nick, we automatically
* rewrite the KILL for this new nickname--this keeps
* servers in synch when nick change and kill collide
*/
if (!MyConnect(victim) && !HasPriv(sptr, PRIV_KILL)) {
- sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :Nick %s isnt on your server",
+ sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :Nick %s isn't on your server",
sptr, cli_name(victim));
return 0;
}
}
/*
* Avoid other nick collisions...
- * This is a doubtfull test though, what else would it be
+ * This is a doubtful test though, what else would it be
* when it has a server.name ?
*/
else if (!IsServer(acptr) && !IsHandshake(acptr))
server = parv[1];
/*
- * The following allows wild cards in SQUIT. Only usefull
+ * The following allows wild cards in SQUIT. Only useful
* when the command is issued by an oper.
*/
for (acptr = GlobalClientList; (acptr = next_client(acptr, server));
/*
* Look for a matching server that is closer,
- * that way we won't accidently squit two close
+ * that way we won't accidentally squit two close
* servers like davis.* and davis-r.* when typing
* /SQUIT davis*
*/
ircd_strncpy(chptr->topic, topic, TOPICLEN);
ircd_strncpy(chptr->topic_nick, cli_name(from), NICKLEN);
chptr->topic_time = ts ? ts : TStime();
- /* Fixed in 2.10.11: Don't propergate local topics */
+ /* Fixed in 2.10.11: Don't propagate local topics */
if (!IsLocalChannel(chptr->chname))
sendcmdto_serv_butone(sptr, CMD_TOPIC, cptr, "%H %Tu %Tu :%s", chptr,
chptr->creationtime, chptr->topic_time, chptr->topic);
/*
- * A little spin-marking utility to tell us wich clients we have already
- * processed and wich not
+ * A little spin-marking utility to tell us which clients we have already
+ * processed and which not
*/
static int who_marker = 0;
static void move_marker(void)
struct Client *acptr; /* Client to show */
int bitsel; /* Mask of selectors to apply */
- int matchsel; /* Wich fields the match should apply on */
+ int matchsel; /* Which fields the match should apply on */
int counter; /* Query size counter,
initially used to count fields */
int commas; /* Does our mask contain any comma ?
/*
* 2000-07-01: Isomer
* * Rewritten to make this understandable
- * * You can nolonger /whois unregistered clients.
+ * * You can no longer /whois unregistered clients.
*
*
* General rules:
*/
static int do_wilds(struct Client* sptr, char *nick, int count, int parc)
{
- struct Client *acptr; /* Current client we're concidering */
+ struct Client *acptr; /* Current client we're considering */
struct User *user; /* the user portion of the client */
const char *name; /* the name of this client */
struct Membership* chan;
int showperson; /* Should we show this person? */
int found = 0 ; /* How many were found? */
- /* Ech! This is hidious! */
+ /* Ech! This is hideous! */
for (acptr = GlobalClientList; (acptr = next_client(acptr, nick));
acptr = cli_next(acptr))
{
/*
* I'm always last :-) and acptr->next == 0!!
*
- * Isomer: Does this strike anyone else as being a horrible hidious
+ * Isomer: Does this strike anyone else as being a horrible hideous
* hack?
*/
if (IsMe(acptr)) {
/*
* 'Rules' established for sending a WHOIS reply:
*
- * - if wildcards are being used dont send a reply if
- * the querier isnt any common channels and the
+ * - if wildcards are being used don't send a reply if
+ * the querier isn't any common channels and the
* client in question is invisible.
*
* - only send replies about common or public channels
*
* parv[0] = sender prefix
* parv[1] = nickname queried
- * parv[2] = maximum returned items (optional, default is unlimitted)
+ * parv[2] = maximum returned items (optional, default is unlimited)
* parv[3] = remote server target (Opers only, max returned items 20)
*/
int m_whowas(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
* Here `any' also includes \* and \? !
*
* After reworking the boolean expressions, we get:
- * (Optimized to use boolean shortcircuits, with most frequently occuring
+ * (Optimized to use boolean short-circuits, with most frequently occurring
* cases upfront (which took 2 hours!)).
*/
if ((*m == '*' && !mq) ||
*
* (C) Carlo Wood - 6 Oct 1998
* Speedup rewrite by Andrea Cocito, December 1998.
- * Note that this new optimized alghoritm can *only* work in place.
+ * Note that this new optimized algorithm can *only* work in place.
*/
/** Collapse a mask string to remove redundancies.
* by means of matchcomp() that gets the plain text mask as input and writes
* its result in the memory locations addressed by the 3 parameters:
* - *cmask will contain the text of the compiled mask
- * - *minlen will contain the lenght of the shortest string that can match
+ * - *minlen will contain the length of the shortest string that can match
* the mask
* - *charset will contain the minimal set of chars needed to match the mask
* You can pass NULL as *charset and it will be simply not returned, but you
- * MUST pass valid pointers for *minlen and *cmask (wich must be big enough
+ * MUST pass valid pointers for *minlen and *cmask (which must be big enough
* to contain the compiled mask text that is in the worst case as long as the
* text of the mask itself in plaintext format) and the return value of
* matchcomp() will be the number of chars actually written there (excluded
* of mmexec() that will tell if it completely overrides that mask (a lot like
* what mmatch() does for plain text masks).
* You can gain a lot of speed in many situations avoiding to matchexec() when:
- * - The maximum lenght of the field you are about to match() the mask to is
+ * - The maximum length of the field you are about to match() the mask to is
* shorter than minlen, in example when matching abc*def*ghil with a nick:
* It just cannot match since a nick is at most 9 chars long and the mask
* needs at least 10 chars (10 will be the value returned in minlen).
* cmask).
* The area pointed by *mask MUST be big enough (the mask might be up to
* twice the size of its compiled form if it's made all of \? or \*, and
- * this function can NOT work in place since it might enflate the mask)
+ * this function can NOT work in place since it might inflate the mask)
* The printed mask is not identical to the one that was compiled to cmask,
- * infact it is 1) forced to all lowercase, 2) collapsed, both things
+ * in fact it is 1) forced to all lowercase, 2) collapsed, both things
* are supposed to NOT change it's meaning.
* It returns the number of chars actually written to *mask;
*/
* "the wider overrides the restrict" means that any string that matches
* the restrict one _will_ also match the wider one, always.
* In this we behave differently from mmatch() because in example we return
- * true for " a?*cd overrides a*bcd " for wich the override happens for how
+ * true for " a?*cd overrides a*bcd " for which the override happens for how
* we literally defined it, here mmatch() would have returned false.
- * The original concepts and the base alghoritm are copied from mmatch()
+ * The original concepts and the base algorithm are copied from mmatch()
* written by Run (Carlo Wood), this function is written by
* Nemesi (Andrea Cocito)
*/
if (!*w) /* Did last loop match the rest of chunk ? */
return 0; /* ... Yes, end of wm, matched ! */
if (*w != 'Z')
- { /* ... No, hitted non-star */
+ { /* ... No, hit non-star */
w = bw; /* Rollback at beginning of chunk */
if (--trash < 0) /* Trashed the char where this try started */
return 1; /* if we can't trash more chars fail */
if (!(br < rz))
{ /* If we failed because we got the end of head */
trash -= (br - rx); /* it makes no sense to rollback, just trash */
- if (--trash < 0) /* all the rest of the head wich isn't long */
+ if (--trash < 0) /* all the rest of the head which isn't long */
return 1; /* enough for this chunk and go out of this */
break; /* loop, then we try with the chunks of rm */
};
while (*r)
{
bw = w;
- while (eat && *r) /* the '?' we had eated make us skip as many chars */
- if (*r++ != 'Z') /* here, but can't skip stars or trailing zero */
+ while (eat && *r) /* the '?' we ate makes us skip as many chars */
+ if (*r++ != 'Z') /* here, but can't skip stars or trailing zero */
eat--;
for (bw++; (*r) && (*bw != *r); r++)
if ((*r != 'Z') && (--trash < 0))
}
/* match the remaining chunks of wm against what remains of the tail of rm */
- r = rz - eat - 1; /* can't have <nul> or 'Z'within the tail, so just move r */
+ r = rz - eat - 1; /* can't have <nul> or 'Z' within the tail, so just move r */
while (r >= rx)
{
bw = w;
struct MsgBuf *mb;
int power;
- /* Find the power of two size that will accomodate the message */
+ /* Find the power of two size that will accommodate the message */
for (power = MB_BASE_SHIFT; power < MB_MAX_SHIFT + 1; power++)
if ((length - 1) >> power == 0)
break;
* replaced by a 5 character string: YYXXX
* Where 'YY' represents the server, and 'XXX' the nick on that server.
*
- * 'YYXXX' should not interfer with the input parser, and therefore is
+ * 'YYXXX' should not interfere with the input parser, and therefore is
* not allowed to contain spaces or a ':'.
* Also, 'YY' can't start with a '+' because of m_server().
*
* @param[out] buf Output buffer to write to.
* @param[in] addr IP address to encode.
* @param[in] count Number of bytes writable to \a buf.
+ * @param[in] v6_ok If non-zero, peer understands base-64 encoded IPv6 addresses.
*/
const char* iptobase64(char* buf, const struct irc_in_addr* addr, unsigned int count, int v6_ok)
{
#endif
/*
- * This is part of the STATS replies. There is no offical numeric for this
- * since this isnt an official command, in much the same way as HASH isnt.
+ * This is part of the STATS replies. There is no official numeric for this
+ * since this isn't an official command, in much the same way as HASH isn't.
* It is also possible that some systems wont support this call or have
* different field names for "struct rusage".
* -avalon
}
/** Parse a line of data from a user.
- * NOTE: parse_*() should not be called recusively by any other functions!
+ * NOTE: parse_*() should not be called recursively by any other
+ * functions!
* @param[in] cptr Client that sent the data.
* @param[in] buffer Start of input line.
* @param[in] bufend End of input line.
/*
* If the client corresponding to the
* prefix is not found. We must ignore it,
- * it is simply a lagged message travelling
+ * it is simply a lagged message traveling
* upstream a SQUIT that removed the client
* --Run
*/
/*
* If the client corresponding to the
* prefix is not found. We must ignore it,
- * it is simply a lagged message travelling
+ * it is simply a lagged message traveling
* upstream a SQUIT that removed the client
* --Run
* There turned out to be other reasons that
/** Flag the client to show an attempt to contact the ident server on
* the client's host. Should the connect or any later phase of the
- * identifing process fail, it is aborted and the user is given a
+ * identifying process fail, it is aborted and the user is given a
* username of "unknown".
* @param auth The request for which to start the ident lookup.
* @return Non-zero on success; zero if unable to start the lookup.
/*
* get the local address of the client and bind to that to
* make the auth request. This used to be done only for
- * ifdef VIRTTUAL_HOST, but needs to be done for all clients
+ * ifdef VIRTUAL_HOST, but needs to be done for all clients
* since the ident request must originate from that same address--
* and machines with multiple IP addresses are common now
*/
/** Send the ident server a query giving "theirport , ourport". The
* write is only attempted *once* so it is deemed to be a fail if the
- * entire write doesn't write all the data given. This shouldnt be a
+ * entire write doesn't write all the data given. This shouldn't be a
* problem since the socket should have a write buffer far greater
* than this message to store it in should problems arise. -avalon
* @param auth The request to send.
* defined FD_SETSIZE to MAXCONNECTIONS+4 before including the system's headers
* but sys/types.h might have abruptly redefined it so the check is still
* done), you might already need to recompile your kernel.
- * For larger FD_SETSIZE your milage may vary (kernel patches may be needed).
+ * For larger FD_SETSIZE your mileage may vary (kernel patches may be needed).
* The check is _NOT_ done if we will not use FD_SETS at all (USE_POLL)
*/
#error "FD_SETSIZE is too small or MAXCONNECTIONS too large."
/** Complete non-blocking connect()-sequence. Check access and
* terminate connection, if trouble detected.
- * @param cptr Client to which we have connected, with all Confitem structs attached.
+ * @param cptr Client to which we have connected, with all ConfItem structs attached.
* @return Zero on failure (caller should exit_client()), non-zero on success.
*/
static int completed_connection(struct Client* cptr)
*/
if ((aconf = find_conf_exact(cli_name(cptr), cptr, CONF_SERVER))) {
/*
- * Reschedule a faster reconnect, if this was a automaticly
+ * Reschedule a faster reconnect, if this was a automatically
* connected configuration entry. (Note that if we have had
* a rehash in between, the status has been changed to
* CONF_ILLEGAL). But only do this if it was a "good" link.
break;
case IO_FAILURE:
cli_error(cptr) = errno;
- /* SetFlag(cpt, FLAG_DEADSOCKET); */
+ /* SetFlag(cptr, FLAG_DEADSOCKET); */
return 0;
}
}
}
}
/*
- * If we dont know the IP# for this host and it is a hostname and
+ * If we don't know the IP# for this host and it is a hostname and
* not a ip# string, then try and find the appropriate host record.
*/
if (!irc_in_addr_valid(&aconf->address.addr)
/** Associate a specific configuration entry to a *local* client (this
* is the one which used in accepting the connection). Note, that this
- * automaticly changes the attachment if there was an old one...
+ * automatically changes the attachment if there was an old one...
* @param cptr Client to attach \a aconf to
* @param aconf ConfItem to attach
* @return Authorization check result.
* If the -t option is not given on the command line when the server is
* started, all debugging output is sent to the file set by LPATH in config.h
* Here we just open that file and make sure it is opened to fd 2 so that
- * any fprintf's to stderr also goto the logfile. If the debuglevel is not
+ * any fprintf's to stderr also go to the logfile. If the debuglevel is not
* set from the command line by -x, use /dev/null as the dummy logfile as long
- * as DEBUGMODE has been defined, else dont waste the fd.
+ * as DEBUGMODE has been defined, else don't waste the fd.
* @param use_tty Passed to log_debug_init().
*/
void debug_init(int use_tty)
/**
* Exit one client, local or remote. Assuming for local client that
- * all dependants already have been removed, and socket is closed.
+ * all dependents already have been removed, and socket is closed.
* @param bcptr Client being (s)quitted.
* @param comment The QUIT comment to send.
*/
/* exit_client, rewritten 25-9-94 by Run */
/**
- * Eexits a client of *any* type (user, server, etc)
+ * Exits a client of *any* type (user, server, etc)
* from this server. Also, this generates all necessary prototol
* messages that this exit may cause.
*
* this connection.
*
* For convenience, this function returns a suitable value for
- * m_funtion return value:
+ * m_function return value:
*
* CPTR_KILLED if (cptr == bcptr)
* 0 if (cptr != bcptr)
*
* This function can be called in two ways:
- * 1) From before or in parse(), exitting the 'cptr', in which case it was
+ * 1) From before or in parse(), exiting the 'cptr', in which case it was
* invoked as exit_client(cptr, cptr, &me,...), causing it to always
* return CPTR_KILLED.
* 2) Via parse from a m_function call, in which case it was invoked as
(acptr = findNUser(cli_serv(victim)->by))) {
if (cli_user(acptr) == cli_serv(victim)->user) {
sendcmdto_one(&me, CMD_NOTICE, acptr,
- "%C :Link with %s cancelled: %s", acptr,
+ "%C :Link with %s canceled: %s", acptr,
cli_name(victim), comment);
}
else {
}
}
if (killer == &me)
- sendto_opmask_butone(acptr, SNO_OLDSNO, "Link with %s cancelled: %s",
+ sendto_opmask_butone(acptr, SNO_OLDSNO, "Link with %s canceled: %s",
cli_name(victim), comment);
}
}
/*
* cptr can only have been killed if it was cptr itself that got killed here,
- * because cptr can never have been a dependant of victim --Run
+ * because cptr can never have been a dependent of victim --Run
*/
return (cptr == victim) ? CPTR_KILLED : 0;
}
* Called when we get a numeric message from a remote _server_ and we are
* supposed to forward it somewhere. Note that we always ignore numerics sent
* to 'me' and simply drop the message if we can't handle with this properly:
- * the savy approach is NEVER generate an error in response to an... error :)
+ * the savvy approach is NEVER generate an error in response to an... error :)
*/
/** Forwards a numeric message from a remote server.
* Pass on my client information to the new server
*
* First, pass only servers (idea is that if the link gets
- * cancelled beacause the server was already there,
- * there are no NICK's to be cancelled...). Of course,
+ * canceled because the server was already there,
+ * there are no NICK's to be canceled...). Of course,
* if cancellation occurs, all this info is sent anyway,
* and I guess the link dies when a read is attempted...? --msa
*
/** Compare a StatDesc's name against a string.
* @param[in] key Pointer to a null-terminated string.
* @param[in] sd_ Pointer to a StatDesc.
- * @return Less than,e qual to, or greater than zero if \a key is
+ * @return Less than, equal to, or greater than zero if \a key is
* lexicographically less than, equal to, or greater than \a
* sd_->sd_name.
*/
SetFlag(sptr, FLAG_TS8);
/*
- * Check to see if this user is being propogated
+ * Check to see if this user is being propagated
* as part of a net.burst, or is using protocol 9.
- * FIXME: This can be speeded up - its stupid to check it for
+ * FIXME: This can be sped up - its stupid to check it for
* every NICK message in a burst again --Run.
*/
for (acptr = user->server; acptr != &me; acptr = cli_serv(acptr)->up)
* macros actually used by the server instead DO work and have been tested
* on platforms where0 char is both signed or unsigned, this is true as long
* as the <limits.h> macros are set properly and without any need to rebuild
- * the tables (wich as said an admin should NEVER do, tables need to be rebuilt
+ * the tables (which as said an admin should NEVER do, tables need to be rebuilt
* only when one wants to really change the results or when one has to
* compile on architectures where a char is NOT eight bits [?!], yes
* it all is supposed to work in that case too... but I can't test it
- * because I've not found a machine in the world where this happes).
+ * because I've not found a machine in the world where this happens).
*
* NEVER -f[un]signed-char on gcc since that does NOT fix the named macros
* and you end up in a non-ANSI environment where CHAR_MIN and CHAR_MAX
}
int
-exit_client(struct Client *cptr, struct Client *bcptr, struct Client *sptr,
+exit_client(struct Client *cptr, struct Client *victim, struct Client *killer,
const char *comment)
{
- Debug((DEBUG_LIST, "exit_client(%p, %p, %p, \"%s\")\n", cptr, bcptr, sptr, comment));
+ Debug((DEBUG_LIST, "exit_client(%p, %p, %p, \"%s\")\n", cptr, victim, killer, comment));
return 0;
}
char *tmp = NULL;
long int n = 0;
- /* try and get around them running this time after time in quick sucession */
+ /* try and get around them running this time after time in quick succession */
sleep(1);
srandom((unsigned int)time(NULL));
return tmp;
}
-/* our implemenation of ircd_crypt_register_mech() */
+/* our implementation of ircd_crypt_register_mech() */
int ircd_crypt_register_mech(crypt_mech_t* mechanism)
{
crypt_mechs_t* crypt_mech;
- Debug((DEBUG_INFO, "ircd_crypt_register_mech: resistering mechanism: %s", mechanism->shortname));
+ Debug((DEBUG_INFO, "ircd_crypt_register_mech: registering mechanism: %s", mechanism->shortname));
/* try to allocate some memory for the new mechanism */
if ((crypt_mech = (crypt_mechs_t*)MyMalloc(sizeof(crypt_mechs_t))) == NULL)
}
/* we're done */
- Debug((DEBUG_INFO, "ircd_crypt_register_mech: resistered mechanism: %s, crypt_function is at 0x%X.", crypt_mech->mech->shortname, &crypt_mech->mech->crypt_function));
+ Debug((DEBUG_INFO, "ircd_crypt_register_mech: registered mechanism: %s, crypt_function is at 0x%X.", crypt_mech->mech->shortname, &crypt_mech->mech->crypt_function));
Debug((DEBUG_INFO, "ircd_crypt_register_mech: %s: %s", crypt_mech->mech->shortname, crypt_mech->mech->description));
return 0;
break;
case 'u':
- if(umkpasswd_conf->flags && ACT_UPDOPER)
+ if(umkpasswd_conf->flags & ACT_ADDOPER)
{
- fprintf(stderr, "-a and -u are mutually exclussive. Use either or neither.\n");
+ fprintf(stderr, "-a and -u are mutually exclusive. Use either or neither.\n");
abort(); /* b0rk b0rk b0rk */
}
break;
case 'a':
- if(umkpasswd_conf->flags && ACT_UPDOPER)
+ if(umkpasswd_conf->flags & ACT_UPDOPER)
{
- fprintf(stderr, "-a and -u are mutually exclussive. Use either or neither.\n");
+ fprintf(stderr, "-a and -u are mutually exclusive. Use either or neither.\n");
abort(); /* b0rk b0rk b0rk */
}
struct UPing* ping;
struct UPing* ping_next;
- Debug((DEBUG_DEBUG, "UPING: cancelling uping for %s", cli_name(sptr)));
+ Debug((DEBUG_DEBUG, "UPING: canceling uping for %s", cli_name(sptr)));
for (ping = pingList; ping; ping = ping_next) {
ping_next = ping->next;
if (sptr == ping->client) {
* like MODE +o <nick>, KICK #chan <nick>, KILL <nick> etc), there is no
* real important reason for a nick history anymore.
* Nevertheless, there are two reason why we might want to keep it:
- * @li The /WHOWAS command, which is often useful to catch harrassing
+ * @li The /WHOWAS command, which is often useful to catch harassing
* users or abusers in general.
* @li Clients still use the normal nicks in the client-server protocol,
* and it might be considered a nice feature that here we still have
* point to the start of the 'hash list': all entries with the same hashv.
* We'll have to search this list to find the entry with the correct <nick>.
* Once we found the correct whowas entry, we have a pointer to the
- * corresponding client - if still online - for nich chasing purposes.
+ * corresponding client - if still online - for nick chasing purposes.
* Note that the same nick can occur multiple times in the whowas history,
* each of these having the same hash value of course. While a /WHOWAS on
* just a nick will return all entries, nick chasing will only find the