summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--INSTALL12
-rw-r--r--README2
-rw-r--r--doc/reference.conf18
-rw-r--r--include/client.h20
-rw-r--r--modules/m_cap.c58
-rw-r--r--modules/m_connect.c24
-rw-r--r--modules/m_rehash.c39
-rw-r--r--modules/m_trace.c76
-rw-r--r--src/channel.c4
-rw-r--r--src/client.c48
-rw-r--r--src/modules.c4
-rw-r--r--src/parse.c96
-rw-r--r--src/s_serv.c85
-rw-r--r--src/s_user.c25
14 files changed, 281 insertions, 230 deletions
diff --git a/INSTALL b/INSTALL
index 6520395..bb5a828 100644
--- a/INSTALL
+++ b/INSTALL
@@ -24,7 +24,7 @@
As of hybrid-4, the distribution uses GNU autoconf instead of the old
Config script. You must run ./configure before you can (sanely) build
ircd-hybrid.
-
+
1. Read the NEWS file to find out about the exciting new features in
this version. Other good reads are doc/reference.conf, and README.
@@ -35,8 +35,8 @@
./configure --prefix=/usr/local/ircd
- The script will determine whichever of the following is best for
- your system, but you may (unsupported) force their usage with
+ The script will determine whichever of the following is best for
+ your system, but you may (unsupported) force their usage with
undefined results:
* --enable-kqueue - Use the superior kqueue(2) system call as
@@ -70,7 +70,7 @@
These are optional or have default values that may be overridden:
-
+
* --enable-assert - Enable use of numerous debugging checks. This
should not be used on any production servers for maximum speed
so as to prevent cores from things that shouldn't normally happen.
@@ -95,9 +95,9 @@
HOW TO GET HELP
- Send Check or Money Order to... just kidding! You're on your own for
- support. Try asking other ircd-hybrid admins on EFnet if you can't
+ support. Try asking other ircd-hybrid admins on EFnet if you can't
fix it yourself. If you do fix anything, however, please send context
- or unified diffs to bugs@ircd-hybrid.org so the fixes can be
+ or unified diffs to bugs@ircd-hybrid.org so the fixes can be
incorporated into the next release of ircd-hybrid. If hybrid crashes
on you, PLEASE contact bugs@ircd-hybrid.org ASAP with a backtrace of
the core. The Hybrid team can't fix bugs if no one tells us about them!
diff --git a/README b/README
index dde26d5..c6c1d7b 100644
--- a/README
+++ b/README
@@ -40,7 +40,7 @@ Feature Specific Requirements:
- For encrypted oper, server and auth passwords, a working DES, MD5, or
SHA library
-- For ISO 3166 alpha-2 two letter country code enabled resv{} blocks, a working
+- For ISO 3166 alpha-2 two letter country code enabled resv{} blocks, a working
libGeoIP is required
*******************************************************************************
diff --git a/doc/reference.conf b/doc/reference.conf
index 7374a29..fcb46e5 100644
--- a/doc/reference.conf
+++ b/doc/reference.conf
@@ -39,14 +39,15 @@
*/
serverinfo {
/*
- * name: the name of this server. This cannot be changed at runtime.
+ * name: the name of this server. This cannot be changed at runtime.
*/
name = "hades.arpa";
/*
- * sid: a server's unique ID. This is three characters long and must
- * be in the form [0-9][A-Z0-9][A-Z0-9]. The first character must be
+ * sid: a server's unique ID. This is three characters long and must
+ * be in the form [0-9][A-Z0-9][A-Z0-9]. The first character must be
* a digit, followed by 2 alpha-numerical letters.
+ *
* NOTE: The letters must be capitalized. This cannot be changed at runtime.
*/
sid = "0HY";
@@ -320,7 +321,7 @@ listen {
*
* Ports are separated by commas; a range may be specified using ".."
*/
-
+
/* port: listen on all available IP addresses, ports 6665 to 6669 */
port = 6665 .. 6669;
@@ -407,7 +408,7 @@ auth {
*/
redirserv = "this.is.not.a.real.server";
redirport = 6667;
-
+
user = "*.server";
/* class: a class is required even though it is not used */
@@ -850,7 +851,7 @@ channel {
*
* Either split users or split servers can activate splitmode, but
* both conditions must be met for the ircd to deactivate splitmode.
- *
+ *
* You may force splitmode to be permanent by /quote set splitmode on
*/
@@ -1164,7 +1165,7 @@ general {
/* oper_pass_resv: allow opers to over-ride RESVs on nicks/channels. */
oper_pass_resv = yes;
- /* REMOVE ME. The following line checks that you have been reading. */
+ /* REMOVE ME. The following line checks that you have been reading. */
havent_read_conf = 1;
/*
@@ -1186,8 +1187,7 @@ general {
* +G - softcallerid - Server Side Ignore for users not on your channels
* +g - callerid - Server Side Ignore (for privmsgs etc)
* +H - hidden - Hides operator status to other users
- * +i - invisible - Not shown in NAMES or WHO unless you share a
- * a channel
+ * +i - invisible - Not shown in NAMES or WHO unless you share a channel
* +j - rej - See rejected client notices
* +k - skill - See server generated KILL messages
* +l - locops - See LOCOPS messages
diff --git a/include/client.h b/include/client.h
index 3d13fba..a5ba80c 100644
--- a/include/client.h
+++ b/include/client.h
@@ -159,7 +159,7 @@
#define UMODE_REGONLY 0x00080000 /**< Only registered nicks may PM */
#define UMODE_HIDDEN 0x00100000 /**< Operator status is hidden */
#define UMODE_OPER 0x00200000 /**< Operator */
-#define UMODE_ADMIN 0x00400000 /**< Admin on server */
+#define UMODE_ADMIN 0x00400000 /**< Admin on server */
#define UMODE_FARCONNECT 0x00800000 /**< Can see remote client connects/exits */
#define UMODE_HIDDENHOST 0x01000000 /**< User's host is hidden */
#define UMODE_SSL 0x02000000 /**< User is connected via TLS/SSL */
@@ -329,13 +329,13 @@ struct LocalUser
time_t firsttime; /**< time client was created */
time_t since; /**< last time we parsed something */
time_t last_knock; /**< time of last knock */
- 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;
time_t first_received_message_time;
@@ -410,9 +410,9 @@ struct Client
if dealing with timestamps */
char id[IDLEN + 1]; /**< client ID, unique ID per client */
/*
- * 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 auth{} block. Once a client has registered,
* this field should be considered read-only.
*/
@@ -426,7 +426,7 @@ struct Client
char host[HOSTLEN + 1]; /* client's hostname */
/*
- * client->info for unix clients will normally contain the info from the
+ * client->info for unix clients will normally contain the info from the
* gcos field in /etc/passwd but anything can go here.
*/
char info[REALLEN + 1]; /* Free form additional client info */
@@ -436,7 +436,7 @@ struct Client
* string, this field should be considered read-only once the connection
* has been made. (set in s_bsd.c only)
*/
- char sockhost[HOSTIPLEN + 1]; /* This is the host name from the
+ char sockhost[HOSTIPLEN + 1]; /* This is the host name from the
socket ip address as string */
char *certfp;
};
diff --git a/modules/m_cap.c b/modules/m_cap.c
index 842c1c9..93e3698 100644
--- a/modules/m_cap.c
+++ b/modules/m_cap.c
@@ -57,13 +57,13 @@ static struct capabilities
size_t namelen;
} capab_list[] = {
#define _CAP(cap, flags, name) \
- { (cap), (flags), (name), sizeof(name) - 1 }
+ { (cap), (flags), (name), sizeof(name) - 1 }
_CAP(CAP_MULTI_PREFIX, 0, "multi-prefix"),
_CAP(CAP_AWAY_NOTIFY, 0, "away-notify")
#undef _CAP
};
-#define CAPAB_LIST_LEN (sizeof(capab_list) / sizeof(struct capabilities))
+#define CAPAB_LIST_LEN (sizeof(capab_list) / sizeof(struct capabilities))
static int
capab_sort(const struct capabilities *cap1, const struct capabilities *cap2)
@@ -76,8 +76,8 @@ capab_search(const char *key, const struct capabilities *cap)
{
const char *rb = cap->name;
- while (ToLower(*key) == ToLower(*rb)) /* walk equivalent part of strings */
- if (*key++ == '\0') /* hit the end, all right... */
+ while (ToLower(*key) == ToLower(*rb)) /* walk equivalent part of strings */
+ if (*key++ == '\0') /* hit the end, all right... */
return 0;
else /* OK, let's move on... */
rb++;
@@ -97,7 +97,7 @@ find_cap(const char **caplist_p, int *neg_p)
const char *caplist = *caplist_p;
struct capabilities *cap = NULL;
- *neg_p = 0; /* clear negative flag... */
+ *neg_p = 0; /* clear negative flag... */
if (!inited)
{
@@ -113,8 +113,8 @@ find_cap(const char **caplist_p, int *neg_p)
/* We are now at the beginning of an element of the list; is it negative? */
if (*caplist == '-')
{
- ++caplist; /* yes; step past the flag... */
- *neg_p = 1; /* remember that it is negative... */
+ ++caplist; /* yes; step past the flag... */
+ *neg_p = 1; /* remember that it is negative... */
}
/* OK, now see if we can look up the capability... */
@@ -126,13 +126,13 @@ find_cap(const char **caplist_p, int *neg_p)
{
/* Couldn't find the capability; advance to first whitespace character */
while (*caplist && !IsSpace(*caplist))
- ++caplist;
+ ++caplist;
}
else
- caplist += cap->namelen; /* advance to end of capability name */
+ caplist += cap->namelen; /* advance to end of capability name */
}
- assert(caplist != *caplist_p || !*caplist); /* we *must* advance */
+ assert(caplist != *caplist_p || !*caplist); /* we *must* advance */
/* move ahead in capability list string--or zero pointer if we hit end */
*caplist_p = *caplist ? caplist : 0;
@@ -192,13 +192,13 @@ send_caplist(struct Client *source_p, unsigned int set,
pfx[pfx_len] = '\0';
- len = capab_list[i].namelen + pfx_len; /* how much we'd add... */
+ len = capab_list[i].namelen + pfx_len; /* how much we'd add... */
if (sizeof(capbuf) < (clen + loc + len + 15))
{
/* would add too much; must flush */
sendto_one(source_p, "%s* :%s", cmdbuf, capbuf);
- capbuf[(loc = 0)] = '\0'; /* re-terminate the buffer... */
+ capbuf[(loc = 0)] = '\0'; /* re-terminate the buffer... */
}
loc += snprintf(capbuf + loc, sizeof(capbuf) - loc,
@@ -207,16 +207,16 @@ send_caplist(struct Client *source_p, unsigned int set,
sendto_one(source_p, "%s:%s", cmdbuf, capbuf);
- return 0; /* convenience return */
+ return 0; /* convenience return */
}
static int
cap_ls(struct Client *source_p, const char *caplist)
{
- if (IsUnknown(source_p)) /* registration hasn't completed; suspend it... */
+ if (IsUnknown(source_p)) /* registration hasn't completed; suspend it... */
source_p->localClient->registration |= REG_NEED_CAP;
- return send_caplist(source_p, 0, 0, "LS"); /* send list of capabilities */
+ return send_caplist(source_p, 0, 0, "LS"); /* send list of capabilities */
}
static int
@@ -229,16 +229,16 @@ cap_req(struct Client *source_p, const char *caplist)
unsigned int as = source_p->localClient->cap_active; /* active set */
int neg = 0;
- if (IsUnknown(source_p)) /* registration hasn't completed; suspend it... */
+ if (IsUnknown(source_p)) /* registration hasn't completed; suspend it... */
source_p->localClient->registration |= REG_NEED_CAP;
- while (cl) { /* walk through the capabilities list... */
+ while (cl) { /* walk through the capabilities list... */
if (!(cap = find_cap(&cl, &neg)) /* look up capability... */
- || (!neg && (cap->flags & CAPFL_PROHIBIT)) /* is it prohibited? */
- || (neg && (cap->flags & CAPFL_STICKY))) { /* is it sticky? */
+ || (!neg && (cap->flags & CAPFL_PROHIBIT)) /* is it prohibited? */
+ || (neg && (cap->flags & CAPFL_STICKY))) { /* is it sticky? */
sendto_one(source_p, ":%s CAP %s NAK :%s", me.name,
source_p->name[0] ? source_p->name : "*", caplist);
- return 0; /* can't complete requested op... */
+ return 0; /* can't complete requested op... */
}
if (neg)
@@ -286,12 +286,12 @@ cap_ack(struct Client *source_p, const char *caplist)
while (cl)
{
/* walk through the capabilities list... */
- if (!(cap = find_cap(&cl, &neg)) || /* look up capability... */
- (neg ? (source_p->localClient->cap_active & cap->cap) :
- !(source_p->localClient->cap_active & cap->cap))) /* uh... */
+ if (!(cap = find_cap(&cl, &neg)) || /* look up capability... */
+ (neg ? (source_p->localClient->cap_active & cap->cap) :
+ !(source_p->localClient->cap_active & cap->cap))) /* uh... */
continue;
- if (neg) /* set or clear the active capability... */
+ if (neg) /* set or clear the active capability... */
source_p->localClient->cap_active &= ~cap->cap;
else
source_p->localClient->cap_active |= cap->cap;
@@ -328,8 +328,8 @@ cap_clear(struct Client *source_p, const char *caplist)
static int
cap_end(struct Client *source_p, const char *caplist)
{
- if (!IsUnknown(source_p)) /* registration has completed... */
- return 0; /* so just ignore the message... */
+ if (!IsUnknown(source_p)) /* registration has completed... */
+ return 0; /* so just ignore the message... */
/* capability negotiation is now done... */
source_p->localClient->registration &= ~REG_NEED_CAP;
@@ -341,7 +341,7 @@ cap_end(struct Client *source_p, const char *caplist)
return 0;
}
- return 0; /* Can't do registration yet... */
+ return 0; /* Can't do registration yet... */
}
static int
@@ -383,12 +383,12 @@ m_cap(struct Client *client_p, struct Client *source_p, int parc, char *parv[])
const char *subcmd = NULL, *caplist = NULL;
struct subcmd *cmd = NULL;
- if (EmptyString(parv[1])) /* a subcommand is required */
+ if (EmptyString(parv[1])) /* a subcommand is required */
return;
subcmd = parv[1];
- if (parc > 2) /* a capability list was provided */
+ if (parc > 2) /* a capability list was provided */
caplist = parv[2];
/* find the subcommand handler */
diff --git a/modules/m_connect.c b/modules/m_connect.c
index 775fb50..4f38fa7 100644
--- a/modules/m_connect.c
+++ b/modules/m_connect.c
@@ -88,7 +88,7 @@ mo_connect(struct Client *client_p, struct Client *source_p,
if ((target_p = hash_find_server(parv[1])))
{
sendto_one(source_p,
- ":%s NOTICE %s :Connect: Server %s already exists from %s.",
+ ":%s NOTICE %s :Connect: Server %s already exists from %s.",
me.name, source_p->name, parv[1], target_p->from->name);
return;
}
@@ -107,7 +107,8 @@ mo_connect(struct Client *client_p, struct Client *source_p,
}
}
- /* Get port number from user, if given. If not specified,
+ /*
+ * Get port number from user, if given. If not specified,
* use the default form configuration structure. If missing
* from there, then use the precompiled default.
*/
@@ -144,7 +145,8 @@ mo_connect(struct Client *client_p, struct Client *source_p,
conf->port = port;
- /* at this point we should be calling connect_server with a valid
+ /*
+ * at this point we should be calling connect_server with a valid
* C:line and a valid port in the C:line
*/
if (serv_connect(conf, source_p))
@@ -163,7 +165,8 @@ mo_connect(struct Client *client_p, struct Client *source_p,
me.name, source_p->name, conf->name, conf->port);
}
- /* client is either connecting with all the data it needs or has been
+ /*
+ * Client is either connecting with all the data it needs or has been
* destroyed
*/
conf->port = tmpport;
@@ -189,8 +192,8 @@ ms_connect(struct Client *client_p, struct Client *source_p,
struct MaskItem *conf = NULL;
const struct Client *target_p = NULL;
- if (hunt_server(client_p, source_p,
- ":%s CONNECT %s %s :%s", 3, parc, parv) != HUNTED_ISME)
+ if (hunt_server(client_p, source_p, ":%s CONNECT %s %s :%s",
+ 3, parc, parv) != HUNTED_ISME)
return;
if (EmptyString(parv[1]))
@@ -203,7 +206,7 @@ ms_connect(struct Client *client_p, struct Client *source_p,
if ((target_p = hash_find_server(parv[1])))
{
sendto_one(source_p,
- ":%s NOTICE %s :Connect: Server %s already exists from %s.",
+ ":%s NOTICE %s :Connect: Server %s already exists from %s.",
me.name, source_p->name, parv[1], target_p->from->name);
return;
}
@@ -222,7 +225,8 @@ ms_connect(struct Client *client_p, struct Client *source_p,
}
}
- /* Get port number from user, if given. If not specified,
+ /*
+ * Get port number from user, if given. If not specified,
* use the default form configuration structure. If missing
* from there, then use the precompiled default.
*/
@@ -232,7 +236,9 @@ ms_connect(struct Client *client_p, struct Client *source_p,
{
port = atoi(parv[2]);
- /* if someone sends port 0, and we have a config port.. use it */
+ /*
+ * if someone sends port 0, and we have a config port.. use it
+ */
if (port == 0 && conf->port)
port = conf->port;
else if (port <= 0)
diff --git a/modules/m_rehash.c b/modules/m_rehash.c
index d039def..60da725 100644
--- a/modules/m_rehash.c
+++ b/modules/m_rehash.c
@@ -37,6 +37,19 @@
#include "motd.h"
+struct RehashStruct
+{
+ const char *name;
+ void (*handler)();
+};
+
+static const struct RehashStruct rehash_cmd_table[] =
+{
+ { "MOTD", rehash_motd },
+ { "DNS", rehash_dns },
+ { NULL, NULL }
+};
+
/*
* mo_rehash - REHASH message handler
*
@@ -45,6 +58,7 @@ static void
mo_rehash(struct Client *client_p, struct Client *source_p,
int parc, char *parv[])
{
+ const struct RehashStruct *tab = rehash_cmd_table;
int found = 0;
if (!HasOFlag(source_p, OPER_FLAG_REHASH))
@@ -54,7 +68,30 @@ mo_rehash(struct Client *client_p, struct Client *source_p,
return;
}
- if (!EmptyString(parv[1]))
+ if (EmptyString(parv[1]))
+ {
+ sendto_one(source_p, form_str(RPL_REHASHING),
+ me.name, source_p->name, ConfigFileEntry.configfile);
+ sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
+ "%s is rehashing server config file",
+ get_oper_name(source_p));
+ ilog(LOG_TYPE_IRCD, "REHASH From %s", get_oper_name(source_p));
+ rehash(0);
+ return;
+ }
+
+ for (; tab->handler; ++tab)
+ {
+ if (!irccmp(tab->name, parv[1]))
+ {
+
+
+
+
+
+
+
+
{
if (irccmp(parv[1], "DNS") == 0)
{
diff --git a/modules/m_trace.c b/modules/m_trace.c
index 160b6ac..4b86162 100644
--- a/modules/m_trace.c
+++ b/modules/m_trace.c
@@ -206,7 +206,7 @@ do_actual_trace(struct Client *source_p, int parc, char *parv[])
{
const char *name;
target_p = hash_find_client(tname);
-
+
if (target_p && IsClient(target_p))
{
name = get_client_name(target_p, HIDE_IP);
@@ -214,7 +214,7 @@ do_actual_trace(struct Client *source_p, int parc, char *parv[])
if (HasUMode(target_p, UMODE_OPER))
{
sendto_one(source_p, form_str(RPL_TRACEOPERATOR),
- from, to, get_client_class(&target_p->localClient->confs), name,
+ from, to, get_client_class(&target_p->localClient->confs), name,
IsIPSpoof(target_p) ? "255.255.255.255" : target_p->sockhost,
CurrentTime - target_p->localClient->lasttime,
idle_time_get(source_p, target_p));
@@ -223,12 +223,12 @@ do_actual_trace(struct Client *source_p, int parc, char *parv[])
{
sendto_one(source_p,form_str(RPL_TRACEUSER),
from, to, get_client_class(&target_p->localClient->confs), name,
- IsIPSpoof(target_p) ? "255.255.255.255" : target_p->sockhost,
+ IsIPSpoof(target_p) ? "255.255.255.255" : target_p->sockhost,
CurrentTime - target_p->localClient->lasttime,
idle_time_get(source_p, target_p));
}
}
-
+
sendto_one(source_p, form_str(RPL_ENDOFTRACE),
from, to, tname);
return;
@@ -240,8 +240,8 @@ do_actual_trace(struct Client *source_p, int parc, char *parv[])
target_p = ptr->data;
if (HasUMode(target_p, UMODE_INVISIBLE) && dow &&
- !(MyConnect(source_p) && HasUMode(source_p, UMODE_OPER)) &&
- !HasUMode(target_p, UMODE_OPER) && (target_p != source_p))
+ !(MyConnect(source_p) && HasUMode(source_p, UMODE_OPER)) &&
+ !HasUMode(target_p, UMODE_OPER) && (target_p != source_p))
continue;
if (!doall && wilds && match(tname, target_p->name))
continue;
@@ -322,12 +322,12 @@ report_this_status(struct Client *source_p, struct Client *target_p, int dow)
{
case STAT_CONNECTING:
sendto_one(source_p, form_str(RPL_TRACECONNECTING),
- from, to, class_name,
- HasUMode(source_p, UMODE_ADMIN) ? name : target_p->name);
+ from, to, class_name,
+ HasUMode(source_p, UMODE_ADMIN) ? name : target_p->name);
break;
case STAT_HANDSHAKE:
sendto_one(source_p, form_str(RPL_TRACEHANDSHAKE),
- from, to, class_name,
+ from, to, class_name,
HasUMode(source_p, UMODE_ADMIN) ? name : target_p->name);
break;
case STAT_ME:
@@ -335,8 +335,8 @@ report_this_status(struct Client *source_p, struct Client *target_p, int dow)
case STAT_UNKNOWN:
/* added time -Taner */
sendto_one(source_p, form_str(RPL_TRACEUNKNOWN),
- from, to, class_name, name, target_p->sockhost,
- target_p->localClient->firsttime ? /* TBD: can't be 0 */
+ from, to, class_name, name, target_p->sockhost,
+ target_p->localClient->firsttime ? /* TBD: can't be 0 */
CurrentTime - target_p->localClient->firsttime : -1);
break;
case STAT_CLIENT:
@@ -345,49 +345,49 @@ report_this_status(struct Client *source_p, struct Client *target_p, int dow)
* but anyone can see all the opers.
*/
if ((HasUMode(source_p, UMODE_OPER) &&
- (MyClient(source_p) || !(dow && HasUMode(target_p, UMODE_INVISIBLE))))
- || !dow || HasUMode(target_p, UMODE_OPER))
- {
+ (MyClient(source_p) || !(dow && HasUMode(target_p, UMODE_INVISIBLE))))
+ || !dow || HasUMode(target_p, UMODE_OPER))
+ {
if (HasUMode(target_p, UMODE_ADMIN) && !ConfigFileEntry.hide_spoof_ips)
- sendto_one(source_p, form_str(RPL_TRACEOPERATOR),
+ sendto_one(source_p, form_str(RPL_TRACEOPERATOR),
from, to, class_name, name,
HasUMode(source_p, UMODE_ADMIN) ? target_p->sockhost : "255.255.255.255",
CurrentTime - target_p->localClient->lasttime,
idle_time_get(source_p, target_p));
-
- else if (HasUMode(target_p, UMODE_OPER))
+
+ else if (HasUMode(target_p, UMODE_OPER))
{
- if (ConfigFileEntry.hide_spoof_ips)
- sendto_one(source_p, form_str(RPL_TRACEOPERATOR),
- from, to, class_name, name,
- IsIPSpoof(target_p) ? "255.255.255.255" : target_p->sockhost,
- CurrentTime - target_p->localClient->lasttime,
- idle_time_get(source_p, target_p));
- else
+ if (ConfigFileEntry.hide_spoof_ips)
+ sendto_one(source_p, form_str(RPL_TRACEOPERATOR),
+ from, to, class_name, name,
+ IsIPSpoof(target_p) ? "255.255.255.255" : target_p->sockhost,
+ CurrentTime - target_p->localClient->lasttime,
+ idle_time_get(source_p, target_p));
+ else
sendto_one(source_p, form_str(RPL_TRACEOPERATOR),
from, to, class_name, name,
MyOper(source_p) ? target_p->sockhost :
(IsIPSpoof(target_p) ? "255.255.255.255" : target_p->sockhost),
CurrentTime - target_p->localClient->lasttime,
idle_time_get(source_p, target_p));
- }
- else
+ }
+ else
{
if (ConfigFileEntry.hide_spoof_ips)
- sendto_one(source_p, form_str(RPL_TRACEUSER),
- from, to, class_name, name,
+ sendto_one(source_p, form_str(RPL_TRACEUSER),
+ from, to, class_name, name,
IsIPSpoof(target_p) ? "255.255.255.255" : target_p->sockhost,
- CurrentTime - target_p->localClient->lasttime,
- idle_time_get(source_p, target_p));
- else
+ CurrentTime - target_p->localClient->lasttime,
+ idle_time_get(source_p, target_p));
+ else
sendto_one(source_p, form_str(RPL_TRACEUSER),
from, to, class_name, name,
MyOper(source_p) ? target_p->sockhost :
(IsIPSpoof(target_p) ? "255.255.255.255" : target_p->sockhost),
CurrentTime - target_p->localClient->lasttime,
idle_time_get(source_p, target_p));
- }
- }
+ }
+ }
break;
case STAT_SERVER:
{
@@ -400,14 +400,14 @@ report_this_status(struct Client *source_p, struct Client *target_p, int dow)
name = get_client_name(target_p, MASK_IP);
sendto_one(source_p, form_str(RPL_TRACESERVER),
- from, to, class_name, servers,
- clients, name, *(target_p->serv->by) ?
- target_p->serv->by : "*", "*",
- me.name, CurrentTime - target_p->localClient->lasttime);
+ from, to, class_name, servers,
+ clients, name, *(target_p->serv->by) ?
+ target_p->serv->by : "*", "*",
+ me.name, CurrentTime - target_p->localClient->lasttime);
break;
}
- default: /* ...we actually shouldn't come here... --msa */
+ default: /* ...we actually shouldn't come here... --msa */
sendto_one(source_p, form_str(RPL_TRACENEWTYPE),
from, to, name);
break;
diff --git a/src/channel.c b/src/channel.c
index 51ce706..8fc16a5 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -633,7 +633,7 @@ is_banned(const struct Channel *chptr, const struct Client *who)
/*!
* \param source_p pointer to client attempting to join
- * \param chptr pointer to channel
+ * \param chptr pointer to channel
* \param key key sent by client attempting to join if present
* \return ERR_BANNEDFROMCHAN, ERR_INVITEONLYCHAN, ERR_CHANNELISFULL
* or 0 if allowed to join.
@@ -890,5 +890,5 @@ set_channel_topic(struct Channel *chptr, const char *topic,
strlcpy(chptr->topic, topic, sizeof(chptr->topic));
strlcpy(chptr->topic_info, topic_info, sizeof(chptr->topic_info));
- chptr->topic_time = topicts;
+ chptr->topic_time = topicts;
}
diff --git a/src/client.c b/src/client.c
index 7e63c03..2fc453d 100644
--- a/src/client.c
+++ b/src/client.c
@@ -170,7 +170,7 @@ free_client(struct Client *client_p)
{
assert(client_p->localClient->invited.head == NULL);
assert(dlink_list_length(&client_p->localClient->invited) == 0);
- assert(dlink_list_length(&client_p->localClient->watches) == 0);
+ assert(dlink_list_length(&client_p->localClient->watches) == 0);
assert(IsClosing(client_p) && IsDead(client_p));
MyFree(client_p->localClient->response);
@@ -183,7 +183,7 @@ free_client(struct Client *client_p)
{
assert(0 < client_p->localClient->listener->ref_count);
if (0 == --client_p->localClient->listener->ref_count &&
- !client_p->localClient->listener->active)
+ !client_p->localClient->listener->active)
free_listener(client_p->localClient->listener);
}
@@ -202,7 +202,7 @@ free_client(struct Client *client_p)
*
* inputs - NOT USED (from event)
* output - next time_t when check_pings() should be called again
- * side effects -
+ * side effects -
*
*
* A PING can be sent to clients as necessary.
@@ -224,7 +224,7 @@ free_client(struct Client *client_p)
static void
check_pings(void *notused)
-{
+{
check_pings_list(&local_client_list);
check_pings_list(&serv_list);
check_unknowns_list();
@@ -234,7 +234,7 @@ check_pings(void *notused)
*
* inputs - pointer to list to check
* output - NONE
- * side effects -
+ * side effects -
*/
static void
check_pings_list(dlink_list *list)
@@ -254,7 +254,7 @@ check_pings_list(dlink_list *list)
if (IsDead(client_p))
{
/* Ignore it, its been exited already */
- continue;
+ continue;
}
if (!IsRegistered(client_p))
@@ -335,9 +335,9 @@ check_unknowns_list(void)
* side effects - Check all connections for a pending kline against the
* client, exit the client if a kline matches.
*/
-void
+void
check_conf_klines(void)
-{
+{
struct Client *client_p = NULL; /* current local client_p being examined */
struct MaskItem *conf = NULL;
dlink_node *ptr, *next_ptr;
@@ -373,11 +373,11 @@ check_conf_klines(void)
}
ban_them(client_p, conf);
- /* and go examine next fd/client_p */
+ /* and go examine next fd/client_p */
continue;
- }
+ }
- if ((conf = find_kill(client_p)) != NULL)
+ if ((conf = find_kill(client_p)) != NULL)
{
if (IsExemptKline(client_p))
{
@@ -388,7 +388,7 @@ check_conf_klines(void)
}
ban_them(client_p, conf);
- continue;
+ continue;
}
if ((conf = find_matching_name_conf(CONF_XLINE, client_p->info,
@@ -469,7 +469,7 @@ ban_them(struct Client *client_p, struct MaskItem *conf)
*
* input - pointer to client
* output - NONE
- * side effects -
+ * side effects -
*/
static void
update_client_exit_stats(struct Client *client_p)
@@ -520,8 +520,8 @@ find_person(const struct Client *client_p, const char *name)
}
/*
- * find_chasing - find the client structure for a nick name (user)
- * using history mechanism if necessary. If the client is not found,
+ * find_chasing - find the client structure for a nick name (user)
+ * using history mechanism if necessary. If the client is not found,
* an error message (NO SUCH NICK) is generated. If the client was found
* through the history, chasing will be 1 and otherwise 0.
*/
@@ -579,7 +579,7 @@ get_client_name(const struct Client *client, enum addr_mask_type type)
assert(client != NULL);
- if (!MyConnect(client))
+ if (!MyConnect(client))
return client->name;
if (IsServer(client) || IsConnecting(client) || IsHandshake(client))
@@ -623,7 +623,7 @@ void
free_exited_clients(void)
{
dlink_node *ptr = NULL, *next = NULL;
-
+
DLINK_FOREACH_SAFE(ptr, next, dead_list.head)
{
free_client(ptr->data);
@@ -752,10 +752,10 @@ recurse_send_quits(struct Client *original_source_p, struct Client *source_p,
}
}
-/*
+/*
* Remove all clients that depend on source_p; assumes all (S)QUITs have
- * already been sent. we make sure to exit a server's dependent clients
- * and servers before the server itself; exit_one_client takes care of
+ * already been sent. we make sure to exit a server's dependent clients
+ * and servers before the server itself; exit_one_client takes care of
* actually removing things off llists. tweaked from +CSr31 -orabidoo
*/
static void
@@ -922,7 +922,7 @@ exit_client(struct Client *source_p, struct Client *from, const char *comment)
if (ConfigServerHide.hide_servers)
/*
- * Set netsplit message to "*.net *.split" to still show
+ * Set netsplit message to "*.net *.split" to still show
* that its a split, but hide the servers splitting
*/
strcpy(splitstr, "*.net *.split");
@@ -940,7 +940,7 @@ exit_client(struct Client *source_p, struct Client *from, const char *comment)
source_p->localClient->send.bytes >> 10,
source_p->localClient->recv.bytes >> 10);
ilog(LOG_TYPE_IRCD, "%s was connected for %d seconds. %llu/%llu sendK/recvK.",
- source_p->name, (int)(CurrentTime - source_p->localClient->firsttime),
+ source_p->name, (int)(CurrentTime - source_p->localClient->firsttime),
source_p->localClient->send.bytes >> 10,
source_p->localClient->recv.bytes >> 10);
}
@@ -1009,7 +1009,7 @@ dead_link_on_read(struct Client *client_p, int error)
if (IsServer(client_p) || IsHandshake(client_p))
{
int connected = CurrentTime - client_p->localClient->firsttime;
-
+
if (error == 0)
{
/* Admins get the real IP */
@@ -1079,7 +1079,7 @@ exit_aborted_clients(void)
else
notice = "Write error: connection closed";
- exit_client(target_p, &me, notice);
+ exit_client(target_p, &me, notice);
free_dlink_node(ptr);
}
}
diff --git a/src/modules.c b/src/modules.c
index e8dc695..8c90b5f 100644
--- a/src/modules.c
+++ b/src/modules.c
@@ -370,7 +370,7 @@ load_core_modules(int warn)
*
* input - pointer to path
* - flagged as core module or not
- * output - -1 if error
+ * output - -1 if error
* side effects - module is loaded if found.
*/
int
@@ -390,7 +390,7 @@ load_one_module(const char *path)
continue;
if (strstr(modpath, "../") == NULL &&
- strstr(modpath, "/..") == NULL)
+ strstr(modpath, "/..") == NULL)
if (!stat(modpath, &statbuf))
if (S_ISREG(statbuf.st_mode)) /* Regular files only please */
return load_a_module(modpath, 1);
diff --git a/src/parse.c b/src/parse.c
index e4f9405..547fe0e 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -54,7 +54,7 @@
* 'i' -> [MessageTree *] -> 'e' and matches
*
* BUGS (Limitations!)
- *
+ *
* I designed this trie to parse ircd commands. Hence it currently
* casefolds. This is trivial to fix by increasing MAXPTRLEN.
* This trie also "folds" '{' etc. down. This means, the input to this
@@ -64,7 +64,7 @@
* MAXPTRLEN 128.
*
* This is also not a patricia trie. On short ircd tokens, this is
- * not likely going to matter.
+ * not likely going to matter.
*
* Diane Bruce (Dianora), June 6 2003
*/
@@ -88,7 +88,7 @@
struct MessageTree
{
- int links; /* Count of all pointers (including msg) at this node
+ int links; /* Count of all pointers (including msg) at this node
* used as reference count for deletion of _this_ node.
*/
struct Message *msg;
@@ -131,8 +131,8 @@ parse(struct Client *client_p, char *pbuffer, char *bufend)
assert(client_p->localClient->fd.flags.open);
assert((bufend - pbuffer) < 512);
- for (ch = pbuffer; *ch == ' '; ++ch) /* skip spaces */
- /* null statement */ ;
+ for (ch = pbuffer; *ch == ' '; ++ch) /* skip spaces */
+ /* null statement */ ;
if (*ch == ':')
{
@@ -153,11 +153,10 @@ parse(struct Client *client_p, char *pbuffer, char *bufend)
if ((from = find_person(client_p, sender)) == NULL)
from = hash_find_server(sender);
- /* Hmm! If the client corresponding to the
- * prefix is not found--what is the correct
- * action??? Now, I will ignore the message
- * (old IRC just let it through as if the
- * prefix just wasn't there...) --msa
+ /*
+ * Hmm! If the client corresponding to the prefix is not found--what is
+ * the correct action??? Now, I will ignore the message (old IRC just
+ * let it through as if the prefix just wasn't there...) --msa
*/
if (from == NULL)
{
@@ -184,9 +183,10 @@ parse(struct Client *client_p, char *pbuffer, char *bufend)
return;
}
- /* Extract the command code from the packet. Point s to the end
+ /*
+ * Extract the command code from the packet. Point s to the end
* of the command code and calculate the length using pointer
- * arithmetic. Note: only need length for numerics and *all*
+ * arithmetic. Note: only need length for numerics and *all*
* numerics must have parameters and thus a space after the command
* code. -avalon
*/
@@ -196,13 +196,13 @@ parse(struct Client *client_p, char *pbuffer, char *bufend)
IsDigit(*ch) && IsDigit(*(ch + 1)) && IsDigit(*(ch + 2)))
{
numeric = ch;
- paramcount = 2; /* destination, and the rest of it */
+ paramcount = 2; /* destination, and the rest of it */
++ServerStats.is_num;
s = ch + 3; /* I know this is ' ' from above if */
- *s++ = '\0'; /* blow away the ' ', and point s to next part */
+ *s++ = '\0'; /* blow away the ' ', and point s to next part */
}
else
- {
+ {
unsigned int ii = 0;
if ((s = strchr(ch, ' ')) != NULL)
@@ -210,7 +210,8 @@ parse(struct Client *client_p, char *pbuffer, char *bufend)
if ((msg_ptr = find_command(ch)) == NULL)
{
- /* Note: Give error message *only* to recognized
+ /*
+ * Note: Give error message *only* to recognized
* persons. It's a nightmare situation to have
* two programs sending "Unknown command"'s or
* equivalent to each other at full blast....
@@ -265,7 +266,7 @@ parse(struct Client *client_p, char *pbuffer, char *bufend)
if (*s == ':')
{
/* The rest is a single parameter */
- para[++parc] = s + (!numeric); /* keep the colon if it's a numeric */
+ para[++parc] = s + (!numeric); /* keep the colon if it's a numeric */
break;
}
@@ -367,12 +368,12 @@ add_msg_element(struct MessageTree *mtree_p, struct Message *msg_p,
}
else
{
- /* *cmd & (MAXPTRLEN-1)
+ /*
+ * *cmd & (MAXPTRLEN-1)
* convert the char pointed to at *cmd from ASCII to an integer
* between 0 and MAXPTRLEN.
* Thus 'A' -> 0x1 'B' -> 0x2 'c' -> 0x3 etc.
*/
-
if ((ntree_p = mtree_p->pointers[*cmd & (MAXPTRLEN - 1)]) == NULL)
{
ntree_p = MyMalloc(sizeof(struct MessageTree));
@@ -541,21 +542,23 @@ report_messages(struct Client *source_p)
/* cancel_clients()
*
- * inputs -
- * output -
- * side effects -
+ * inputs -
+ * output -
+ * side effects -
*/
static int
cancel_clients(struct Client *client_p, struct Client *source_p, char *cmd)
{
- /* kill all possible points that are causing confusion here,
+ /*
+ * Kill all possible points that are causing confusion here,
* I'm not sure I've got this all right...
* - avalon
*
- * knowing avalon, probably not.
+ * Knowing avalon, probably not.
*/
- /* with TS, fake prefixes are a common thing, during the
+ /*
+ * With TS, fake prefixes are a common thing, during the
* connect burst when there's a nick collision, and they
* must be ignored rather than killed because one of the
* two is surviving.. so we don't bother sending them to
@@ -564,7 +567,8 @@ cancel_clients(struct Client *client_p, struct Client *source_p, char *cmd)
* servers to be dropped though, as well as the ones from
* non-TS servers -orabidoo
*/
- /* Incorrect prefix for a server from some connection. If it is a
+ /*
+ * Incorrect prefix for a server from some connection. If it is a
* client trying to be annoying, just QUIT them, if it is a server
* then the same deal.
*/
@@ -585,11 +589,13 @@ cancel_clients(struct Client *client_p, struct Client *source_p, char *cmd)
/* return exit_client(client_p, client_p, &me, "Fake Direction");*/
}
- /* Ok, someone is trying to impose as a client and things are
- * confused. If we got the wrong prefix from a server, send out a
+ /*
+ * Ok, someone is trying to impose as a client and things are
+ * confused. If we got the wrong prefix from a server, send out a
* kill, else just exit the lame client.
*/
- /* If the fake prefix is coming from a TS server, discard it
+ /*
+ * If the fake prefix is coming from a TS server, discard it
* silently -orabidoo
*
* all servers must be TS these days --is
@@ -608,18 +614,20 @@ cancel_clients(struct Client *client_p, struct Client *source_p, char *cmd)
/* remove_unknown()
*
- * inputs -
- * output -
- * side effects -
+ * inputs -
+ * output -
+ * side effects -
*/
static void
remove_unknown(struct Client *client_p, char *lsender, char *lbuffer)
{
- /* Do kill if it came from a server because it means there is a ghost
+ /*
+ * Do kill if it came from a server because it means there is a ghost
* user on the other server which needs to be removed. -avalon
* Tell opers about this. -Taner
*/
- /* '[0-9]something' is an ID (KILL/SQUIT depending on its length)
+ /*
+ * '[0-9]something' is an ID (KILL/SQUIT depending on its length)
* 'nodots' is a nickname (KILL)
* 'no.dot.at.start' is a server (SQUIT)
*/
@@ -668,16 +676,18 @@ handle_numeric(char numeric[], struct Client *client_p, struct Client *source_p,
struct Client *target_p = NULL;
struct Channel *chptr = NULL;
- /* Avoid trash, we need it to come from a server and have a target */
+ /*
+ * Avoid trash, we need it to come from a server and have a target
+ */
if (parc < 2 || !IsServer(source_p))
return;
/*
* Who should receive this message ? Will we do something with it ?
- * Note that we use findUser functions, so the target can't be neither
- * a server, nor a channel (?) nor a list of targets (?) .. u2.10
- * should never generate numeric replies to non-users anyway
- * Ahem... it can be a channel actually, csc bots use it :\ --Nem
+ * Note that we use findUser functions, so the target can't be neither
+ * a server, nor a channel (?) nor a list of targets (?) .. u2.10
+ * should never generate numeric replies to non-users anyway
+ * Ahem... it can be a channel actually, csc bots use it :\ --Nem
*/
if (IsChanPrefix(*parv[1]))
chptr = hash_find_channel(parv[1]);
@@ -691,10 +701,10 @@ handle_numeric(char numeric[], struct Client *client_p, struct Client *source_p,
* Remap low number numerics, not that I understand WHY.. --Nemesi
*/
/*
- * numerics below 100 talk about the current 'connection', you're not
+ * Numerics below 100 talk about the current 'connection', you're not
* connected to a remote server so it doesn't make sense to send them
* remotely - but the information they contain may be useful, so we
- * remap them up. Weird, but true. -- Isomer
+ * remap them up. Weird, but true. -- Isomer
*/
if (numeric[0] == '0')
numeric[0] = '1';
@@ -715,7 +725,7 @@ handle_numeric(char numeric[], struct Client *client_p, struct Client *source_p,
}
/* m_not_oper()
- * inputs -
+ * inputs -
* output -
* side effects - just returns a nastyogram to given user
*/
@@ -739,7 +749,7 @@ void
m_registered(struct Client *client_p, struct Client *source_p,
int parc, char *parv[])
{
- sendto_one(source_p, form_str(ERR_ALREADYREGISTRED),
+ sendto_one(source_p, form_str(ERR_ALREADYREGISTRED),
me.name, source_p->name);
}
diff --git a/src/s_serv.c b/src/s_serv.c
index 49f2ff6..3b622a6 100644
--- a/src/s_serv.c
+++ b/src/s_serv.c
@@ -254,7 +254,7 @@ hunt_server(struct Client *client_p, struct Client *source_p, const char *comman
parv[1], parv[2], parv[3], parv[4],
parv[5], parv[6], parv[7], parv[8]);
return HUNTED_PASS;
- }
+ }
sendto_one(source_p, form_str(ERR_NOSUCHSERVER),
me.name, source_p->name, parv[server]);
@@ -288,7 +288,7 @@ try_connections(void *unused)
assert(conf->type == CONF_SERVER);
- /* Also when already connecting! (update holdtimes) --SRB
+ /* Also when already connecting! (update holdtimes) --SRB
*/
if (!conf->port ||!IsConfAllowAutoConn(conf))
continue;
@@ -399,7 +399,7 @@ check_server(const char *name, struct Client *client_p)
/* XXX: Fix me for IPv6 */
/* XXX sockhost is the IPv4 ip as a string */
- if (!match(conf->host, client_p->host) ||
+ if (!match(conf->host, client_p->host) ||
!match(conf->host, client_p->sockhost))
{
error = -2;
@@ -430,7 +430,7 @@ check_server(const char *name, struct Client *client_p)
switch (server_conf->aftype)
{
#ifdef IPV6
- case AF_INET6:
+ case AF_INET6:
v6 = (struct sockaddr_in6 *)&server_conf->addr;
if (IN6_IS_ADDR_UNSPECIFIED(&v6->sin6_addr))
@@ -441,7 +441,7 @@ check_server(const char *name, struct Client *client_p)
v4 = (struct sockaddr_in *)&server_conf->addr;
if (v4->sin_addr.s_addr == INADDR_NONE)
- memcpy(&server_conf->addr, &client_p->localClient->ip, sizeof(struct irc_ssaddr));
+ memcpy(&server_conf->addr, &client_p->localClient->ip, sizeof(struct irc_ssaddr));
break;
}
}
@@ -561,7 +561,7 @@ send_capabilities(struct Client *client_p, int cap_can_send)
}
/* sendnick_TS()
- *
+ *
* inputs - client (server) to send nick towards
* - client to send nick for
* output - NONE
@@ -721,7 +721,7 @@ server_estab(struct Client *client_p)
/* If there is something in the serv_list, it might be this
* connecting server..
*/
- if (!ServerInfo.hub && serv_list.head)
+ if (!ServerInfo.hub && serv_list.head)
{
if (client_p != serv_list.head->data || serv_list.head->next)
{
@@ -854,29 +854,30 @@ server_estab(struct Client *client_p)
IsHidden(client_p) ? "(H) " : "",
client_p->info);
else
- sendto_one(target_p,":%s SERVER %s 2 :%s%s",
+ sendto_one(target_p,":%s SERVER %s 2 :%s%s",
me.name, client_p->name,
IsHidden(client_p) ? "(H) " : "",
client_p->info);
}
- /* 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,
- ** if cancellation occurs, all this info is sent anyway,
- ** and I guess the link dies when a read is attempted...? --msa
- **
- ** Note: Link cancellation to occur at this point means
- ** that at least two servers from my fragment are building
- ** up connection this other fragment at the same time, it's
- ** a race condition, not the normal way of operation...
- **
- ** ALSO NOTE: using the get_client_name for server names--
- ** see previous *WARNING*!!! (Also, original inpath
- ** is destroyed...)
- */
+ /*
+ * 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,
+ * if cancellation occurs, all this info is sent anyway,
+ * and I guess the link dies when a read is attempted...? --msa
+ *
+ * Note: Link cancellation to occur at this point means
+ * that at least two servers from my fragment are building
+ * up connection this other fragment at the same time, it's
+ * a race condition, not the normal way of operation...
+ *
+ * ALSO NOTE: using the get_client_name for server names--
+ * see previous *WARNING*!!! (Also, original inpath
+ * is destroyed...)
+ */
DLINK_FOREACH_PREV(ptr, global_serv_list.tail)
{
@@ -899,7 +900,7 @@ server_estab(struct Client *client_p)
IsHidden(target_p) ? "(H) " : "", target_p->info);
}
else
- sendto_one(client_p, ":%s SERVER %s %d :%s%s",
+ sendto_one(client_p, ":%s SERVER %s %d :%s%s",
target_p->servptr->name, target_p->name, target_p->hopcount+1,
IsHidden(target_p) ? "(H) " : "", target_p->info);
@@ -940,7 +941,7 @@ server_burst(struct Client *client_p)
/* burst_all()
*
- * inputs - pointer to server to send burst to
+ * inputs - pointer to server to send burst to
* output - NONE
* side effects - complete burst of channels/nicks is sent to client_p
*/
@@ -971,7 +972,7 @@ burst_all(struct Client *client_p)
if (!HasFlag(target_p, FLAGS_BURSTED) && target_p->from != client_p)
sendnick_TS(client_p, target_p);
-
+
DelFlag(target_p, FLAGS_BURSTED);
}
@@ -1049,7 +1050,7 @@ burst_members(struct Client *client_p, struct Channel *chptr)
/* serv_connect() - initiate a server connection
*
- * inputs - pointer to conf
+ * inputs - pointer to conf
* - pointer to client doing the connect
* output -
* side effects -
@@ -1101,7 +1102,7 @@ serv_connect(struct MaskItem *conf, struct Client *by)
* Note: conf should ALWAYS be a valid C: line
*/
if ((client_p = hash_find_server(conf->name)) != NULL)
- {
+ {
sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
"Server %s already present from %s",
conf->name, get_client_name(client_p, SHOW_IP));
@@ -1114,7 +1115,7 @@ serv_connect(struct MaskItem *conf, struct Client *by)
get_client_name(client_p, MASK_IP));
return 0;
}
-
+
/* Create a local client */
client_p = make_client(NULL);
@@ -1125,7 +1126,7 @@ serv_connect(struct MaskItem *conf, struct Client *by)
/* We already converted the ip once, so lets use it - stu */
strlcpy(client_p->sockhost, buf, sizeof(client_p->sockhost));
- /* create a socket for the server connection */
+ /* create a socket for the server connection */
if (comm_open(&client_p->localClient->fd, conf->addr.ss.ss_family,
SOCK_STREAM, 0, NULL) < 0)
{
@@ -1148,7 +1149,7 @@ serv_connect(struct MaskItem *conf, struct Client *by)
sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
"Host %s is not enabled for connecting: no connect{} block",
conf->name);
- if (by && IsClient(by) && !MyClient(by))
+ if (by && IsClient(by) && !MyClient(by))
sendto_one(by, ":%s NOTICE %s :Connect to host %s failed.",
me.name, by->name, client_p->name);
SetDead(client_p);
@@ -1175,7 +1176,7 @@ serv_connect(struct MaskItem *conf, struct Client *by)
client_p->localClient->aftype = conf->aftype;
/* Now, initiate the connection */
- /* XXX assume that a non 0 type means a specific bind address
+ /* XXX assume that a non 0 type means a specific bind address
* for this connect.
*/
switch (conf->aftype)
@@ -1190,7 +1191,7 @@ serv_connect(struct MaskItem *conf, struct Client *by)
ipn.ss_port = 0;
memcpy(&ipn, &conf->bind, sizeof(struct irc_ssaddr));
comm_connect_tcp(&client_p->localClient->fd, conf->host, conf->port,
- (struct sockaddr *)&ipn, ipn.ss_len,
+ (struct sockaddr *)&ipn, ipn.ss_len,
serv_connect_callback, client_p, conf->aftype,
CONNECTTIMEOUT);
}
@@ -1207,8 +1208,8 @@ serv_connect(struct MaskItem *conf, struct Client *by)
CONNECTTIMEOUT);
}
else
- comm_connect_tcp(&client_p->localClient->fd, conf->host, conf->port,
- NULL, 0, serv_connect_callback, client_p, conf->aftype,
+ comm_connect_tcp(&client_p->localClient->fd, conf->host, conf->port,
+ NULL, 0, serv_connect_callback, client_p, conf->aftype,
CONNECTTIMEOUT);
break;
#ifdef IPV6
@@ -1229,7 +1230,7 @@ serv_connect(struct MaskItem *conf, struct Client *by)
ipn.ss_port = 0;
comm_connect_tcp(&client_p->localClient->fd,
conf->host, conf->port,
- (struct sockaddr *)&ipn, ipn.ss_len,
+ (struct sockaddr *)&ipn, ipn.ss_len,
serv_connect_callback, client_p,
conf->aftype, CONNECTTIMEOUT);
}
@@ -1246,7 +1247,7 @@ serv_connect(struct MaskItem *conf, struct Client *by)
}
else
comm_connect_tcp(&client_p->localClient->fd,
- conf->host, conf->port,
+ conf->host, conf->port,
NULL, 0, serv_connect_callback, client_p,
conf->aftype, CONNECTTIMEOUT);
}
@@ -1358,7 +1359,7 @@ ssl_connect_init(struct Client *client_p, struct MaskItem *conf, fde_t *fd)
#endif
/* serv_connect_callback() - complete a server connection.
- *
+ *
* This routine is called after the server connection attempt has
* completed. If unsucessful, an error is sent to ops and the client
* is closed. If sucessful, it goes through the initialisation/check
@@ -1440,7 +1441,7 @@ serv_connect_callback(fde_t *fd, int status, void *data)
/* If we've been marked dead because a send failed, just exit
* here now and save everyone the trouble of us ever existing.
*/
- if (IsDead(client_p))
+ if (IsDead(client_p))
{
sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
"%s[%s] went dead during handshake",
@@ -1470,6 +1471,6 @@ find_servconn_in_progress(const char *name)
if (!match(name, cptr->name))
return cptr;
}
-
+
return NULL;
}
diff --git a/src/s_user.c b/src/s_user.c
index 267b88e..b0d347b 100644
--- a/src/s_user.c
+++ b/src/s_user.c
@@ -64,7 +64,7 @@ static const char *uid_get(void);
* used with init_isupport, add_isupport, delete_isupport
*/
-struct Isupport
+struct Isupport
{
dlink_node node;
char *name;
@@ -109,7 +109,7 @@ const unsigned int user_modes[256] =
0, /* X */
0, /* Y */
0, /* Z 0x5A */
- 0, 0, 0, 0, 0, /* 0x5F */
+ 0, 0, 0, 0, 0, /* 0x5F */
0, /* 0x60 */
UMODE_ADMIN, /* a */
UMODE_BOTS, /* b */
@@ -169,7 +169,7 @@ assemble_umode_buffer(void)
* side effects - display to client user counts etc.
*/
void
-show_lusers(struct Client *source_p)
+show_lusers(struct Client *source_p)
{
const char *from, *to;
@@ -215,7 +215,7 @@ show_lusers(struct Client *source_p)
{
sendto_one(source_p, form_str(RPL_LUSERME),
from, to, Count.total, 0);
- sendto_one(source_p, form_str(RPL_LOCALUSERS),
+ sendto_one(source_p, form_str(RPL_LOCALUSERS),
from, to, Count.total, Count.max_tot);
}
@@ -230,7 +230,7 @@ show_lusers(struct Client *source_p)
Count.max_loc_cli = Count.local;
if ((Count.local + Count.myserver) > Count.max_loc_con)
- Count.max_loc_con = Count.local + Count.myserver;
+ Count.max_loc_con = Count.local + Count.myserver;
}
/* show_isupport()
@@ -240,7 +240,7 @@ show_lusers(struct Client *source_p)
* side effects - display to client what we support (for them)
*/
void
-show_isupport(struct Client *source_p)
+show_isupport(struct Client *source_p)
{
const dlink_node *ptr = NULL;
@@ -484,7 +484,7 @@ register_remote_user(struct Client *source_p,
assert(source_p != NULL);
assert(source_p->username != username);
- strlcpy(source_p->host, host, sizeof(source_p->host));
+ strlcpy(source_p->host, host, sizeof(source_p->host));
strlcpy(source_p->username, username, sizeof(source_p->username));
/*
@@ -872,9 +872,6 @@ set_user_mode(struct Client *client_p, struct Client *source_p,
}
else
{
- /* Only decrement the oper counts if an oper to begin with
- * found by Pat Szuta, Perly , perly@xnet.com
- */
if (!HasUMode(source_p, UMODE_OPER))
break;
@@ -1158,7 +1155,7 @@ user_welcome(struct Client *source_p)
}
#endif
- sendto_one(source_p, form_str(RPL_WELCOME), me.name, source_p->name,
+ sendto_one(source_p, form_str(RPL_WELCOME), me.name, source_p->name,
ServerInfo.network_name, source_p->name);
sendto_one(source_p, form_str(RPL_YOURHOST), me.name, source_p->name,
get_listener_name(source_p->localClient->listener), ircd_version);
@@ -1217,7 +1214,7 @@ check_xline(struct Client *source_p)
* output - NONE
* side effects - Blindly opers up given source_p, using conf info
* all checks on passwords have already been done.
- * This could also be used by rsa oper routines.
+ * This could also be used by rsa oper routines.
*/
void
oper_up(struct Client *source_p)
@@ -1269,7 +1266,7 @@ valid_sid(const char *sid)
/*
* init_uid()
- *
+ *
* inputs - NONE
* output - NONE
* side effects - new_uid is filled in with server id portion (sid)
@@ -1287,7 +1284,7 @@ init_uid(void)
strlcpy(new_uid, ServerInfo.sid, sizeof(new_uid));
for (i = 0; i < IRC_MAXSID; ++i)
- if (new_uid[i] == '\0')
+ if (new_uid[i] == '\0')
new_uid[i] = 'A';
/* NOTE: if IRC_MAXUID != 6, this will have to be rewritten */