diff options
author | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2013-07-03 18:13:17 +0000 |
---|---|---|
committer | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2013-07-03 18:13:17 +0000 |
commit | a1ce9ba4b3c64a9f7daf82d88b40381afebd5222 (patch) | |
tree | 58255747116bfee3624fb75cf8350fc912e5e078 /src | |
parent | 36ad1362178afa777fb41884ba0e2a3c93df24cb (diff) |
- White-space commit / style corrections
git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/branches/8.1.x@2343 82007160-df01-0410-b94d-b575c5fd34c7
Diffstat (limited to 'src')
-rw-r--r-- | src/channel.c | 4 | ||||
-rw-r--r-- | src/client.c | 48 | ||||
-rw-r--r-- | src/modules.c | 4 | ||||
-rw-r--r-- | src/parse.c | 96 | ||||
-rw-r--r-- | src/s_serv.c | 85 | ||||
-rw-r--r-- | src/s_user.c | 25 |
6 files changed, 135 insertions, 127 deletions
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 */ |