diff options
author | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2013-06-12 18:11:29 +0000 |
---|---|---|
committer | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2013-06-12 18:11:29 +0000 |
commit | faf81defb2c94977596cde61635717becbe3d3ef (patch) | |
tree | 517300c3725989cfefe24718e53fb059c34105fb | |
parent | 0ec4c137fef91be1314db295af065bbed5871621 (diff) |
- white-space commit/style corrections
git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/branches/8.1.x@2225 82007160-df01-0410-b94d-b575c5fd34c7
-rw-r--r-- | modules/m_challenge.c | 16 | ||||
-rw-r--r-- | modules/m_list.c | 123 | ||||
-rw-r--r-- | modules/m_ping.c | 2 | ||||
-rw-r--r-- | modules/m_whois.c | 12 |
4 files changed, 83 insertions, 70 deletions
diff --git a/modules/m_challenge.c b/modules/m_challenge.c index 7fd5fe4..89b903f 100644 --- a/modules/m_challenge.c +++ b/modules/m_challenge.c @@ -94,14 +94,14 @@ m_challenge(struct Client *client_p, struct Client *source_p, if (conf == NULL) { /* XXX: logging */ - sendto_one (source_p, form_str(ERR_NOOPERHOST), me.name, source_p->name); + sendto_one(source_p, form_str(ERR_NOOPERHOST), me.name, source_p->name); return; } if (attach_conf(source_p, conf) != 0) { sendto_one(source_p,":%s NOTICE %s :Can't attach conf!", - me.name, source_p->name); + me.name, source_p->name); failed_challenge_notice(source_p, conf->name, "can't attach conf!"); return; } @@ -110,8 +110,8 @@ m_challenge(struct Client *client_p, struct Client *source_p, oper_up(source_p); ilog(LOG_TYPE_OPER, "OPER %s by %s!%s@%s", - source_p->localClient->auth_oper, source_p->name, source_p->username, - source_p->host); + source_p->localClient->auth_oper, source_p->name, source_p->username, + source_p->host); MyFree(source_p->localClient->response); MyFree(source_p->localClient->auth_oper); @@ -129,7 +129,7 @@ m_challenge(struct Client *client_p, struct Client *source_p, if (!conf) { - sendto_one (source_p, form_str(ERR_NOOPERHOST), me.name, source_p->name); + sendto_one(source_p, form_str(ERR_NOOPERHOST), me.name, source_p->name); conf = find_exact_name_conf(CONF_OPER, NULL, parv[1], NULL, NULL); failed_challenge_notice(source_p, parv[1], (conf != NULL) ? "host mismatch" : "no oper {} block"); @@ -138,9 +138,9 @@ m_challenge(struct Client *client_p, struct Client *source_p, if (conf->rsa_public_key == NULL) { - sendto_one (source_p, ":%s NOTICE %s :I'm sorry, PK authentication " - "is not enabled for your oper{} block.", me.name, - source_p->name); + sendto_one(source_p, ":%s NOTICE %s :I'm sorry, PK authentication " + "is not enabled for your oper{} block.", me.name, + source_p->name); return; } diff --git a/modules/m_list.c b/modules/m_list.c index 5c5cf24..c2258a0 100644 --- a/modules/m_list.c +++ b/modules/m_list.c @@ -67,6 +67,7 @@ do_list(struct Client *source_p, int parc, char *parv[]) for (opt = strtoken(&save, parv[1], ","); opt != NULL; opt = strtoken(&save, NULL, ",")) + { switch (*opt) { case '<': if ((i = atoi(opt + 1)) > 0) @@ -81,61 +82,74 @@ do_list(struct Client *source_p, int parc, char *parv[]) break; case '-': break; case 'C': - case 'c': switch (*++opt) - { - case '<': if ((i = atoi(opt + 1)) >= 0) - lt->created_max = (unsigned int) (CurrentTime - - 60 * i); - else - errors = 1; - break; - case '>': if ((i = atoi(opt + 1)) >= 0) - lt->created_min = (unsigned int) (CurrentTime - - 60 * i); - else - errors = 1; - break; - default: errors = 1; - } - break; - case 'T': - case 't': switch (*++opt) - { - case '<': if ((i = atoi(opt + 1)) >= 0) - lt->topicts_min = (unsigned int) (CurrentTime - - 60 * i); - else - errors = 1; - break; - case '>': if ((i = atoi(opt + 1)) >= 0) - lt->topicts_max = (unsigned int) (CurrentTime - - 60 * i); - else - errors = 1; - break; - default: errors = 1; - } - break; - default: if (*opt == '!') - { - list = <->hide_mask; - opt++; - } - else list = <->show_mask; - - if (has_wildcards(opt + !!IsChanPrefix(*opt))) - { - if (list == <->show_mask) - no_masked_channels = 0; - } - else if (!IsChanPrefix(*opt)) - errors = 1; - if (!errors) - { - char *s = xstrdup(opt); - dlinkAdd(s, make_dlink_node(), list); - } + case 'c': + switch (*++opt) + { + case '<': + if ((i = atoi(opt + 1)) >= 0) + lt->created_max = (unsigned int) (CurrentTime - 60 * i); + else + errors = 1; + break; + case '>': + if ((i = atoi(opt + 1)) >= 0) + lt->created_min = (unsigned int) (CurrentTime - 60 * i); + else + errors = 1; + break; + default: + errors = 1; + } + + break; + + case 'T': + case 't': + switch (*++opt) + { + case '<': + if ((i = atoi(opt + 1)) >= 0) + lt->topicts_min = (unsigned int) (CurrentTime - 60 * i); + else + errors = 1; + break; + case '>': + if ((i = atoi(opt + 1)) >= 0) + lt->topicts_max = (unsigned int) (CurrentTime - 60 * i); + else + errors = 1; + break; + default: + errors = 1; + } + + break; + + default: + if (*opt == '!') + { + list = <->hide_mask; + opt++; + } + else + list = <->show_mask; + + if (has_wildcards(opt + !!IsChanPrefix(*opt))) + { + if (list == <->show_mask) + no_masked_channels = 0; + } + else if (!IsChanPrefix(*opt)) + errors = 1; + if (!errors) + { + char *s = xstrdup(opt); + + dlinkAdd(s, make_dlink_node(), list); + } } + } + if (errors) { free_list_task(lt, source_p); @@ -145,7 +159,6 @@ do_list(struct Client *source_p, int parc, char *parv[]) } } - dlinkAdd(source_p, make_dlink_node(), &listing_client_list); sendto_one(source_p, form_str(RPL_LISTSTART), diff --git a/modules/m_ping.c b/modules/m_ping.c index cec3596..dfc1a9a 100644 --- a/modules/m_ping.c +++ b/modules/m_ping.c @@ -108,7 +108,7 @@ ms_ping(struct Client *client_p, struct Client *source_p, { if ((target_p = hash_find_server(destination))) sendto_one(target_p, ":%s PING %s :%s", source_p->name, - origin, destination); + origin, destination); else { sendto_one(source_p, form_str(ERR_NOSUCHSERVER), diff --git a/modules/m_whois.c b/modules/m_whois.c index b71806c..b34135e 100644 --- a/modules/m_whois.c +++ b/modules/m_whois.c @@ -74,10 +74,10 @@ whois_person(struct Client *source_p, struct Client *target_p) { if ((cur_len + 3 + strlen(ms->chptr->chname) + 1) > (IRCD_BUFSIZE - 2)) { - *(t - 1) = '\0'; - sendto_one(source_p, "%s", buf); - cur_len = mlen; - t = buf + mlen; + *(t - 1) = '\0'; + sendto_one(source_p, "%s", buf); + cur_len = mlen; + t = buf + mlen; } tlen = sprintf(t, "%s%s ", get_member_status(ms, 1), ms->chptr->chname); @@ -99,9 +99,9 @@ whois_person(struct Client *source_p, struct Client *target_p) target_p->servptr->name, target_p->servptr->info); else sendto_one(source_p, form_str(RPL_WHOISSERVER), - me.name, source_p->name, target_p->name, + me.name, source_p->name, target_p->name, ConfigServerHide.hidden_name, - ServerInfo.network_desc); + ServerInfo.network_desc); if (HasUMode(target_p, UMODE_REGISTERED)) sendto_one(source_p, form_str(RPL_WHOISREGNICK), |