From a8d683d5f794f25386ca207d59cca0d917b0f9fa Mon Sep 17 00:00:00 2001 From: Rylee Fowler Date: Tue, 8 Jul 2014 18:11:28 -0400 Subject: [PATCH] Remove all trailing whitespace --- contrib/anope_convert.c | 2 +- include/culture.h | 2 +- include/md5.h | 2 +- include/res.h | 2 +- libathemecore/account.c | 8 ++-- libathemecore/arc4random.c | 2 +- libathemecore/atheme.c | 4 +- libathemecore/auth.c | 4 +- libathemecore/authcookie.c | 4 +- libathemecore/channels.c | 6 +-- libathemecore/cidr.c | 4 +- libathemecore/cmode.c | 4 +- libathemecore/commandtree.c | 8 ++-- libathemecore/conf.c | 8 ++-- libathemecore/confprocess.c | 6 +-- libathemecore/connection.c | 8 ++-- libathemecore/ctcp-common.c | 4 +- libathemecore/culture.c | 4 +- libathemecore/datastream.c | 4 +- libathemecore/entity.c | 2 +- libathemecore/flags.c | 8 ++-- libathemecore/function.c | 4 +- libathemecore/help.c | 4 +- libathemecore/linker.c | 4 +- libathemecore/logger.c | 8 ++-- libathemecore/match.c | 6 +-- libathemecore/module.c | 2 +- libathemecore/phandler.c | 6 +-- libathemecore/res.c | 30 +++++++-------- libathemecore/reslib.c | 22 +++++------ libathemecore/servtree.c | 2 +- libathemecore/svsignore.c | 14 +++---- libathemecore/table.c | 2 +- libathemecore/template.c | 2 +- libathemecore/uplink.c | 2 +- libathemecore/users.c | 4 +- modules/auth/ldap.c | 2 +- modules/backend/flatfile.c | 8 ++-- modules/botserv/botserv.h | 2 +- modules/botserv/bottalk.c | 4 +- modules/botserv/main.c | 2 +- modules/chanserv/antiflood.c | 2 +- modules/chanserv/ban.c | 2 +- modules/chanserv/clear.c | 2 +- modules/chanserv/clear_akicks.c | 2 +- modules/chanserv/clear_bans.c | 2 +- modules/chanserv/clear_flags.c | 2 +- modules/chanserv/clear_users.c | 2 +- modules/chanserv/clone.c | 10 ++--- modules/chanserv/count.c | 2 +- modules/chanserv/fflags.c | 2 +- modules/chanserv/ftransfer.c | 4 +- modules/chanserv/halfop.c | 2 +- modules/chanserv/help.c | 2 +- modules/chanserv/hold.c | 2 +- modules/chanserv/info.c | 4 +- modules/chanserv/invite.c | 4 +- modules/chanserv/list.c | 2 +- modules/chanserv/mark.c | 2 +- modules/chanserv/moderate.c | 2 +- modules/chanserv/owner.c | 2 +- modules/chanserv/protect.c | 2 +- modules/chanserv/quiet.c | 2 +- modules/chanserv/recover.c | 2 +- modules/chanserv/register.c | 2 +- modules/chanserv/set.c | 2 +- modules/chanserv/set_founder.c | 2 +- modules/chanserv/set_prefix.c | 8 ++-- modules/chanserv/status.c | 2 +- modules/chanserv/taxonomy.c | 2 +- modules/chanserv/template.c | 4 +- modules/chanserv/topic.c | 6 +-- modules/chanserv/voice.c | 2 +- modules/chanserv/why.c | 4 +- modules/crypto/ircservices.c | 6 +-- modules/exttarget/chanacs.c | 2 +- modules/gameserv/dice.c | 6 +-- modules/gameserv/gamecalc.c | 2 +- modules/gameserv/happyfarm.c | 2 +- modules/global/main.c | 2 +- modules/groupserv/acsnolimit.c | 2 +- modules/groupserv/drop.c | 2 +- modules/groupserv/fflags.c | 4 +- modules/groupserv/flags.c | 4 +- modules/groupserv/info.c | 2 +- modules/groupserv/invite.c | 2 +- modules/groupserv/join.c | 2 +- modules/groupserv/main/groupserv.c | 2 +- modules/groupserv/main/validation.c | 2 +- modules/groupserv/register.c | 2 +- modules/groupserv/regnolimit.c | 2 +- modules/groupserv/set_channel.c | 2 +- modules/groupserv/set_description.c | 2 +- modules/groupserv/set_email.c | 2 +- modules/groupserv/set_joinflags.c | 2 +- modules/groupserv/set_open.c | 2 +- modules/groupserv/set_public.c | 2 +- modules/groupserv/set_url.c | 2 +- modules/helpserv/helpme.c | 2 +- modules/hostserv/hostserv.h | 4 +- modules/hostserv/request.c | 6 +-- modules/infoserv/main.c | 16 ++++---- modules/memoserv/delete.c | 32 ++++++++-------- modules/memoserv/forward.c | 30 +++++++-------- modules/memoserv/ignore.c | 2 +- modules/memoserv/list.c | 14 +++---- modules/memoserv/main.c | 2 +- modules/memoserv/read.c | 36 +++++++++--------- modules/memoserv/send.c | 38 +++++++++---------- modules/memoserv/sendall.c | 20 +++++----- modules/memoserv/sendgroup.c | 20 +++++----- modules/memoserv/sendops.c | 20 +++++----- modules/misc/httpd.c | 6 +-- modules/nickserv/cert.c | 2 +- modules/nickserv/cracklib.c | 4 +- modules/nickserv/enforce.c | 12 +++--- modules/nickserv/help.c | 6 +-- modules/nickserv/info.c | 2 +- modules/nickserv/main.c | 2 +- modules/nickserv/mark.c | 2 +- modules/nickserv/register.c | 2 +- modules/nickserv/sendpass.c | 2 +- modules/nickserv/sendpass_user.c | 2 +- modules/nickserv/setpass.c | 2 +- modules/nickserv/vacation.c | 2 +- modules/nickserv/verify.c | 4 +- modules/operserv/akill.c | 10 ++--- modules/operserv/clearchan.c | 2 +- modules/operserv/clones.c | 10 ++--- modules/operserv/compare.c | 8 ++-- modules/operserv/noop.c | 6 +-- modules/operserv/rakill.c | 2 +- modules/operserv/rmatch.c | 6 +-- modules/operserv/rwatch.c | 2 +- modules/operserv/set.c | 2 +- modules/operserv/sgline.c | 16 ++++---- modules/operserv/soper.c | 2 +- modules/operserv/sqline.c | 22 +++++------ modules/protocol/elemental-ircd.c | 20 +++++----- modules/protocol/ircd-seven.c | 2 +- modules/protocol/ircnet.c | 2 +- modules/protocol/nefarious.c | 4 +- modules/protocol/p10-generic.c | 4 +- modules/protocol/shadowircd.c | 20 +++++----- modules/protocol/ts6-generic.c | 6 +-- modules/proxyscan/dnsbl.c | 4 +- modules/rpgserv/search.c | 2 +- modules/scripting/perl/api/perl_hooks_extra.h | 2 +- modules/statserv/netsplit.c | 2 +- modules/statserv/server.c | 4 +- modules/transport/xmlrpc/main.c | 2 +- modules/transport/xmlrpc/xmlrpclib.c | 4 +- tools/createburst/createburst.c | 2 +- tools/createtestdb/createtestdb.c | 2 +- 154 files changed, 421 insertions(+), 421 deletions(-) diff --git a/contrib/anope_convert.c b/contrib/anope_convert.c index dcc8c26191..361022be40 100644 --- a/contrib/anope_convert.c +++ b/contrib/anope_convert.c @@ -288,7 +288,7 @@ static void ATHEME_CONVERT_write_channels(void) (unsigned long)ci->time_registered, (unsigned long)ci->last_used, athemeflags, athememon, athememoff, - ci->mlock_limit ? ci->mlock_limit : 0, + ci->mlock_limit ? ci->mlock_limit : 0, ci->mlock_key ? ci->mlock_key : ""); mcout++; diff --git a/include/culture.h b/include/culture.h index 20679521bf..66f36f62e2 100644 --- a/include/culture.h +++ b/include/culture.h @@ -3,7 +3,7 @@ * Rights to this code are as documented in doc/LICENSE. * * Message translation stuff. - * + * */ #ifndef CULTURE_H diff --git a/include/md5.h b/include/md5.h index 501cdbe152..847e9da204 100644 --- a/include/md5.h +++ b/include/md5.h @@ -61,7 +61,7 @@ typedef struct md5_state_s { } md5_state_t; #ifdef __cplusplus -extern "C" +extern "C" { #endif diff --git a/include/res.h b/include/res.h index dc04376717..50f397a1bf 100644 --- a/include/res.h +++ b/include/res.h @@ -10,7 +10,7 @@ #include "atheme.h" #include "reslib.h" -/* Maximum number of nameservers in /etc/resolv.conf we care about +/* Maximum number of nameservers in /etc/resolv.conf we care about * In hybrid, this was 2 -- but in Charybdis, we want to track * a few more than that ;) --nenolod */ diff --git a/libathemecore/account.c b/libathemecore/account.c index 2c23ad0819..e644db0a6d 100644 --- a/libathemecore/account.c +++ b/libathemecore/account.c @@ -435,7 +435,7 @@ void myuser_set_email(myuser_t *mu, const char *newemail) * * Side Effects: * - none - */ + */ myuser_t *myuser_find_ext(const char *name) { user_t *u; @@ -1773,7 +1773,7 @@ chanacs_t *chanacs_open(mychan_t *mychan, myentity_t *mt, const char *hostmask, /* wrt the second assert: only one of mu or hostmask can be not-NULL --nenolod */ return_val_if_fail(mychan != NULL, false); - return_val_if_fail((mt != NULL && hostmask == NULL) || (mt == NULL && hostmask != NULL), false); + return_val_if_fail((mt != NULL && hostmask == NULL) || (mt == NULL && hostmask != NULL), false); if (mt != NULL) { @@ -1850,7 +1850,7 @@ bool chanacs_change(mychan_t *mychan, myentity_t *mt, const char *hostmask, unsi /* wrt the second assert: only one of mu or hostmask can be not-NULL --nenolod */ return_val_if_fail(mychan != NULL, false); - return_val_if_fail((mt != NULL && hostmask == NULL) || (mt == NULL && hostmask != NULL), false); + return_val_if_fail((mt != NULL && hostmask == NULL) || (mt == NULL && hostmask != NULL), false); return_val_if_fail(addflags != NULL && removeflags != NULL, false); if (mt != NULL) @@ -1948,7 +1948,7 @@ static int expire_myuser_cb(myentity_t *mt, void *unused) /* If they're logged in, update lastlogin time. * To decrease db traffic, may want to only do * this if the account would otherwise be - * deleted. -- jilles + * deleted. -- jilles */ if (MOWGLI_LIST_LENGTH(&mu->logins) > 0) { diff --git a/libathemecore/arc4random.c b/libathemecore/arc4random.c index f5c682a7f9..f90e8d3cc9 100644 --- a/libathemecore/arc4random.c +++ b/libathemecore/arc4random.c @@ -91,7 +91,7 @@ arc4_stir(struct arc4_stream *as) if (fd >= 0) { n = read(fd, rdat.rnd, sizeof(rdat.rnd)); close(fd); - } + } /* fd < 0? Ah, what the heck. We'll just take whatever was on the * stack... */ diff --git a/libathemecore/atheme.c b/libathemecore/atheme.c index c6e4ec13f9..d2c901e6ac 100644 --- a/libathemecore/atheme.c +++ b/libathemecore/atheme.c @@ -1,8 +1,8 @@ /* - * atheme-services: A collection of minimalist IRC services + * atheme-services: A collection of minimalist IRC services * atheme.c: Initialization and startup of the services system * - * Copyright (c) 2005-2007 Atheme Project (http://www.atheme.org) + * Copyright (c) 2005-2007 Atheme Project (http://www.atheme.org) * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above diff --git a/libathemecore/auth.c b/libathemecore/auth.c index 1aded653b9..3f7c9bf812 100644 --- a/libathemecore/auth.c +++ b/libathemecore/auth.c @@ -1,8 +1,8 @@ /* - * atheme-services: A collection of minimalist IRC services + * atheme-services: A collection of minimalist IRC services * auth.c: Authentication. * - * Copyright (c) 2005-2009 Atheme Project (http://www.atheme.org) + * Copyright (c) 2005-2009 Atheme Project (http://www.atheme.org) * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above diff --git a/libathemecore/authcookie.c b/libathemecore/authcookie.c index 55659e476a..6f4befcc1e 100644 --- a/libathemecore/authcookie.c +++ b/libathemecore/authcookie.c @@ -1,8 +1,8 @@ /* - * atheme-services: A collection of minimalist IRC services + * atheme-services: A collection of minimalist IRC services * authcookie.c: Remote authentication ticket management * - * Copyright (c) 2005-2007 Atheme Project (http://www.atheme.org) + * Copyright (c) 2005-2007 Atheme Project (http://www.atheme.org) * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above diff --git a/libathemecore/channels.c b/libathemecore/channels.c index d07477f5a6..f585de89df 100644 --- a/libathemecore/channels.c +++ b/libathemecore/channels.c @@ -1,8 +1,8 @@ /* - * atheme-services: A collection of minimalist IRC services + * atheme-services: A collection of minimalist IRC services * channels.c: Channel event and state tracking * - * Copyright (c) 2005-2007 Atheme Project (http://www.atheme.org) + * Copyright (c) 2005-2007 Atheme Project (http://www.atheme.org) * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -157,7 +157,7 @@ void channel_delete(channel_t *c) return_if_fail(c != NULL); slog(LG_DEBUG, "channel_delete(): %s", c->name); - + modestack_finalize_channel(c); /* If this is called from uplink_close(), there may still be services diff --git a/libathemecore/cidr.c b/libathemecore/cidr.c index f996e9e19c..4c87039612 100644 --- a/libathemecore/cidr.c +++ b/libathemecore/cidr.c @@ -1,5 +1,5 @@ /* - * atheme-services: A collection of minimalist IRC services + * atheme-services: A collection of minimalist IRC services * cidr.c: CIDR matching. * * Most code in this file has been copied from ratbox, src/match.c and @@ -8,7 +8,7 @@ * * Copyright (c) 1996-2002 Hybrid Development Team * Copyright (c) 2002-2005 ircd-ratbox development team - * Copyright (c) 2005-2007 Atheme Project (http://www.atheme.org) + * Copyright (c) 2005-2007 Atheme Project (http://www.atheme.org) * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above diff --git a/libathemecore/cmode.c b/libathemecore/cmode.c index d81db5765b..35d86829f9 100644 --- a/libathemecore/cmode.c +++ b/libathemecore/cmode.c @@ -1,8 +1,8 @@ /* - * atheme-services: A collection of minimalist IRC services + * atheme-services: A collection of minimalist IRC services * cmode.c: Channel mode change tracking. * - * Copyright (c) 2005-2007 Atheme Project (http://www.atheme.org) + * Copyright (c) 2005-2007 Atheme Project (http://www.atheme.org) * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above diff --git a/libathemecore/commandtree.c b/libathemecore/commandtree.c index 7a1070ee56..d3a3a121f5 100644 --- a/libathemecore/commandtree.c +++ b/libathemecore/commandtree.c @@ -1,8 +1,8 @@ /* - * atheme-services: A collection of minimalist IRC services + * atheme-services: A collection of minimalist IRC services * commandtree.c: Management of services commands. * - * Copyright (c) 2005-2010 Atheme Project (http://www.atheme.org) + * Copyright (c) 2005-2010 Atheme Project (http://www.atheme.org) * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -167,7 +167,7 @@ void command_exec_split(service_t *svs, sourceinfo_t *si, const char *cmd, char * inputs - * si: The origin of the request. * commandtree: The command tree being listed. - * + * * outputs - * A list of available commands. */ @@ -223,7 +223,7 @@ static bool string_in_list(const char *str, const char *name) * origin: The origin of the request. * commandtree: The command tree being listed. * maincmds: The commands to list verbosely. - * + * * outputs - * A list of available commands. */ diff --git a/libathemecore/conf.c b/libathemecore/conf.c index b3b7a07020..492bb246da 100644 --- a/libathemecore/conf.c +++ b/libathemecore/conf.c @@ -1,8 +1,8 @@ /* - * atheme-services: A collection of minimalist IRC services + * atheme-services: A collection of minimalist IRC services * conf.c: Services-specific configuration processing. * - * Copyright (c) 2005-2008 Atheme Project (http://www.atheme.org) + * Copyright (c) 2005-2008 Atheme Project (http://www.atheme.org) * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -126,8 +126,8 @@ const char *get_conf_opts(void) log_debug_enabled() ? "d" : "", me.auth ? "e" : "", config_options.flood_msgs ? "F" : "", - config_options.leave_chans ? "l" : "", - config_options.join_chans ? "j" : "", + config_options.leave_chans ? "l" : "", + config_options.join_chans ? "j" : "", chansvs.changets ? "t" : "", !match_mapping ? "R" : "", config_options.raw ? "r" : "", diff --git a/libathemecore/confprocess.c b/libathemecore/confprocess.c index 982e3474af..2d65ace5aa 100644 --- a/libathemecore/confprocess.c +++ b/libathemecore/confprocess.c @@ -1,8 +1,8 @@ /* - * atheme-services: A collection of minimalist IRC services + * atheme-services: A collection of minimalist IRC services * confprocess.c: Generic configuration processing. * - * Copyright (c) 2005-2008 Atheme Project (http://www.atheme.org) + * Copyright (c) 2005-2008 Atheme Project (http://www.atheme.org) * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -211,7 +211,7 @@ static void set_default(struct ConfTable *ct) { if (ct->flags & CONF_NO_REHASH && runflags & RF_REHASHING) return; - + switch (ct->type) { case CONF_UINT: diff --git a/libathemecore/connection.c b/libathemecore/connection.c index 25eccf86c9..6024704a85 100644 --- a/libathemecore/connection.c +++ b/libathemecore/connection.c @@ -1,8 +1,8 @@ /* - * atheme-services: A collection of minimalist IRC services + * atheme-services: A collection of minimalist IRC services * connection.c: Connection and I/O management * - * Copyright (c) 2005-2007 Atheme Project (http://www.atheme.org) + * Copyright (c) 2005-2007 Atheme Project (http://www.atheme.org) * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -463,7 +463,7 @@ connection_t *connection_open_tcp(char *host, char *vhost, unsigned int port, break; case AF_INET6: ((struct sockaddr_in6 *) addr->ai_addr)->sin6_port = htons(port); - break; + break; } if ((connect(s, addr->ai_addr, addr->ai_addrlen) == -1) && ioerrno() != EINPROGRESS && ioerrno() != EINTR && ioerrno() != EWOULDBLOCK) @@ -544,7 +544,7 @@ connection_t *connection_open_listener_tcp(char *host, unsigned int port, break; case AF_INET6: ((struct sockaddr_in6 *) addr->ai_addr)->sin6_port = htons(port); - break; + break; } if (bind(s, addr->ai_addr, addr->ai_addrlen) < 0) diff --git a/libathemecore/ctcp-common.c b/libathemecore/ctcp-common.c index 2caf8129d1..7d39be8b28 100644 --- a/libathemecore/ctcp-common.c +++ b/libathemecore/ctcp-common.c @@ -1,8 +1,8 @@ /* - * atheme-services: A collection of minimalist IRC services + * atheme-services: A collection of minimalist IRC services * ctcp-common.c: Handling of CTCP commands. * - * Copyright (c) 2005-2007 Atheme Project (http://www.atheme.org) + * Copyright (c) 2005-2007 Atheme Project (http://www.atheme.org) * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above diff --git a/libathemecore/culture.c b/libathemecore/culture.c index 95f8f9c9e5..5e008a4811 100644 --- a/libathemecore/culture.c +++ b/libathemecore/culture.c @@ -1,8 +1,8 @@ /* - * atheme-services: A collection of minimalist IRC services + * atheme-services: A collection of minimalist IRC services * culture.c: Translation framework. * - * Copyright (c) 2005-2009 Atheme Project (http://www.atheme.org) + * Copyright (c) 2005-2009 Atheme Project (http://www.atheme.org) * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above diff --git a/libathemecore/datastream.c b/libathemecore/datastream.c index 39bce47608..da1b38302c 100644 --- a/libathemecore/datastream.c +++ b/libathemecore/datastream.c @@ -1,8 +1,8 @@ /* - * atheme-services: A collection of minimalist IRC services + * atheme-services: A collection of minimalist IRC services * datastream.c: Efficient handling of streams and packet queues. * - * Copyright (c) 2005-2007 Atheme Project (http://www.atheme.org) + * Copyright (c) 2005-2007 Atheme Project (http://www.atheme.org) * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above diff --git a/libathemecore/entity.c b/libathemecore/entity.c index 23528edbe6..56cb9fe4fb 100644 --- a/libathemecore/entity.c +++ b/libathemecore/entity.c @@ -125,7 +125,7 @@ void myentity_foreach_start(myentity_iteration_state_t *state, myentity_type_t t { mowgli_patricia_foreach_next(entities, &state->st); e = mowgli_patricia_foreach_cur(entities, &state->st); - } + } } myentity_t *myentity_foreach_cur(myentity_iteration_state_t *state) diff --git a/libathemecore/flags.c b/libathemecore/flags.c index 4393999f0d..8ac64ee1bd 100644 --- a/libathemecore/flags.c +++ b/libathemecore/flags.c @@ -1,8 +1,8 @@ /* - * atheme-services: A collection of minimalist IRC services + * atheme-services: A collection of minimalist IRC services * flags.c: Functions to convert a flags table into a bitmask. * - * Copyright (c) 2005-2010 Atheme Project (http://www.atheme.org) + * Copyright (c) 2005-2010 Atheme Project (http://www.atheme.org) * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -340,7 +340,7 @@ void update_chanacs_flags(void) ca_all = ca_all_enable = 0; for (i = 0; i < ARRAY_SIZE(chanacs_flags); i++) { - ca_all |= chanacs_flags[i].value; + ca_all |= chanacs_flags[i].value; if (chanacs_flags[i].def == true) ca_all_enable |= chanacs_flags[i].value; } @@ -393,7 +393,7 @@ unsigned int xflag_apply(unsigned int in, const char *name) if (status == FLAGS_ADD) out |= flag; else - out &= ~flag; + out &= ~flag; return out; } diff --git a/libathemecore/function.c b/libathemecore/function.c index 43a26d5d0b..71502171cd 100644 --- a/libathemecore/function.c +++ b/libathemecore/function.c @@ -1,8 +1,8 @@ /* - * atheme-services: A collection of minimalist IRC services + * atheme-services: A collection of minimalist IRC services * function.c: Miscillaneous functions. * - * Copyright (c) 2005-2007 Atheme Project (http://www.atheme.org) + * Copyright (c) 2005-2007 Atheme Project (http://www.atheme.org) * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above diff --git a/libathemecore/help.c b/libathemecore/help.c index 2a92dc404a..0253db6ec0 100644 --- a/libathemecore/help.c +++ b/libathemecore/help.c @@ -1,8 +1,8 @@ /* - * atheme-services: A collection of minimalist IRC services + * atheme-services: A collection of minimalist IRC services * help.c: Help system implementation. * - * Copyright (c) 2005-2007 Atheme Project (http://www.atheme.org) + * Copyright (c) 2005-2007 Atheme Project (http://www.atheme.org) * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above diff --git a/libathemecore/linker.c b/libathemecore/linker.c index 17c06728f5..8321d93a24 100644 --- a/libathemecore/linker.c +++ b/libathemecore/linker.c @@ -1,8 +1,8 @@ /* - * atheme-services: A collection of minimalist IRC services + * atheme-services: A collection of minimalist IRC services * linker.c: Abstraction of the dynamic linking system. * - * Copyright (c) 2005-2007 Atheme Project (http://www.atheme.org) + * Copyright (c) 2005-2007 Atheme Project (http://www.atheme.org) * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above diff --git a/libathemecore/logger.c b/libathemecore/logger.c index 98b34955d0..0de00d8111 100644 --- a/libathemecore/logger.c +++ b/libathemecore/logger.c @@ -1,8 +1,8 @@ /* - * atheme-services: A collection of minimalist IRC services + * atheme-services: A collection of minimalist IRC services * logger.c: Logging routines * - * Copyright (c) 2005-2009 Atheme Project (http://www.atheme.org) + * Copyright (c) 2005-2009 Atheme Project (http://www.atheme.org) * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -586,11 +586,11 @@ static void vslog_ext(log_type_t type, unsigned int level, const char *fmt, lf->write_func(lf, buf); } - /* + /* * if the event is in the default loglevel, and we are starting, then * display it in the controlling terminal. */ - if (type != LOG_INTERACTIVE && ((runflags & (RF_LIVE | RF_STARTING) && + if (type != LOG_INTERACTIVE && ((runflags & (RF_LIVE | RF_STARTING) && (log_file != NULL ? log_file->log_mask : LG_ERROR | LG_INFO) & level) || (runflags & RF_LIVE && log_force))) fprintf(stderr, "%s %s\n", datetime, logfile_strip_control_codes(buf)); diff --git a/libathemecore/match.c b/libathemecore/match.c index 837b32fc0d..21d2b5a11c 100644 --- a/libathemecore/match.c +++ b/libathemecore/match.c @@ -606,12 +606,12 @@ atheme_regex_t *regex_create(char *pattern, int flags) static char errmsg[BUFSIZE]; int errnum; atheme_regex_t *preg; - + if (pattern == NULL) { return NULL; } - + preg = smalloc(sizeof(atheme_regex_t)); if (flags & AREGEX_PCRE) { @@ -649,7 +649,7 @@ atheme_regex_t *regex_create(char *pattern, int flags) } preg->type = at_posix; } - + return preg; } diff --git a/libathemecore/module.c b/libathemecore/module.c index 454cba881f..3f5a2ee560 100644 --- a/libathemecore/module.c +++ b/libathemecore/module.c @@ -327,7 +327,7 @@ void module_unload(module_t *m, module_unload_intent_t intent) module_t *hm = (module_t *) n->data; mowgli_node_t *hn = mowgli_node_find(m, &hm->dephost); - mowgli_node_delete(hn, &hm->dephost); + mowgli_node_delete(hn, &hm->dephost); mowgli_node_free(hn); mowgli_node_delete(n, &m->deplist); mowgli_node_free(n); diff --git a/libathemecore/phandler.c b/libathemecore/phandler.c index 1173f34bca..39a634116c 100644 --- a/libathemecore/phandler.c +++ b/libathemecore/phandler.c @@ -144,7 +144,7 @@ void generic_notice_channel_sts(user_t *from, channel_t *target, const char *tex slog(LG_INFO, "Cannot send notice to %s (%s): don't know how. Load a protocol module perhaps?", target->name, text); } -void generic_wallchops(user_t *sender, channel_t *channel, const char *message) +void generic_wallchops(user_t *sender, channel_t *channel, const char *message) { /* ugly, but always works -- jilles */ mowgli_node_t *n; @@ -263,12 +263,12 @@ void generic_fnc_sts(user_t *source, user_t *u, const char *newnick, int type) void generic_holdnick_sts(user_t *source, int duration, const char *nick, myuser_t *account) { - /* nothing to do here. */ + /* nothing to do here. */ } void generic_invite_sts(user_t *source, user_t *target, channel_t *channel) { - /* nothing to do here. */ + /* nothing to do here. */ } void generic_svslogin_sts(char *target, char *nick, char *user, char *host, myuser_t *account) diff --git a/libathemecore/res.c b/libathemecore/res.c index fa972334c8..b3f2bf5f81 100644 --- a/libathemecore/res.c +++ b/libathemecore/res.c @@ -15,7 +15,7 @@ * --Bleep (Thomas Helvey ) * * This was all needlessly complicated for irc. Simplified. No more hostent - * All we really care about is the IP -> hostname mappings. Thats all. + * All we really care about is the IP -> hostname mappings. Thats all. * * Apr 28, 2003 --cryogen and Dianora * @@ -155,7 +155,7 @@ static int res_ourserver(const sockaddr_any_t *inp) } /* - * timeout_query_list - Remove queries from the list which have been + * timeout_query_list - Remove queries from the list which have been * there too long without being resolved. */ static time_t timeout_query_list(time_t now) @@ -283,8 +283,8 @@ void add_local_domain(char *hname, size_t size) } /* - * rem_request - remove a request from the list. - * This must also free any memory that has been allocated for + * rem_request - remove a request from the list. + * This must also free any memory that has been allocated for * temporary storage of DNS results. */ static void rem_request(struct reslist *request) @@ -314,7 +314,7 @@ static struct reslist *make_request(dns_query_t *query) } /* - * delete_resolver_queries - cleanup outstanding queries + * delete_resolver_queries - cleanup outstanding queries * for which there no longer exist clients or conf lines. */ void delete_resolver_queries(const dns_query_t *query) @@ -357,7 +357,7 @@ static int retryfreq(int timeouts) /* * send_res_msg - sends msg to a nameserver. * This should reflect /etc/resolv.conf. - * Returns number of nameserver successfully sent to + * Returns number of nameserver successfully sent to * or -1 if no successful sends. */ static int send_res_msg(const char *rmsg, int len, int rcount) @@ -377,7 +377,7 @@ static int send_res_msg(const char *rmsg, int len, int rcount) if (ns_timeout_count[ns] && retrycnt % retryfreq(ns_timeout_count[ns])) continue; if (sendto(res_fd->fd, rmsg, len, 0, - (struct sockaddr *)&(irc_nsaddr_list[ns].saddr), + (struct sockaddr *)&(irc_nsaddr_list[ns].saddr), irc_nsaddr_list[ns].saddr_len) == len) return ns; } @@ -389,7 +389,7 @@ static int send_res_msg(const char *rmsg, int len, int rcount) if (!ns_timeout_count[ns]) continue; if (sendto(res_fd->fd, rmsg, len, 0, - (struct sockaddr *)&(irc_nsaddr_list[ns].saddr), + (struct sockaddr *)&(irc_nsaddr_list[ns].saddr), irc_nsaddr_list[ns].saddr_len) == len) return ns; } @@ -416,7 +416,7 @@ static struct reslist *find_id(int id) return (NULL); } -/* +/* * gethost_byname_type - get host address from name * */ @@ -672,8 +672,8 @@ static int proc_answer(struct reslist *request, RESHEADER * header, char *buf, c rd_length = irc_ns_get16(current); current += RDLENGTH_SIZE; - /* - * Wait to set request->type until we verify this structure + /* + * Wait to set request->type until we verify this structure */ switch (type) { @@ -742,8 +742,8 @@ static int proc_answer(struct reslist *request, RESHEADER * header, char *buf, c static int res_read_single_reply(connection_t *F) { char buf[sizeof(RESHEADER) + MAXPACKET] - /* Sparc and alpha need 16bit-alignment for accessing header->id - * (which is uint16_t). Because of the header = (RESHEADER*) buf; + /* Sparc and alpha need 16bit-alignment for accessing header->id + * (which is uint16_t). Because of the header = (RESHEADER*) buf; * lateron, this is neeeded. --FaUl */ #if defined(__sparc__) || defined(__alpha__) @@ -812,7 +812,7 @@ static int res_read_single_reply(connection_t *F) return 1; } /* - * If this fails there was an error decoding the received packet, + * If this fails there was an error decoding the received packet, * give up. -- jilles */ answer_count = proc_answer(request, header, buf, buf + rc); @@ -834,7 +834,7 @@ static int res_read_single_reply(connection_t *F) /* * Lookup the 'authoritative' name that we were given for the - * ip#. + * ip#. * */ #ifdef RB_IPV6 diff --git a/libathemecore/reslib.c b/libathemecore/reslib.c index e0e29a0b52..24d06e4a6f 100644 --- a/libathemecore/reslib.c +++ b/libathemecore/reslib.c @@ -1,7 +1,7 @@ /* * Copyright (c) 1985, 1993 * The Regents of the University of California. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -17,7 +17,7 @@ * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -33,14 +33,14 @@ /* * Portions Copyright (c) 1993 by Digital Equipment Corporation. - * + * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies, and that * the name of Digital Equipment Corporation not be used in advertising or * publicity pertaining to distribution of the document or software without * specific, written prior permission. - * + * * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT @@ -68,7 +68,7 @@ * SOFTWARE. */ -/* Original copyright ISC as above. +/* Original copyright ISC as above. * Code modified specifically for ircd use from the following orginal files * in bind ... * @@ -76,7 +76,7 @@ * ns_name.c * ns_netint.c * res_init.c - * + * * - Dianora */ @@ -130,7 +130,7 @@ static int irc_ns_name_compress(const char *src, unsigned char *dst, size_t dsts unsigned char **dnptrs, unsigned char **lastdnptr); static int irc_dn_find(const unsigned char *, const unsigned char *, const unsigned char * const *, const unsigned char * const *); -static int irc_encode_bitsring(const char **, const char *, unsigned char **, unsigned char **, +static int irc_encode_bitsring(const char **, const char *, unsigned char **, unsigned char **, const char *); static int irc_ns_name_uncompress(const unsigned char *, const unsigned char *, const unsigned char *, char *, size_t); @@ -140,7 +140,7 @@ static int irc_ns_name_unpack(const unsigned char *, const unsigned char *, static int irc_ns_name_ntop(const char *, char *, size_t); static int irc_ns_name_skip(const unsigned char **, const unsigned char *); static int mklower(int ch); - + int irc_res_init(void) { @@ -431,7 +431,7 @@ irc_ns_name_ntop(const char *src, char *dst, size_t dstsiz) errno = EMSGSIZE; return(-1); } - dn += m; + dn += m; continue; } for ((void)NULL; l > 0; l--) { @@ -616,7 +616,7 @@ special(int ch) static int labellen(const unsigned char *lp) -{ +{ int bitlen; unsigned char l = *lp; @@ -1127,7 +1127,7 @@ irc_dn_find(const unsigned char *domain, const unsigned char *rmsg, * * convert this character to lower case if it's upper case. * */ static int -mklower(int ch) +mklower(int ch) { if (ch >= 0x41 && ch <= 0x5A) return(ch + 0x20); diff --git a/libathemecore/servtree.c b/libathemecore/servtree.c index cf10d71617..3073a53a21 100644 --- a/libathemecore/servtree.c +++ b/libathemecore/servtree.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2005-2006 Atheme Development Group - * servtree.c: Services binary tree manipulation. (add_service, + * servtree.c: Services binary tree manipulation. (add_service, * del_service, et al.) * * Permission to use, copy, modify, and/or distribute this software for any diff --git a/libathemecore/svsignore.c b/libathemecore/svsignore.c index a69b041256..293fc18e41 100644 --- a/libathemecore/svsignore.c +++ b/libathemecore/svsignore.c @@ -49,14 +49,14 @@ svsignore_t *svsignore_add(const char *mask, const char *reason) mowgli_node_t *n = mowgli_node_create(); svsignore = smalloc(sizeof(svsignore_t)); - + mowgli_node_add(svsignore, n, &svs_ignore_list); - + svsignore->mask = sstrdup(mask); svsignore->settime = CURRTIME; svsignore->reason = sstrdup(reason); cnt.svsignore++; - + return svsignore; } @@ -74,9 +74,9 @@ svsignore_t *svsignore_add(const char *mask, const char *reason) * * Side Effects: * - none - */ + */ svsignore_t *svsignore_find(user_t *source) -{ +{ svsignore_t *svsignore; mowgli_node_t *n; char host[BUFSIZE]; @@ -90,11 +90,11 @@ svsignore_t *svsignore_find(user_t *source) mowgli_strlcat(host, source->user, BUFSIZE); mowgli_strlcat(host, "@", BUFSIZE); mowgli_strlcat(host, source->host, BUFSIZE); - + MOWGLI_ITER_FOREACH(n, svs_ignore_list.head) { svsignore = (svsignore_t *)n->data; - + if (!match(svsignore->mask, host)) return svsignore; } diff --git a/libathemecore/table.c b/libathemecore/table.c index ccaa5da989..ce47250e70 100644 --- a/libathemecore/table.c +++ b/libathemecore/table.c @@ -205,7 +205,7 @@ void table_render(table_t *t, void (*callback)(const char *line, void *data), vo rc->width = sz; if ((sz = strlen(c->value)) > (size_t)rc->width) - rc->width = sz; + rc->width = sz; } } diff --git a/libathemecore/template.c b/libathemecore/template.c index 5cec2e7438..9651258801 100644 --- a/libathemecore/template.c +++ b/libathemecore/template.c @@ -84,7 +84,7 @@ void clear_global_template_flags(void) if (global_template_dict == NULL) return; - mowgli_patricia_destroy(global_template_dict, release_global_template_data, NULL); + mowgli_patricia_destroy(global_template_dict, release_global_template_data, NULL); global_template_dict = NULL; } diff --git a/libathemecore/uplink.c b/libathemecore/uplink.c index 22b1908b51..b96fa73bb5 100644 --- a/libathemecore/uplink.c +++ b/libathemecore/uplink.c @@ -165,7 +165,7 @@ void uplink_connect(void) /* * uplink_close() - * + * * inputs: * connection pointer of current uplink * triggered by callback close_handler diff --git a/libathemecore/users.c b/libathemecore/users.c index 0ba4d7eb00..b8f261c32e 100644 --- a/libathemecore/users.c +++ b/libathemecore/users.c @@ -81,8 +81,8 @@ void init_users(void) * - if successful, a user is created and added to the users DTree. * - if unsuccessful, a kill has been sent if necessary */ -user_t *user_add(const char *nick, const char *user, const char *host, - const char *vhost, const char *ip, const char *uid, const char *gecos, +user_t *user_add(const char *nick, const char *user, const char *host, + const char *vhost, const char *ip, const char *uid, const char *gecos, server_t *server, time_t ts) { user_t *u, *u2; diff --git a/modules/auth/ldap.c b/modules/auth/ldap.c index f4c89d0035..8070c870e9 100644 --- a/modules/auth/ldap.c +++ b/modules/auth/ldap.c @@ -9,7 +9,7 @@ Supports the following options: url -- required ldap URL (e.g. ldap://host.domain.com/) - + then either: dnformat -- basedn to authenticate against. Use %s to specify where diff --git a/modules/backend/flatfile.c b/modules/backend/flatfile.c index 81eccb3a36..16bab17f2a 100644 --- a/modules/backend/flatfile.c +++ b/modules/backend/flatfile.c @@ -236,15 +236,15 @@ static void flatfile_db_load(const char *filename) target = strtok(NULL, "\n"); mu = myuser_find(user); - + if (!mu) { slog(LG_DEBUG, "db_load(): invalid ignore (MI %s %s)", user,target); continue; } - + strbuf = sstrdup(target); - + mowgli_node_add(strbuf, mowgli_node_create(), &mu->memo_ignores); } else if (!strcmp("AC", item)) @@ -502,7 +502,7 @@ static void flatfile_db_load(const char *filename) if (fl == OLD_CA_AOP && versn < 4) fl = CA_AOP_DEF; - /* + /* * If the database revision is version 6 or newer, CA entries are * timestamped... otherwise we use 0 as the last modified TS * --nenolod/jilles diff --git a/modules/botserv/botserv.h b/modules/botserv/botserv.h index 027ee8149f..c5c1c45d0c 100644 --- a/modules/botserv/botserv.h +++ b/modules/botserv/botserv.h @@ -14,6 +14,6 @@ typedef struct { mowgli_node_t bnode; bool private; time_t registered; -} botserv_bot_t; +} botserv_bot_t; typedef botserv_bot_t *fn_botserv_bot_find(char *name); diff --git a/modules/botserv/bottalk.c b/modules/botserv/bottalk.c index ccbcddb558..e0f562fc5a 100644 --- a/modules/botserv/bottalk.c +++ b/modules/botserv/bottalk.c @@ -47,7 +47,7 @@ static void bs_cmd_say(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_needmoreparams, _("Syntax: SAY <#channel> ")); return; } - + channel_t *c = channel_find(channel); mychan_t *mc = mychan_find(channel); @@ -96,7 +96,7 @@ static void bs_cmd_act(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_needmoreparams, _("Syntax: ACT <#channel> ")); return; } - + channel_t *c = channel_find(channel); mychan_t *mc = mychan_find(channel); diff --git a/modules/botserv/main.c b/modules/botserv/main.c index 59527556a1..d4c4c909a5 100644 --- a/modules/botserv/main.c +++ b/modules/botserv/main.c @@ -297,7 +297,7 @@ static void bs_channel_drop(mychan_t *mc) botserv_bot_t *bot; if ((bot = bs_mychan_find_bot(mc)) == NULL) - return; + return; metadata_delete(mc, "private:botserv:bot-assigned"); metadata_delete(mc, "private:botserv:bot-handle-fantasy"); diff --git a/modules/chanserv/antiflood.c b/modules/chanserv/antiflood.c index 5d7baa3ba1..74863888fe 100644 --- a/modules/chanserv/antiflood.c +++ b/modules/chanserv/antiflood.c @@ -408,7 +408,7 @@ cs_set_cmd_antiflood(sourceinfo_t *si, int parc, char *parv[]) } /* allow opers with PRIV_CHAN_ADMIN to override this setting since it has - oper-specific settings (i.e. AKILL action) */ + oper-specific settings (i.e. AKILL action) */ if (!chanacs_source_has_flag(mc, si, CA_SET) && !has_priv(si, PRIV_CHAN_ADMIN)) { command_fail(si, fault_noprivs, _("You are not authorized to perform this command.")); diff --git a/modules/chanserv/ban.c b/modules/chanserv/ban.c index 04a2f16fe5..4a7c33c413 100644 --- a/modules/chanserv/ban.c +++ b/modules/chanserv/ban.c @@ -68,7 +68,7 @@ static void cs_cmd_ban(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_noprivs, _("You are not authorized to perform this operation.")); return; } - + if (metadata_find(mc, "private:close:closer")) { command_fail(si, fault_noprivs, _("\2%s\2 is closed."), channel); diff --git a/modules/chanserv/clear.c b/modules/chanserv/clear.c index c96681580f..32c5b3924b 100644 --- a/modules/chanserv/clear.c +++ b/modules/chanserv/clear.c @@ -67,7 +67,7 @@ static void cs_cmd_clear(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_needmoreparams, _("Syntax: CLEAR <#channel> [parameters]")); return; } - + if (parv[0][0] == '#') chan = parv[0], cmd = parv[1]; else if (parv[1][0] == '#') diff --git a/modules/chanserv/clear_akicks.c b/modules/chanserv/clear_akicks.c index f46ea27b85..b433afa6c7 100644 --- a/modules/chanserv/clear_akicks.c +++ b/modules/chanserv/clear_akicks.c @@ -53,7 +53,7 @@ static void cs_cmd_clear_akicks(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_nosuch_target, "\2%s\2 is not registered.", name); return; } - + if (metadata_find(mc, "private:close:closer")) { command_fail(si, fault_noprivs, "\2%s\2 is closed.", name); diff --git a/modules/chanserv/clear_bans.c b/modules/chanserv/clear_bans.c index e0df1fd8d1..378ebdfdbf 100644 --- a/modules/chanserv/clear_bans.c +++ b/modules/chanserv/clear_bans.c @@ -80,7 +80,7 @@ static void cs_cmd_clear_bans(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_noprivs, _("You are not authorized to perform this operation.")); return; } - + if (metadata_find(mc, "private:close:closer")) { command_fail(si, fault_noprivs, _("\2%s\2 is closed."), parv[0]); diff --git a/modules/chanserv/clear_flags.c b/modules/chanserv/clear_flags.c index 75c116ce5d..3f8141c9e5 100644 --- a/modules/chanserv/clear_flags.c +++ b/modules/chanserv/clear_flags.c @@ -53,7 +53,7 @@ static void cs_cmd_clear_flags(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_nosuch_target, "\2%s\2 is not registered.", name); return; } - + if (metadata_find(mc, "private:close:closer")) { command_fail(si, fault_noprivs, "\2%s\2 is closed.", name); diff --git a/modules/chanserv/clear_users.c b/modules/chanserv/clear_users.c index 2f8f5a1946..6ef66ef917 100644 --- a/modules/chanserv/clear_users.c +++ b/modules/chanserv/clear_users.c @@ -67,7 +67,7 @@ static void cs_cmd_clear_users(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_noprivs, _("You are not authorized to perform this operation.")); return; } - + if (metadata_find(mc, "private:close:closer")) { command_fail(si, fault_noprivs, _("\2%s\2 is closed."), channel); diff --git a/modules/chanserv/clone.c b/modules/chanserv/clone.c index eca07e8b6c..4884e452cc 100644 --- a/modules/chanserv/clone.c +++ b/modules/chanserv/clone.c @@ -51,7 +51,7 @@ static void cs_cmd_clone(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_nosuch_target, "\2%s\2 is not registered.", source); return; } - + if (!(mc2 = mychan_find(target))) { command_fail(si, fault_nosuch_target, "\2%s\2 is not registered.", target); @@ -63,13 +63,13 @@ static void cs_cmd_clone(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_nochange, "Cannot clone a channel to itself."); return; } - + if (metadata_find(mc, "private:close:closer")) { command_fail(si, fault_noprivs, "\2%s\2 is closed.", source); return; } - + if (metadata_find(mc2, "private:close:closer")) { command_fail(si, fault_noprivs, "\2%s\2 is closed.", target); @@ -81,7 +81,7 @@ static void cs_cmd_clone(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_nosuch_target, "\2%s\2 does not exist.", source); return; } - + if (!mc2->chan) { command_fail(si, fault_nosuch_target, "\2%s\2 does not exist.", target); @@ -93,7 +93,7 @@ static void cs_cmd_clone(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_noprivs, "You are not authorized to perform this operation."); return; } - + if (!chanacs_source_has_flag(mc2, si, CA_FOUNDER)) { command_fail(si, fault_noprivs, "You are not authorized to perform this operation."); diff --git a/modules/chanserv/count.c b/modules/chanserv/count.c index 96816c1e14..c399f69007 100644 --- a/modules/chanserv/count.c +++ b/modules/chanserv/count.c @@ -67,7 +67,7 @@ static void cs_cmd_count(sourceinfo_t *si, int parc, char *parv[]) return; } } - + if (metadata_find(mc, "private:close:closer")) { command_fail(si, fault_noprivs, _("\2%s\2 is closed."), chan); diff --git a/modules/chanserv/fflags.c b/modules/chanserv/fflags.c index e0458c6d9c..52edc5227f 100644 --- a/modules/chanserv/fflags.c +++ b/modules/chanserv/fflags.c @@ -56,7 +56,7 @@ static void cs_cmd_fflags(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_nosuch_target, _("Channel \2%s\2 is not registered."), channel); return; } - + if (*flagstr == '+' || *flagstr == '-' || *flagstr == '=') { flags_make_bitmasks(flagstr, &addflags, &removeflags); diff --git a/modules/chanserv/ftransfer.c b/modules/chanserv/ftransfer.c index 283cf31af0..b61bab92a3 100644 --- a/modules/chanserv/ftransfer.c +++ b/modules/chanserv/ftransfer.c @@ -19,7 +19,7 @@ static void cs_cmd_ftransfer(sourceinfo_t *si, int parc, char *parv[]); command_t cs_ftransfer = { "FTRANSFER", N_("Forces foundership transfer of a channel."), PRIV_CHAN_ADMIN, 2, cs_cmd_ftransfer, { .path = "cservice/ftransfer" } }; - + void _modinit(module_t *m) { service_named_bind_command("chanserv", &cs_ftransfer); @@ -58,7 +58,7 @@ static void cs_cmd_ftransfer(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_nosuch_target, _("Channel \2%s\2 is not registered."), name); return; } - + oldfndr = mychan_founder_names(mc); if (!strcmp(mt->name, oldfndr)) { diff --git a/modules/chanserv/halfop.c b/modules/chanserv/halfop.c index 3fc7100319..d2e0265586 100644 --- a/modules/chanserv/halfop.c +++ b/modules/chanserv/halfop.c @@ -74,7 +74,7 @@ static void cmd_halfop(sourceinfo_t *si, bool halfopping, int parc, char *parv[] command_fail(si, fault_noprivs, _("You are not authorized to perform this operation.")); return; } - + if (metadata_find(mc, "private:close:closer")) { command_fail(si, fault_noprivs, _("\2%s\2 is closed."), chan); diff --git a/modules/chanserv/help.c b/modules/chanserv/help.c index c3607a9ad1..f3ba86d3f8 100644 --- a/modules/chanserv/help.c +++ b/modules/chanserv/help.c @@ -86,7 +86,7 @@ static void cs_cmd_help(sourceinfo_t *si, int parc, char *parv[]) /* Fun for helpchan/helpurl. */ if (config_options.helpchan && config_options.helpurl) - command_success_nodata(si, _("If you're having trouble or you need some additional help, you may want to join the help channel %s or visit the help webpage %s"), + command_success_nodata(si, _("If you're having trouble or you need some additional help, you may want to join the help channel %s or visit the help webpage %s"), config_options.helpchan, config_options.helpurl); else if (config_options.helpchan && !config_options.helpurl) command_success_nodata(si, _("If you're having trouble or you need some additional help, you may want to join the help channel %s"), config_options.helpchan); diff --git a/modules/chanserv/hold.c b/modules/chanserv/hold.c index bb8a8073df..f2d1e40ef3 100644 --- a/modules/chanserv/hold.c +++ b/modules/chanserv/hold.c @@ -54,7 +54,7 @@ static void cs_cmd_hold(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_nosuch_target, _("Channel \2%s\2 is not registered."), target); return; } - + if (!strcasecmp(action, "ON")) { if (mc->flags & MC_HOLD) diff --git a/modules/chanserv/info.c b/modules/chanserv/info.c index 70c8287eec..e48af275df 100644 --- a/modules/chanserv/info.c +++ b/modules/chanserv/info.c @@ -125,7 +125,7 @@ static void cs_cmd_info(sourceinfo_t *si, int parc, char *parv[]) if (!hide_info && (md = metadata_find(mc, "email"))) command_success_nodata(si, "Email : %s", md->value); - if ((!hide_info || (si->su != NULL && chanuser_find(mc->chan, si->su))) && + if ((!hide_info || (si->su != NULL && chanuser_find(mc->chan, si->su))) && (md = metadata_find(mc, "private:entrymsg"))) command_success_nodata(si, "Entrymsg : %s", md->value); @@ -204,7 +204,7 @@ static void cs_cmd_info(sourceinfo_t *si, int parc, char *parv[]) strcat(buf, "GUARD"); } - + if (MC_ANTIFLOOD & mc->flags) { if (*buf) diff --git a/modules/chanserv/invite.c b/modules/chanserv/invite.c index bcc53710d2..91bc83ca8b 100644 --- a/modules/chanserv/invite.c +++ b/modules/chanserv/invite.c @@ -19,7 +19,7 @@ static void cs_cmd_invite(sourceinfo_t *si, int parc, char *parv[]); command_t cs_invite = { "INVITE", N_("Invites you to a channel."), AC_NONE, 1, cs_cmd_invite, { .path = "cservice/invite" } }; - + void _modinit(module_t *m) { service_named_bind_command("chanserv", &cs_invite); @@ -73,7 +73,7 @@ static void cs_cmd_invite(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_noprivs, _("You are not authorized to perform this operation.")); return; } - + if (!mc->chan) { command_fail(si, fault_nosuch_target, _("\2%s\2 is currently empty."), mc->name); diff --git a/modules/chanserv/list.c b/modules/chanserv/list.c index e423bfcdbc..b4ad55247e 100644 --- a/modules/chanserv/list.c +++ b/modules/chanserv/list.c @@ -111,7 +111,7 @@ static void process_parvarray(list_option_t *opts, size_t optsize, int parc, cha *opts[j].optval.ageval = parse_age(parv[i + 1]); i++; } - break; + break; default: break; } diff --git a/modules/chanserv/mark.c b/modules/chanserv/mark.c index b2314b2dc0..1d2497e823 100644 --- a/modules/chanserv/mark.c +++ b/modules/chanserv/mark.c @@ -55,7 +55,7 @@ static void cs_cmd_mark(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_nosuch_target, _("Channel \2%s\2 is not registered."), target); return; } - + if (!strcasecmp(action, "ON")) { if (!info) diff --git a/modules/chanserv/moderate.c b/modules/chanserv/moderate.c index a8bc8f56ef..e8131cb590 100644 --- a/modules/chanserv/moderate.c +++ b/modules/chanserv/moderate.c @@ -304,7 +304,7 @@ static void cs_cmd_reject(sourceinfo_t *si, int parc, char *parv[]) { csreq_t *cs; myuser_t *mu; - + if (!parv[0]) { command_fail(si, fault_needmoreparams, STR_INSUFFICIENT_PARAMS, "REJECT"); diff --git a/modules/chanserv/owner.c b/modules/chanserv/owner.c index 92b2ccae6a..de781a6671 100644 --- a/modules/chanserv/owner.c +++ b/modules/chanserv/owner.c @@ -74,7 +74,7 @@ static void cmd_owner(sourceinfo_t *si, bool ownering, int parc, char *parv[]) command_fail(si, fault_noprivs, _("You are not authorized to perform this operation.")); return; } - + if (metadata_find(mc, "private:close:closer")) { command_fail(si, fault_noprivs, _("\2%s\2 is closed."), chan); diff --git a/modules/chanserv/protect.c b/modules/chanserv/protect.c index e2904670c2..97cb200a4b 100644 --- a/modules/chanserv/protect.c +++ b/modules/chanserv/protect.c @@ -74,7 +74,7 @@ static void cmd_protect(sourceinfo_t *si, bool protecting, int parc, char *parv[ command_fail(si, fault_noprivs, _("You are not authorized to perform this operation.")); return; } - + if (metadata_find(mc, "private:close:closer")) { command_fail(si, fault_noprivs, _("\2%s\2 is closed."), chan); diff --git a/modules/chanserv/quiet.c b/modules/chanserv/quiet.c index 59189d7c79..c51ceea128 100644 --- a/modules/chanserv/quiet.c +++ b/modules/chanserv/quiet.c @@ -284,7 +284,7 @@ static void cs_cmd_quiet(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_noprivs, _("You are not authorized to perform this operation.")); return; } - + if (metadata_find(mc, "private:close:closer")) { command_fail(si, fault_noprivs, _("\2%s\2 is closed."), channel); diff --git a/modules/chanserv/recover.c b/modules/chanserv/recover.c index 9d0e465e79..40b27acafa 100644 --- a/modules/chanserv/recover.c +++ b/modules/chanserv/recover.c @@ -55,7 +55,7 @@ static void cs_cmd_recover(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_nosuch_target, _("Channel \2%s\2 is not registered."), name); return; } - + if (metadata_find(mc, "private:close:closer")) { command_fail(si, fault_noprivs, _("\2%s\2 is closed."), name); diff --git a/modules/chanserv/register.c b/modules/chanserv/register.c index 0ccc2f0f0c..2a133a07f0 100644 --- a/modules/chanserv/register.c +++ b/modules/chanserv/register.c @@ -71,7 +71,7 @@ static void cs_cmd_register(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_notverified, _("You need to verify your email address before you may register channels.")); return; } - + /* make sure it isn't already registered */ if ((mc = mychan_find(name))) { diff --git a/modules/chanserv/set.c b/modules/chanserv/set.c index 7c92b0d1a8..8bf22ff793 100644 --- a/modules/chanserv/set.c +++ b/modules/chanserv/set.c @@ -2,7 +2,7 @@ * Copyright (c) 2003-2004 E. Will et al. * Rights to this code are documented in doc/LICENSE. * - * This file is a meta-module for compatibility with + * This file is a meta-module for compatibility with * old setups pre-SET split. * */ diff --git a/modules/chanserv/set_founder.c b/modules/chanserv/set_founder.c index 2ead09faca..11e306d63f 100644 --- a/modules/chanserv/set_founder.c +++ b/modules/chanserv/set_founder.c @@ -102,7 +102,7 @@ static void cs_cmd_set_founder(sourceinfo_t *si, int parc, char *parv[]) { mowgli_node_t *n; chanacs_t *ca; - + /* Duplicates the check below. We check below for user * convenience, but we need to check here as well to * avoid a verify/use bug that can cause us to make the diff --git a/modules/chanserv/set_prefix.c b/modules/chanserv/set_prefix.c index 5d724da72f..9e9b3de259 100644 --- a/modules/chanserv/set_prefix.c +++ b/modules/chanserv/set_prefix.c @@ -15,7 +15,7 @@ DECLARE_MODULE_V1 "Atheme Development Group " ); -static void cs_set_prefix_config_ready(void *unused); +static void cs_set_prefix_config_ready(void *unused); static void cs_cmd_set_prefix(sourceinfo_t *si, int parc, char *parv[]); command_t cs_set_prefix = { "PREFIX", N_("Sets the channel PREFIX."), AC_NONE, 2, cs_cmd_set_prefix, { .path = "cservice/set_prefix" } }; @@ -29,7 +29,7 @@ void _modinit(module_t *m) command_add(&cs_set_prefix, *cs_set_cmdtree); hook_add_event("config_ready"); - hook_add_config_ready(cs_set_prefix_config_ready); + hook_add_config_ready(cs_set_prefix_config_ready); } void _moddeinit(module_unload_intent_t intent) @@ -78,8 +78,8 @@ static void cs_cmd_set_prefix(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_noprivs, _("You are not authorized to execute this command.")); return; } - - if (!prefix || !strcasecmp(prefix, "DEFAULT")) + + if (!prefix || !strcasecmp(prefix, "DEFAULT")) { metadata_delete(mc, "private:prefix"); logcommand(si, CMDLOG_SET, "SET:PREFIX: \2%s\2 reset", mc->name); diff --git a/modules/chanserv/status.c b/modules/chanserv/status.c index 1c0b82c4f3..49b72f5b51 100644 --- a/modules/chanserv/status.c +++ b/modules/chanserv/status.c @@ -52,7 +52,7 @@ static void cs_cmd_status(sourceinfo_t *si, int parc, char *parv[]) } logcommand(si, CMDLOG_GET, "STATUS: \2%s\2", mc->name); - + if (metadata_find(mc, "private:close:closer")) { command_fail(si, fault_noprivs, _("\2%s\2 is closed."), chan); diff --git a/modules/chanserv/taxonomy.c b/modules/chanserv/taxonomy.c index b0738f7552..7bf0b14b16 100644 --- a/modules/chanserv/taxonomy.c +++ b/modules/chanserv/taxonomy.c @@ -19,7 +19,7 @@ static void cs_cmd_taxonomy(sourceinfo_t *si, int parc, char *parv[]); command_t cs_taxonomy = { "TAXONOMY", N_("Displays a channel's metadata."), AC_NONE, 1, cs_cmd_taxonomy, { .path = "cservice/taxonomy" } }; - + void _modinit(module_t *m) { service_named_bind_command("chanserv", &cs_taxonomy); diff --git a/modules/chanserv/template.c b/modules/chanserv/template.c index 28e73e54c2..aca14f51ec 100644 --- a/modules/chanserv/template.c +++ b/modules/chanserv/template.c @@ -99,7 +99,7 @@ static void cs_cmd_template(sourceinfo_t *si, int parc, char *parv[]) return; } } - + if (metadata_find(mc, "private:close:closer") && !has_priv(si, PRIV_CHAN_AUSPEX)) { command_fail(si, fault_noprivs, _("\2%s\2 is closed."), channel); @@ -160,7 +160,7 @@ static void cs_cmd_template(sourceinfo_t *si, int parc, char *parv[]) } restrictflags = allow_flags(mc, restrictflags); } - + if (metadata_find(mc, "private:close:closer")) { command_fail(si, fault_noprivs, _("\2%s\2 is closed."), channel); diff --git a/modules/chanserv/topic.c b/modules/chanserv/topic.c index 100e485d13..f5dbe06003 100644 --- a/modules/chanserv/topic.c +++ b/modules/chanserv/topic.c @@ -62,7 +62,7 @@ static void cs_cmd_topic(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_nosuch_target, _("Channel \2%s\2 is not registered."), chan); return; } - + c = channel_find(chan); if (!c) { @@ -139,7 +139,7 @@ static void cs_cmd_topicappend(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_noprivs, _("You are not authorized to perform this operation.")); return; } - + if (metadata_find(mc, "private:close:closer")) { command_fail(si, fault_noprivs, _("\2%s\2 is closed."), chan); @@ -214,7 +214,7 @@ static void cs_cmd_topicprepend(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_noprivs, _("You are not authorized to perform this operation.")); return; } - + if (metadata_find(mc, "private:close:closer")) { command_fail(si, fault_noprivs, _("\2%s\2 is closed."), chan); diff --git a/modules/chanserv/voice.c b/modules/chanserv/voice.c index f4e19ed3b3..521cf0621e 100644 --- a/modules/chanserv/voice.c +++ b/modules/chanserv/voice.c @@ -62,7 +62,7 @@ static void cmd_voice(sourceinfo_t *si, bool voicing, int parc, char *parv[]) command_fail(si, fault_noprivs, _("You are not authorized to perform this operation.")); return; } - + if (metadata_find(mc, "private:close:closer")) { command_fail(si, fault_noprivs, _("\2%s\2 is closed."), chan); diff --git a/modules/chanserv/why.c b/modules/chanserv/why.c index 09f873bff7..2c76adcee3 100644 --- a/modules/chanserv/why.c +++ b/modules/chanserv/why.c @@ -72,7 +72,7 @@ static void cs_cmd_why(sourceinfo_t *si, int parc, char *parv[]) chan); return; } - + if (!chanacs_source_has_flag(mc, si, CA_ACLVIEW)) { if (has_priv(si, PRIV_CHAN_AUSPEX)) @@ -103,7 +103,7 @@ static void cs_cmd_why(sourceinfo_t *si, int parc, char *parv[]) continue; vt = myentity_get_chanacs_validator(ca->entity); if (ca->entity == entity(u->myuser) || - (vt->match_user != NULL ? + (vt->match_user != NULL ? vt->match_user(ca, u) != NULL : u->myuser != NULL && vt->match_entity(ca, entity(u->myuser)) != NULL)) diff --git a/modules/crypto/ircservices.c b/modules/crypto/ircservices.c index f5b3821963..a7bfb145b6 100644 --- a/modules/crypto/ircservices.c +++ b/modules/crypto/ircservices.c @@ -13,9 +13,9 @@ * Please read COPYING and README for furhter details. * * Based on the original code of Epona by Lara. - * Based on the original code of Services by Andy Church. - * - * $\Id: myencrypt.c 5 2004-03-29 01:29:50Z dane $ + * Based on the original code of Services by Andy Church. + * + * $\Id: myencrypt.c 5 2004-03-29 01:29:50Z dane $ * */ diff --git a/modules/exttarget/chanacs.c b/modules/exttarget/chanacs.c index b4ec570874..4c74eefbd1 100644 --- a/modules/exttarget/chanacs.c +++ b/modules/exttarget/chanacs.c @@ -2,7 +2,7 @@ * Copyright (c) 2011 William Pitcock * * Rights to this code are as documented in doc/LICENSE. - * + * * $chanacs:#channel gives flags to users in /cs flags #channel if * the user has flags in the $chanacs:#channel */ diff --git a/modules/gameserv/dice.c b/modules/gameserv/dice.c index c27177a3d7..5c01b41078 100644 --- a/modules/gameserv/dice.c +++ b/modules/gameserv/dice.c @@ -1,7 +1,7 @@ /* * Copyright (c) 2005-2007 William Pitcock * Copyright (c) 2006-2007 Jilles Tjoelker - * + * * Rights to this code are documented in doc/LICENSE. * * Dice generator. @@ -58,10 +58,10 @@ int is_calcoper(char oper); // ! = Logical NOT | // d = Dice Generator, LOL. | [Rank 5] // | & = Bitwise AND -// [Rank 2] | +// [Rank 2] | // ^ = Power | [Rank 6] // | $ = Bitwise XOR (eXclusive OR) -// [Rank 3] | +// [Rank 3] | // * / = Multiply / Divide | [Rank 7] // % \ = Modulus / Integer-divide | | = Bitwise inclusive OR // diff --git a/modules/gameserv/gamecalc.c b/modules/gameserv/gamecalc.c index 728bf152bf..554ed7d01f 100644 --- a/modules/gameserv/gamecalc.c +++ b/modules/gameserv/gamecalc.c @@ -1,7 +1,7 @@ /* * Copyright (c) 2005-2007 William Pitcock * Copyright (c) 2006-2007 Jilles Tjoelker - * + * * Rights to this code are documented in doc/LICENSE. * * Dice generator. diff --git a/modules/gameserv/happyfarm.c b/modules/gameserv/happyfarm.c index e3855ddad7..701c1870cd 100644 --- a/modules/gameserv/happyfarm.c +++ b/modules/gameserv/happyfarm.c @@ -149,7 +149,7 @@ mowgli_list_t happy_plot_list = { NULL, NULL, 0 }; */ typedef struct { /* - * As previously mentioned, a plot of land contains seeds. All seeds on a + * As previously mentioned, a plot of land contains seeds. All seeds on a * plot of land are the same type. So, plot::plant == PLANT_CORN means * you're growing corn. */ diff --git a/modules/global/main.c b/modules/global/main.c index 1bae1ceb6f..f082a29617 100644 --- a/modules/global/main.c +++ b/modules/global/main.c @@ -142,7 +142,7 @@ static void gs_cmd_global(sourceinfo_t *si, const int parc, char *parv[]) return; } - + if (!strcasecmp("LIST", params)) { if (!globlist.count) diff --git a/modules/groupserv/acsnolimit.c b/modules/groupserv/acsnolimit.c index 4ee659f50e..8ec498b12a 100644 --- a/modules/groupserv/acsnolimit.c +++ b/modules/groupserv/acsnolimit.c @@ -36,7 +36,7 @@ static void gs_cmd_acsnolimit(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_nosuch_target, _("The group \2%s\2 does not exist."), parv[0]); return; } - + if (!strcasecmp(parv[1], "ON")) { if (mg->flags & MG_ACSNOLIMIT) diff --git a/modules/groupserv/drop.c b/modules/groupserv/drop.c index 1283b72926..ba05359e9f 100644 --- a/modules/groupserv/drop.c +++ b/modules/groupserv/drop.c @@ -41,7 +41,7 @@ static void gs_cmd_drop(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_badparams, _("Syntax: DROP ")); return; } - + if (!(mg = mygroup_find(name))) { command_fail(si, fault_nosuch_target, _("Group \2%s\2 does not exist."), name); diff --git a/modules/groupserv/fflags.c b/modules/groupserv/fflags.c index 99964b6e56..90fd7ac8d6 100644 --- a/modules/groupserv/fflags.c +++ b/modules/groupserv/fflags.c @@ -40,7 +40,7 @@ static void gs_cmd_fflags(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_nosuch_target, _("The group \2%s\2 does not exist."), parv[0]); return; } - + if (si->smu == NULL) { command_fail(si, fault_noprivs, _("You are not logged in.")); @@ -69,7 +69,7 @@ static void gs_cmd_fflags(sourceinfo_t *si, int parc, char *parv[]) logcommand(si, CMDLOG_ADMIN, "FFLAGS:REMOVE: \2%s\2 on \2%s\2", entity(mu)->name, entity(mg)->name); return; } - else + else { if (MOWGLI_LIST_LENGTH(&mg->acs) > gs_config->maxgroupacs && (!(mg->flags & MG_ACSNOLIMIT))) { diff --git a/modules/groupserv/flags.c b/modules/groupserv/flags.c index aad51c524d..a15e122751 100644 --- a/modules/groupserv/flags.c +++ b/modules/groupserv/flags.c @@ -43,7 +43,7 @@ static void gs_cmd_flags(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_nosuch_target, _("The group \2%s\2 does not exist."), parv[0]); return; } - + if (!groupacs_sourceinfo_has_flag(mg, si, GA_FLAGS)) { if (has_priv(si, PRIV_GROUP_AUSPEX)) @@ -167,7 +167,7 @@ static void gs_cmd_flags(sourceinfo_t *si, int parc, char *parv[]) logcommand(si, CMDLOG_SET, "FLAGS:REMOVE: \2%s\2 on \2%s\2", entity(mu)->name, entity(mg)->name); return; } - else + else { if (MOWGLI_LIST_LENGTH(&mg->acs) > gs_config->maxgroupacs && (!(mg->flags & MG_ACSNOLIMIT))) { diff --git a/modules/groupserv/info.c b/modules/groupserv/info.c index 628cd5b266..5b30cd3008 100644 --- a/modules/groupserv/info.c +++ b/modules/groupserv/info.c @@ -73,7 +73,7 @@ static void gs_cmd_info(sourceinfo_t *si, int parc, char *parv[]) mowgli_strlcat(buf, "ACSNOLIMIT", BUFSIZE); } - + if (mg->flags & MG_OPEN) { if (*buf) diff --git a/modules/groupserv/invite.c b/modules/groupserv/invite.c index 219a2f29e6..4bf3b05008 100644 --- a/modules/groupserv/invite.c +++ b/modules/groupserv/invite.c @@ -46,7 +46,7 @@ static void gs_cmd_invite(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_nosuch_target, _("The group \2%s\2 does not exist."), group); return; } - + if (!groupacs_sourceinfo_has_flag(mg, si, GA_INVITE)) { command_fail(si, fault_noprivs, _("You are not authorized to perform this operation.")); diff --git a/modules/groupserv/join.c b/modules/groupserv/join.c index 0f60787bb1..bed8d8b0af 100644 --- a/modules/groupserv/join.c +++ b/modules/groupserv/join.c @@ -48,7 +48,7 @@ static void gs_cmd_join(sourceinfo_t *si, int parc, char *parv[]) else invited = false; } - + if (!(mg->flags & MG_OPEN) && !invited) { command_fail(si, fault_noprivs, _("Group \2%s\2 is not open to anyone joining."), parv[0]); diff --git a/modules/groupserv/main/groupserv.c b/modules/groupserv/main/groupserv.c index 7192079a64..4ad33ec164 100644 --- a/modules/groupserv/main/groupserv.c +++ b/modules/groupserv/main/groupserv.c @@ -223,7 +223,7 @@ mowgli_list_t *myuser_get_membership_list(myuser_t *mu) l = mowgli_list_create(); privatedata_set(mu, "groupserv:membership", l); - return l; + return l; } const char *mygroup_founder_names(mygroup_t *mg) diff --git a/modules/groupserv/main/validation.c b/modules/groupserv/main/validation.c index 765c6bf32d..3f8d1354e1 100644 --- a/modules/groupserv/main/validation.c +++ b/modules/groupserv/main/validation.c @@ -11,7 +11,7 @@ static chanacs_t *mygroup_chanacs_match_entity(chanacs_t *ca, myentity_t *mt) mg = group(ca->entity); return_val_if_fail(mg != NULL, NULL); - + if (!isuser(mt)) return NULL; diff --git a/modules/groupserv/register.c b/modules/groupserv/register.c index e4ccf4ba85..fb66fa1f16 100644 --- a/modules/groupserv/register.c +++ b/modules/groupserv/register.c @@ -66,7 +66,7 @@ static void gs_cmd_register(sourceinfo_t *si, int parc, char *parv[]) mg = mygroup_add(parv[0]); groupacs_add(mg, si->smu, GA_ALL | GA_FOUNDER); - logcommand(si, CMDLOG_REGISTER, "REGISTER: \2%s\2", entity(mg)->name); + logcommand(si, CMDLOG_REGISTER, "REGISTER: \2%s\2", entity(mg)->name); command_success_nodata(si, _("The group \2%s\2 has been registered to \2%s\2."), entity(mg)->name, entity(si->smu)->name); } diff --git a/modules/groupserv/regnolimit.c b/modules/groupserv/regnolimit.c index 0c6daee875..528d3fea7e 100644 --- a/modules/groupserv/regnolimit.c +++ b/modules/groupserv/regnolimit.c @@ -37,7 +37,7 @@ static void gs_cmd_regnolimit(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_nosuch_target, _("The group \2%s\2 does not exist."), parv[0]); return; } - + if (!strcasecmp(parv[1], "ON")) { if (mg->flags & MG_REGNOLIMIT) diff --git a/modules/groupserv/set_channel.c b/modules/groupserv/set_channel.c index 3132f9f3a1..ad73b451de 100644 --- a/modules/groupserv/set_channel.c +++ b/modules/groupserv/set_channel.c @@ -31,7 +31,7 @@ static void gs_cmd_set_channel(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_nosuch_target, _("Group \2%s\2 does not exist."), parv[0]); return; } - + if (!groupacs_sourceinfo_has_flag(mg, si, GA_SET)) { command_fail(si, fault_noprivs, _("You are not authorized to execute this command.")); diff --git a/modules/groupserv/set_description.c b/modules/groupserv/set_description.c index 1163392d9d..bb77f5f201 100644 --- a/modules/groupserv/set_description.c +++ b/modules/groupserv/set_description.c @@ -30,7 +30,7 @@ static void gs_cmd_set_description(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_nosuch_target, _("Group \2%s\2 does not exist."), parv[0]); return; } - + if (!groupacs_sourceinfo_has_flag(mg, si, GA_SET)) { command_fail(si, fault_noprivs, _("You are not authorized to execute this command.")); diff --git a/modules/groupserv/set_email.c b/modules/groupserv/set_email.c index e1d60258e4..0afcf0d753 100644 --- a/modules/groupserv/set_email.c +++ b/modules/groupserv/set_email.c @@ -30,7 +30,7 @@ static void gs_cmd_set_email(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_nosuch_target, _("Group \2%s\2 does not exist."), parv[0]); return; } - + if (!groupacs_sourceinfo_has_flag(mg, si, GA_SET)) { command_fail(si, fault_noprivs, _("You are not authorized to execute this command.")); diff --git a/modules/groupserv/set_joinflags.c b/modules/groupserv/set_joinflags.c index 76d1ffa1ab..26e5a63255 100644 --- a/modules/groupserv/set_joinflags.c +++ b/modules/groupserv/set_joinflags.c @@ -31,7 +31,7 @@ static void gs_cmd_set_joinflags(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_nosuch_target, _("Group \2%s\2 does not exist."), parv[0]); return; } - + if (!groupacs_sourceinfo_has_flag(mg, si, GA_SET)) { command_fail(si, fault_noprivs, _("You are not authorized to execute this command.")); diff --git a/modules/groupserv/set_open.c b/modules/groupserv/set_open.c index 1daf573b3c..23ef419923 100644 --- a/modules/groupserv/set_open.c +++ b/modules/groupserv/set_open.c @@ -36,7 +36,7 @@ static void gs_cmd_set_open(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_nosuch_target, _("The group \2%s\2 does not exist."), parv[0]); return; } - + if (!groupacs_sourceinfo_has_flag(mg, si, GA_FOUNDER)) { command_fail(si, fault_noprivs, _("You are not authorized to execute this command.")); diff --git a/modules/groupserv/set_public.c b/modules/groupserv/set_public.c index b2ef777866..80d05d54a4 100644 --- a/modules/groupserv/set_public.c +++ b/modules/groupserv/set_public.c @@ -36,7 +36,7 @@ static void gs_cmd_set_public(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_nosuch_target, _("The group \2%s\2 does not exist."), parv[0]); return; } - + if (!groupacs_sourceinfo_has_flag(mg, si, GA_FOUNDER)) { command_fail(si, fault_noprivs, _("You are not authorized to execute this command.")); diff --git a/modules/groupserv/set_url.c b/modules/groupserv/set_url.c index 7c1eebce29..72ec2d64d0 100644 --- a/modules/groupserv/set_url.c +++ b/modules/groupserv/set_url.c @@ -30,7 +30,7 @@ static void gs_cmd_set_url(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_nosuch_target, _("Group \2%s\2 does not exist."), parv[0]); return; } - + if (!groupacs_sourceinfo_has_flag(mg, si, GA_SET)) { command_fail(si, fault_noprivs, _("You are not authorized to execute this command.")); diff --git a/modules/helpserv/helpme.c b/modules/helpserv/helpme.c index 67b1620014..ea905c3a68 100644 --- a/modules/helpserv/helpme.c +++ b/modules/helpserv/helpme.c @@ -46,7 +46,7 @@ static void helpserv_cmd_helpme(sourceinfo_t *si, int parc, char *parv[]) slog(LG_INFO, "HELPME:THROTTLED: %s", si->su->nick); return; } - + if (si->smu != NULL && metadata_find(si->smu, "private:restrict:setter")) { command_fail(si, fault_noprivs, _("You have been restricted from requesting help by network staff.")); diff --git a/modules/hostserv/hostserv.h b/modules/hostserv/hostserv.h index 34e1f28d41..147e398f8c 100644 --- a/modules/hostserv/hostserv.h +++ b/modules/hostserv/hostserv.h @@ -16,7 +16,7 @@ typedef struct { * Inputs: * - User to set a vHost on * - a vHost - * + * * Outputs: * - none * @@ -43,7 +43,7 @@ static inline void do_sethost(user_t *u, const char *host) * Inputs: * - an account name * - a vHost - * + * * Outputs: * - none * diff --git a/modules/hostserv/request.c b/modules/hostserv/request.c index b57e4e5d0d..e0b1c1e90c 100644 --- a/modules/hostserv/request.c +++ b/modules/hostserv/request.c @@ -431,7 +431,7 @@ static void hs_cmd_reject(sourceinfo_t *si, int parc, char *parv[]) else notice(si->service->nick, u->nick, "[auto memo] Your requested vhost \2%s\2 for nick \2%s\2 has been rejected.", l->vhost, nick); } - + if (reason) logcommand(si, CMDLOG_REQUEST, "REJECT: \2%s\2 for \2%s\2, Reason: \2%s\2", l->vhost, nick, reason); else @@ -444,7 +444,7 @@ static void hs_cmd_reject(sourceinfo_t *si, int parc, char *parv[]) free(l); return; } - + if (!irccasecmp("*", nick)) { if ((svs = service_find("memoserv")) != NULL) @@ -463,7 +463,7 @@ static void hs_cmd_reject(sourceinfo_t *si, int parc, char *parv[]) else notice(si->service->nick, u->nick, "[auto memo] Your requested vhost \2%s\2 for nick \2%s\2 has been rejected.", l->vhost, nick); } - + if (reason) logcommand(si, CMDLOG_REQUEST, "REJECT: \2%s\2 for \2%s\2, Reason: \2%s\2", l->vhost, l->nick, reason); else diff --git a/modules/infoserv/main.c b/modules/infoserv/main.c index 90154c4b18..a2979a59fe 100644 --- a/modules/infoserv/main.c +++ b/modules/infoserv/main.c @@ -5,7 +5,7 @@ * This file contains the main() routine. * * We're basically re-implementing everything to support - * oper info messages. Yes, I know this is a bit ugly, but + * oper info messages. Yes, I know this is a bit ugly, but * I can't think of a saner way that is efficient, avoids a * few bugs and doesn't break people's existing InfoServ DB entries. * @@ -92,7 +92,7 @@ void is_cmd_help(sourceinfo_t *si, int parc, char *parv[]) static void underscores_to_spaces(char *y) { - do + do { if(*y == '_') *y = ' '; @@ -186,7 +186,7 @@ static void display_info(hook_user_nick_t *data) MOWGLI_ITER_FOREACH_PREV(n, logon_info.tail) { l = n->data; - + char *y = sstrdup(l->subject); underscores_to_spaces(y); @@ -232,7 +232,7 @@ static void display_oper_info(user_t *u) MOWGLI_ITER_FOREACH_PREV(n, operlogon_info.tail) { o = n->data; - + char *y = sstrdup(o->subject); underscores_to_spaces(y); @@ -292,7 +292,7 @@ static void is_cmd_post(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_badparams, _("Importance must be a digit between 0 and 4")); return; } - + char *y = sstrdup(subject); underscores_to_spaces(y); @@ -472,7 +472,7 @@ static void is_cmd_list(sourceinfo_t *si, int parc, char *parv[]) tm = *localtime(&l->info_ts); strftime(dBuf, BUFSIZE, "%H:%M on %m/%d/%Y", &tm); - command_success_nodata(si, "%d: [\2%s\2] by \2%s\2 at \2%s\2: \2%s\2", + command_success_nodata(si, "%d: [\2%s\2] by \2%s\2 at \2%s\2: \2%s\2", x, y, l->nick, dBuf, l->story); free(y); } @@ -500,7 +500,7 @@ static void is_cmd_olist(sourceinfo_t *si, int parc, char *parv[]) tm = *localtime(&o->info_ts); strftime(dBuf, BUFSIZE, "%H:%M on %m/%d/%Y", &tm); - command_success_nodata(si, "%d: [\2%s\2] by \2%s\2 at \2%s\2: \2%s\2", + command_success_nodata(si, "%d: [\2%s\2] by \2%s\2 at \2%s\2: \2%s\2", x, y, o->nick, dBuf, o->story); free(y); } @@ -550,7 +550,7 @@ void _moddeinit(module_unload_intent_t intent) service_delete(infoserv); infoserv = NULL; } - + hook_del_user_add(display_info); hook_del_user_oper(display_oper_info); hook_del_operserv_info(osinfo_hook); diff --git a/modules/memoserv/delete.c b/modules/memoserv/delete.c index 4c879b6015..c7079d4138 100644 --- a/modules/memoserv/delete.c +++ b/modules/memoserv/delete.c @@ -42,27 +42,27 @@ static void ms_cmd_delete(sourceinfo_t *si, int parc, char *parv[]) unsigned int deleteall = 0, deleteold = 0; mymemo_t *memo; char *errptr = NULL; - + /* We only take 1 arg, and we ignore all others */ char *arg1 = parv[0]; - + /* Does the arg exist? */ if (!arg1) { - command_fail(si, fault_needmoreparams, + command_fail(si, fault_needmoreparams, STR_INSUFFICIENT_PARAMS, "DELETE"); - + command_fail(si, fault_needmoreparams, _("Syntax: DELETE ALL|OLD|message id")); return; } - + /* Do we have any memos? */ if (!si->smu->memos.count) { command_fail(si, fault_nochange, _("You have no memos to delete.")); return; } - + /* Do we want to delete all memos? */ if (!strcasecmp("all",arg1)) { @@ -75,14 +75,14 @@ static void ms_cmd_delete(sourceinfo_t *si, int parc, char *parv[]) else { memonum = strtoul(arg1, &errptr, 10); - + /* Make sure they didn't slip us an alphabetic index */ if (!memonum || (errptr && *errptr)) { command_fail(si, fault_badparams, _("Invalid message index.")); return; } - + /* If int, does that index exist? And do we have something to delete? */ if (memonum > si->smu->memos.count) { @@ -90,34 +90,34 @@ static void ms_cmd_delete(sourceinfo_t *si, int parc, char *parv[]) return; } } - + delcount = 0; - + /* Iterate through memos, doing deletion */ MOWGLI_ITER_FOREACH_SAFE(n, tn, si->smu->memos.head) { i++; memo = (mymemo_t*) n->data; - + if (i == memonum || deleteall || (deleteold && memo->status & MEMO_READ)) { delcount++; - + if (!(memo->status & MEMO_READ)) si->smu->memoct_new--; - + /* Free to node pool, remove from chain */ mowgli_node_delete(n, &si->smu->memos); mowgli_node_free(n); free(memo); } - + } - + command_success_nodata(si, ngettext(N_("%d memo deleted."), N_("%d memos deleted."), delcount), delcount); - + return; } diff --git a/modules/memoserv/forward.c b/modules/memoserv/forward.c index 6ddba6576a..c5cca579e6 100644 --- a/modules/memoserv/forward.c +++ b/modules/memoserv/forward.c @@ -38,25 +38,25 @@ static void ms_cmd_forward(sourceinfo_t *si, int parc, char *parv[]) mymemo_t *memo, *newmemo; mowgli_node_t *n, *temp; unsigned int i = 1, memonum = 0; - + /* Grab args */ char *target = parv[0]; char *arg = parv[1]; - + /* Arg validator */ if (!target || !arg) { - command_fail(si, fault_needmoreparams, + command_fail(si, fault_needmoreparams, STR_INSUFFICIENT_PARAMS, "FORWARD"); - - command_fail(si, fault_needmoreparams, + + command_fail(si, fault_needmoreparams, "Syntax: FORWARD "); - + return; } else memonum = atoi(arg); - + if (si->smu->flags & MU_WAITAUTH) { command_fail(si, fault_notverified, _("You need to verify your email address before you may send memos.")); @@ -76,21 +76,21 @@ static void ms_cmd_forward(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_nosuch_target, _("\2%s\2 is not registered."), target); return; } - + /* Make sure target isn't sender */ if (si->smu == tmu) { command_fail(si, fault_noprivs, _("You cannot send yourself a memo.")); return; } - + /* Make sure arg is an int */ if (!memonum) { command_fail(si, fault_badparams, _("Invalid message index.")); return; } - + /* check if targetuser has nomemo set */ if (tmu->flags & MU_NOMEMO) { @@ -106,7 +106,7 @@ static void ms_cmd_forward(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_nosuch_key, _("Invalid memo number.")); return; } - + /* Check to make sure target inbox not full */ if (tmu->memos.count >= me.mdlimit) { @@ -148,7 +148,7 @@ static void ms_cmd_forward(sourceinfo_t *si, int parc, char *parv[]) } } logcommand(si, CMDLOG_SET, "FORWARD: to \2%s\2", entity(tmu)->name); - + /* Go to forwarding memos */ MOWGLI_ITER_FOREACH(n, si->smu->memos.head) { @@ -157,18 +157,18 @@ static void ms_cmd_forward(sourceinfo_t *si, int parc, char *parv[]) /* should have some function for send here... ask nenolod*/ memo = (mymemo_t *)n->data; newmemo = smalloc(sizeof(mymemo_t)); - + /* Create memo */ newmemo->sent = CURRTIME; newmemo->status = 0; mowgli_strlcpy(newmemo->sender,entity(si->smu)->name,NICKLEN); mowgli_strlcpy(newmemo->text,memo->text,MEMOLEN); - + /* Create node, add to their linked list of memos */ temp = mowgli_node_create(); mowgli_node_add(newmemo, temp, &tmu->memos); tmu->memoct_new++; - + /* Should we email this? */ if (tmu->flags & MU_EMAILMEMOS) { diff --git a/modules/memoserv/ignore.c b/modules/memoserv/ignore.c index 8c55a153e9..039a55b4d0 100644 --- a/modules/memoserv/ignore.c +++ b/modules/memoserv/ignore.c @@ -64,7 +64,7 @@ static void ms_cmd_ignore(sourceinfo_t *si, int parc, char *parv[]) /* Bad/missing arg */ if (!cmd) { - command_fail(si, fault_needmoreparams, + command_fail(si, fault_needmoreparams, STR_INSUFFICIENT_PARAMS, "IGNORE"); command_fail(si, fault_needmoreparams, _("Syntax: IGNORE ADD|DEL|LIST|CLEAR [account]")); diff --git a/modules/memoserv/list.c b/modules/memoserv/list.c index 8a3370483b..6e59b991e4 100644 --- a/modules/memoserv/list.c +++ b/modules/memoserv/list.c @@ -41,27 +41,27 @@ static void ms_cmd_list(sourceinfo_t *si, int parc, char *parv[]) char line[512]; char chan[CHANNELLEN]; char *p; - + command_success_nodata(si, ngettext(N_("You have %zu memo (%d new)."), N_("You have %zu memos (%d new)."), si->smu->memos.count), si->smu->memos.count, si->smu->memoct_new); - + /* Check to see if any memos */ if (!si->smu->memos.count) return; /* Go to listing memos */ command_success_nodata(si, " "); - + MOWGLI_ITER_FOREACH(n, si->smu->memos.head) { i++; memo = (mymemo_t *)n->data; tm = *localtime(&memo->sent); - - strftime(strfbuf, sizeof strfbuf, + + strftime(strfbuf, sizeof strfbuf, TIME_FORMAT, &tm); - + snprintf(line, sizeof line, _("- %d From: %s Sent: %s"), i, memo->sender, strfbuf); if (memo->status & MEMO_CHANNEL && *memo->text == '#') @@ -82,7 +82,7 @@ static void ms_cmd_list(sourceinfo_t *si, int parc, char *parv[]) } command_success_nodata(si, "%s", line); } - + return; } diff --git a/modules/memoserv/main.c b/modules/memoserv/main.c index edbc5b9848..6b0c9c8506 100644 --- a/modules/memoserv/main.c +++ b/modules/memoserv/main.c @@ -45,7 +45,7 @@ void _moddeinit(module_unload_intent_t intent) static void on_user_identify(user_t *u) { myuser_t *mu = u->myuser; - + if (mu->memoct_new > 0) { notice(memosvs->me->nick, u->nick, ngettext(N_("You have %d new memo."), diff --git a/modules/memoserv/read.c b/modules/memoserv/read.c index edc192f749..ea9c3cd3de 100644 --- a/modules/memoserv/read.c +++ b/modules/memoserv/read.c @@ -42,26 +42,26 @@ static void ms_cmd_read(sourceinfo_t *si, int parc, char *parv[]) char strfbuf[BUFSIZE]; struct tm tm; bool readnew; - + /* Grab arg */ char *arg1 = parv[0]; - + if (!arg1) { - command_fail(si, fault_needmoreparams, + command_fail(si, fault_needmoreparams, STR_INSUFFICIENT_PARAMS, "READ"); - + command_fail(si, fault_needmoreparams, _("Syntax: READ ")); return; } - + /* Check to see if any memos */ if (!si->smu->memos.count) { command_fail(si, fault_nosuch_key, _("You have no memos.")); return; } - + memonum = atoi(arg1); readnew = !strcasecmp(arg1, "NEW"); if (!readnew && !memonum) @@ -69,7 +69,7 @@ static void ms_cmd_read(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_badparams, _("Invalid message index.")); return; } - + /* Check to see if memonum is greater than memocount */ if (memonum > si->smu->memos.count) { @@ -77,22 +77,22 @@ static void ms_cmd_read(sourceinfo_t *si, int parc, char *parv[]) return; } - /* Go to reading memos */ + /* Go to reading memos */ MOWGLI_ITER_FOREACH(n, si->smu->memos.head) { memo = (mymemo_t *)n->data; if (i == memonum || (readnew && !(memo->status & MEMO_READ))) { tm = *localtime(&memo->sent); - strftime(strfbuf, sizeof strfbuf, + strftime(strfbuf, sizeof strfbuf, TIME_FORMAT, &tm); - + if (!(memo->status & MEMO_READ)) { memo->status |= MEMO_READ; si->smu->memoct_new--; tmu = myuser_find(memo->sender); - + /* If the sender is logged in, tell them the memo's been read */ /* but not for channel memos */ if (memo->status & MEMO_CHANNEL) @@ -110,7 +110,7 @@ static void ms_cmd_read(sourceinfo_t *si, int parc, char *parv[]) receipt->status = 0; mowgli_strlcpy(receipt->sender, si->service->nick, NICKLEN); snprintf(receipt->text, MEMOLEN, "%s has read a memo from you sent at %s", entity(si->smu)->name, strfbuf); - + /* Attach to their linked list */ n = mowgli_node_create(); mowgli_node_add(receipt, n, &tmu->memos); @@ -118,15 +118,15 @@ static void ms_cmd_read(sourceinfo_t *si, int parc, char *parv[]) } } } - - command_success_nodata(si, + + command_success_nodata(si, "\2Memo %d - Sent by %s, %s\2",i,memo->sender, strfbuf); - - command_success_nodata(si, + + command_success_nodata(si, "------------------------------------------"); - + command_success_nodata(si, "%s", memo->text); - + if (!readnew) return; if (++numread >= MAX_READ_AT_ONCE && si->smu->memoct_new > 0) diff --git a/modules/memoserv/send.c b/modules/memoserv/send.c index 71fa4d66b2..3117152052 100644 --- a/modules/memoserv/send.c +++ b/modules/memoserv/send.c @@ -42,23 +42,23 @@ static void ms_cmd_send(sourceinfo_t *si, int parc, char *parv[]) mymemo_t *memo; command_t *cmd; service_t *memoserv; - + /* Grab args */ char *target = parv[0]; char *m = parv[1]; - + /* Arg validation */ if (!target || !m) { - command_fail(si, fault_needmoreparams, + command_fail(si, fault_needmoreparams, STR_INSUFFICIENT_PARAMS, "SEND"); - - command_fail(si, fault_needmoreparams, + + command_fail(si, fault_needmoreparams, "Syntax: SEND "); - + return; } - + if (si->smu->flags & MU_WAITAUTH) { command_fail(si, fault_notverified, _("You need to verify your email address before you may send memos.")); @@ -77,9 +77,9 @@ static void ms_cmd_send(sourceinfo_t *si, int parc, char *parv[]) /* Check for memo text length -- includes/common.h */ if (strlen(m) >= MEMOLEN) { - command_fail(si, fault_badparams, + command_fail(si, fault_badparams, "Please make sure your memo is less than %d characters", MEMOLEN); - + return; } @@ -91,7 +91,7 @@ static void ms_cmd_send(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_badparams, _("Your memo contains invalid characters.")); return; } - + memoserv = service_find("memoserv"); if (memoserv == NULL) memoserv = si->service; @@ -99,17 +99,17 @@ static void ms_cmd_send(sourceinfo_t *si, int parc, char *parv[]) if (*target != '#' && *target != '!') { /* See if target is valid */ - if (!(tmu = myuser_find_ext(target))) + if (!(tmu = myuser_find_ext(target))) { - command_fail(si, fault_nosuch_target, + command_fail(si, fault_nosuch_target, "\2%s\2 is not registered.", target); - + return; } si->smu->memo_ratelimit_num++; si->smu->memo_ratelimit_time = CURRTIME; - + /* Does the user allow memos? --pfish */ if (tmu->flags & MU_NOMEMO) { @@ -118,7 +118,7 @@ static void ms_cmd_send(sourceinfo_t *si, int parc, char *parv[]) return; } - + /* Check to make sure target inbox not full */ if (tmu->memos.count >= *maxmemos) { @@ -127,7 +127,7 @@ static void ms_cmd_send(sourceinfo_t *si, int parc, char *parv[]) return; } - + /* Make sure we're not on ignore */ MOWGLI_ITER_FOREACH(n, tmu->memo_ignores.head) { @@ -149,14 +149,14 @@ static void ms_cmd_send(sourceinfo_t *si, int parc, char *parv[]) } } logcommand(si, CMDLOG_SET, "SEND: to \2%s\2", entity(tmu)->name); - + /* Malloc and populate struct */ memo = smalloc(sizeof(mymemo_t)); memo->sent = CURRTIME; memo->status = 0; mowgli_strlcpy(memo->sender,entity(si->smu)->name,NICKLEN); mowgli_strlcpy(memo->text,m,MEMOLEN); - + /* Create a linked list node and add to memos */ n = mowgli_node_create(); mowgli_node_add(memo, n, &tmu->memos); @@ -167,7 +167,7 @@ static void ms_cmd_send(sourceinfo_t *si, int parc, char *parv[]) { sendemail(si->su, tmu, EMAIL_MEMO, tmu->email, memo->text); } - + /* Note: do not disclose other nicks they're logged in with * -- jilles * diff --git a/modules/memoserv/sendall.c b/modules/memoserv/sendall.c index 15c6caf875..47dc741531 100644 --- a/modules/memoserv/sendall.c +++ b/modules/memoserv/sendall.c @@ -44,19 +44,19 @@ static void ms_cmd_sendall(sourceinfo_t *si, int parc, char *parv[]) /* Grab args */ char *m = parv[0]; - + /* Arg validation */ if (!m) { - command_fail(si, fault_needmoreparams, + command_fail(si, fault_needmoreparams, STR_INSUFFICIENT_PARAMS, "SENDALL"); - - command_fail(si, fault_needmoreparams, + + command_fail(si, fault_needmoreparams, _("Syntax: SENDALL ")); - + return; } - + if (si->smu->flags & MU_WAITAUTH) { command_fail(si, fault_notverified, _("You need to verify your email address before you may send memos.")); @@ -75,9 +75,9 @@ static void ms_cmd_sendall(sourceinfo_t *si, int parc, char *parv[]) /* Check for memo text length -- includes/common.h */ if (strlen(m) >= MEMOLEN) { - command_fail(si, fault_badparams, + command_fail(si, fault_badparams, "Please make sure your memo is less than %d characters", MEMOLEN); - + return; } @@ -89,7 +89,7 @@ static void ms_cmd_sendall(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_badparams, _("Your memo contains invalid characters.")); return; } - + si->smu->memo_ratelimit_num++; si->smu->memo_ratelimit_time = CURRTIME; @@ -172,7 +172,7 @@ static void ms_cmd_sendall(sourceinfo_t *si, int parc, char *parv[]) logcommand(si, CMDLOG_ADMIN, "SENDALL: \2%s\2 (%d/%d sent)", m, sent, tried); command_success_nodata(si, _("The memo has been successfully sent to %d accounts."), sent); return; -} +} /* vim:cinoptions=>s,e0,n0,f0,{0,}0,^0,=s,ps,t0,c3,+s,(2s,us,)20,*30,gs,hs * vim:ts=8 diff --git a/modules/memoserv/sendgroup.c b/modules/memoserv/sendgroup.c index e2e81808a1..9d1e015494 100644 --- a/modules/memoserv/sendgroup.c +++ b/modules/memoserv/sendgroup.c @@ -47,19 +47,19 @@ static void ms_cmd_sendgroup(sourceinfo_t *si, int parc, char *parv[]) /* Grab args */ char *target = parv[0]; char *m = parv[1]; - + /* Arg validation */ if (!target || !m) { - command_fail(si, fault_needmoreparams, + command_fail(si, fault_needmoreparams, STR_INSUFFICIENT_PARAMS, "SENDGROUP"); - - command_fail(si, fault_needmoreparams, + + command_fail(si, fault_needmoreparams, _("Syntax: SENDGROUP ")); - + return; } - + if (si->smu->flags & MU_WAITAUTH) { command_fail(si, fault_notverified, _("You need to verify your email address before you may send memos.")); @@ -78,9 +78,9 @@ static void ms_cmd_sendgroup(sourceinfo_t *si, int parc, char *parv[]) /* Check for memo text length -- includes/common.h */ if (strlen(m) >= MEMOLEN) { - command_fail(si, fault_badparams, + command_fail(si, fault_badparams, "Please make sure your memo is less than %d characters", MEMOLEN); - + return; } @@ -92,7 +92,7 @@ static void ms_cmd_sendgroup(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_badparams, _("Your memo contains invalid characters.")); return; } - + mg = group(myentity_find(target)); if (mg == NULL) { @@ -186,7 +186,7 @@ static void ms_cmd_sendgroup(sourceinfo_t *si, int parc, char *parv[]) logcommand(si, CMDLOG_SET, "SENDGROUP: to \2%s\2 (%d/%d sent)", entity(mg)->name, sent, tried); command_success_nodata(si, _("The memo has been successfully sent to %d members on \2%s\2."), sent, entity(mg)->name); return; -} +} /* vim:cinoptions=>s,e0,n0,f0,{0,}0,^0,=s,ps,t0,c3,+s,(2s,us,)20,*30,gs,hs * vim:ts=8 diff --git a/modules/memoserv/sendops.c b/modules/memoserv/sendops.c index 186fc119aa..8f3bd54377 100644 --- a/modules/memoserv/sendops.c +++ b/modules/memoserv/sendops.c @@ -46,19 +46,19 @@ static void ms_cmd_sendops(sourceinfo_t *si, int parc, char *parv[]) /* Grab args */ char *target = parv[0]; char *m = parv[1]; - + /* Arg validation */ if (!target || !m) { - command_fail(si, fault_needmoreparams, + command_fail(si, fault_needmoreparams, STR_INSUFFICIENT_PARAMS, "SENDOPS"); - - command_fail(si, fault_needmoreparams, + + command_fail(si, fault_needmoreparams, "Syntax: SENDOPS "); - + return; } - + if (si->smu->flags & MU_WAITAUTH) { command_fail(si, fault_notverified, _("You need to verify your email address before you may send memos.")); @@ -77,9 +77,9 @@ static void ms_cmd_sendops(sourceinfo_t *si, int parc, char *parv[]) /* Check for memo text length -- includes/common.h */ if (strlen(m) >= MEMOLEN) { - command_fail(si, fault_badparams, + command_fail(si, fault_badparams, "Please make sure your memo is less than %d characters", MEMOLEN); - + return; } @@ -91,7 +91,7 @@ static void ms_cmd_sendops(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_badparams, _("Your memo contains invalid characters.")); return; } - + mc = mychan_find(target); if (mc == NULL) @@ -197,7 +197,7 @@ static void ms_cmd_sendops(sourceinfo_t *si, int parc, char *parv[]) logcommand(si, CMDLOG_SET, "SENDOPS: to \2%s\2 (%d/%d sent)", mc->name, sent, tried); command_success_nodata(si, _("The memo has been successfully sent to %d ops on \2%s\2."), sent, mc->name); return; -} +} /* vim:cinoptions=>s,e0,n0,f0,{0,}0,^0,=s,ps,t0,c3,+s,(2s,us,)20,*30,gs,hs * vim:ts=8 diff --git a/modules/misc/httpd.c b/modules/misc/httpd.c index edfbe95e1d..bc6c16e645 100644 --- a/modules/misc/httpd.c +++ b/modules/misc/httpd.c @@ -108,7 +108,7 @@ static void process_header(connection_t *cptr, char *line) static void check_close(connection_t *cptr) { struct httpddata *hd; - + hd = cptr->userdata; if (hd->connection_close) sendq_add_eof(cptr); @@ -191,11 +191,11 @@ static void httpd_recvqhandler(connection_t *cptr) if (hd->lengthdone != hd->length) return; hd->requestbuf[hd->length] = '\0'; - + ph->handler(cptr, hd->requestbuf); clear_httpddata(hd); - return; + return; } } diff --git a/modules/nickserv/cert.c b/modules/nickserv/cert.c index 1813f95d0f..228dd662ef 100644 --- a/modules/nickserv/cert.c +++ b/modules/nickserv/cert.c @@ -91,7 +91,7 @@ static void ns_cmd_cert(sourceinfo_t *si, int parc, char *parv[]) if (parc < 2) { mcfp = si->su != NULL ? si->su->certfp : NULL; - + if (mcfp == NULL) { command_fail(si, fault_needmoreparams, STR_INSUFFICIENT_PARAMS, "CERT ADD"); diff --git a/modules/nickserv/cracklib.c b/modules/nickserv/cracklib.c index 1f44bfff2b..8fa6c12bf6 100644 --- a/modules/nickserv/cracklib.c +++ b/modules/nickserv/cracklib.c @@ -87,8 +87,8 @@ _modinit(module_t *m) hook_add_user_can_register(cracklib_hook); hook_add_event("config_ready"); - hook_add_config_ready(cracklib_config_ready); - + hook_add_config_ready(cracklib_config_ready); + hook_add_event("operserv_info"); hook_add_operserv_info(osinfo_hook); diff --git a/modules/nickserv/enforce.c b/modules/nickserv/enforce.c index 9c0ab38dfe..88001080a1 100644 --- a/modules/nickserv/enforce.c +++ b/modules/nickserv/enforce.c @@ -96,7 +96,7 @@ static void guest_nickname(user_t *u) /* Generate a new guest nickname and check if it already exists * This will try to generate a new nickname 30 different times - * if nicks are in use. If it runs into 30 nicks in use, maybe + * if nicks are in use. If it runs into 30 nicks in use, maybe * you shouldn't use this module. */ for (tries = 0; tries < 30; tries++) { @@ -196,13 +196,13 @@ static void ns_cmd_release(sourceinfo_t *si, int parc, char *parv[]) u = user_find_named(target); mn = mynick_find(target); - + if (!mn) { command_fail(si, fault_nosuch_target, _("\2%s\2 is not a registered nickname."), target); return; } - + /* The != NULL check is required to make releasing an enforcer via xmlrpc work */ if (u != NULL && u == si->su) { @@ -294,13 +294,13 @@ static void ns_cmd_regain(sourceinfo_t *si, int parc, char *parv[]) u = user_find_named(target); mn = mynick_find(target); - + if (!mn) { command_fail(si, fault_nosuch_target, _("\2%s\2 is not a registered nickname."), target); return; } - + if (u == si->su) { command_fail(si, fault_noprivs, _("You cannot REGAIN yourself.")); @@ -440,7 +440,7 @@ static void check_registration(hook_user_register_check_t *hdata) if (hdata->approved) return; - + if (!strncasecmp(hdata->account, nicksvs.enforce_prefix, prefixlen) && isdigit(hdata->account[prefixlen])) { command_fail(hdata->si, fault_badparams, "The nick \2%s\2 is reserved and cannot be registered.", hdata->account); diff --git a/modules/nickserv/help.c b/modules/nickserv/help.c index b1308cf6db..c8e1c6ab70 100644 --- a/modules/nickserv/help.c +++ b/modules/nickserv/help.c @@ -70,16 +70,16 @@ void ns_cmd_help(sourceinfo_t *si, int parc, char *parv[]) command_help_short(si, si->service->commands, "REGISTER IDENTIFY GHOST RELEASE INFO LISTCHANS SET GROUP UNGROUP FDROP FUNGROUP MARK FREEZE SENDPASS VHOST"); command_success_nodata(si, _("***** \2End of Help\2 *****")); - + /* Fun for helpchan/helpurl. */ if (config_options.helpchan && config_options.helpurl) - command_success_nodata(si, _("If you're having trouble or you need some additional help, you may want to join the help channel %s or visit the help webpage %s"), + command_success_nodata(si, _("If you're having trouble or you need some additional help, you may want to join the help channel %s or visit the help webpage %s"), config_options.helpchan, config_options.helpurl); else if (config_options.helpchan && !config_options.helpurl) command_success_nodata(si, _("If you're having trouble or you need some additional help, you may want to join the help channel %s"), config_options.helpchan); else if (!config_options.helpchan && config_options.helpurl) command_success_nodata(si, _("If you're having trouble or you need some additional help, you may want to visit the help webpage %s"), config_options.helpurl); - + return; } diff --git a/modules/nickserv/info.c b/modules/nickserv/info.c index ace422712e..689c9e4e77 100644 --- a/modules/nickserv/info.c +++ b/modules/nickserv/info.c @@ -364,7 +364,7 @@ static void ns_cmd_info(sourceinfo_t *si, int parc, char *parv[]) { if (*buf) strcat(buf, ", "); - + strcat(buf, "NoGreet"); } diff --git a/modules/nickserv/main.c b/modules/nickserv/main.c index 283b3f5074..4dd29ba3c6 100644 --- a/modules/nickserv/main.c +++ b/modules/nickserv/main.c @@ -149,7 +149,7 @@ void _modinit(module_t *m) nicksvs.me = service_add("nickserv", NULL); authservice_loaded++; - + add_bool_conf_item("SPAM", &nicksvs.me->conf_table, 0, &nicksvs.spam, false); add_bool_conf_item("NO_NICK_OWNERSHIP", &nicksvs.me->conf_table, 0, &nicksvs.no_nick_ownership, false); add_duration_conf_item("EXPIRE", &nicksvs.me->conf_table, 0, &nicksvs.expiry, "d", 0); diff --git a/modules/nickserv/mark.c b/modules/nickserv/mark.c index 4aeba67360..7afd452d71 100644 --- a/modules/nickserv/mark.c +++ b/modules/nickserv/mark.c @@ -31,7 +31,7 @@ static bool mark_match(const mynick_t *mn, const void *arg) myuser_t *mu = mn->owner; mdmark = metadata_find(mu, "private:mark:reason"); - + if (mdmark != NULL && !match(markpattern, mdmark->value)) return true; diff --git a/modules/nickserv/register.c b/modules/nickserv/register.c index 84ae603c7b..c4ab87e708 100644 --- a/modules/nickserv/register.c +++ b/modules/nickserv/register.c @@ -169,7 +169,7 @@ static void ns_cmd_register(sourceinfo_t *si, int parc, char *parv[]) } if (config_options.ratelimit_uses && config_options.ratelimit_period) ratelimit_count++; - + if (auth_module_loaded) { if (!verify_password(mu, pass)) diff --git a/modules/nickserv/sendpass.c b/modules/nickserv/sendpass.c index fa284b5ffd..fb13494702 100644 --- a/modules/nickserv/sendpass.c +++ b/modules/nickserv/sendpass.c @@ -54,7 +54,7 @@ static void ns_cmd_sendpass(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_needmoreparams, _("Syntax: SENDPASS ")); return; } - + if (parc > 1) { if (!strcasecmp(parv[1], "FORCE")) diff --git a/modules/nickserv/sendpass_user.c b/modules/nickserv/sendpass_user.c index 5ca15a4509..42c5d26fc4 100644 --- a/modules/nickserv/sendpass_user.c +++ b/modules/nickserv/sendpass_user.c @@ -53,7 +53,7 @@ static void ns_cmd_sendpass(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_needmoreparams, _("Syntax: SENDPASS ")); return; } - + if (parc > 1) { if (!has_priv(si, PRIV_USER_SENDPASS)) diff --git a/modules/nickserv/setpass.c b/modules/nickserv/setpass.c index 81d9d9a4fb..7ef5077960 100644 --- a/modules/nickserv/setpass.c +++ b/modules/nickserv/setpass.c @@ -98,7 +98,7 @@ static void ns_cmd_setpass(sourceinfo_t *si, int parc, char *parv[]) { logcommand(si, CMDLOG_SET, "failed SETPASS (invalid key)"); } - command_fail(si, fault_badparams, _("Verification failed. Invalid key for \2%s\2."), + command_fail(si, fault_badparams, _("Verification failed. Invalid key for \2%s\2."), entity(mu)->name); return; diff --git a/modules/nickserv/vacation.c b/modules/nickserv/vacation.c index 97106babd1..195d3cc543 100644 --- a/modules/nickserv/vacation.c +++ b/modules/nickserv/vacation.c @@ -21,7 +21,7 @@ static void ns_cmd_vacation(sourceinfo_t *si, int parc, char *parv[]) if (CURRTIME < (time_t)(si->smu->registered + nicksvs.expiry)) { - command_fail(si, fault_noprivs, _("You must be registered for at least \2%d\2 days in order to enable VACATION mode."), + command_fail(si, fault_noprivs, _("You must be registered for at least \2%d\2 days in order to enable VACATION mode."), (nicksvs.expiry / 3600 / 24)); return; } diff --git a/modules/nickserv/verify.c b/modules/nickserv/verify.c index 6ee8902e15..dad6e8d789 100644 --- a/modules/nickserv/verify.c +++ b/modules/nickserv/verify.c @@ -100,7 +100,7 @@ static void ns_cmd_verify(sourceinfo_t *si, int parc, char *parv[]) } logcommand(si, CMDLOG_SET, "failed VERIFY REGISTER \2%s\2, \2%s\2 (invalid key)", get_source_name(si), mu->email); - command_fail(si, fault_badparams, _("Verification failed. Invalid key for \2%s\2."), + command_fail(si, fault_badparams, _("Verification failed. Invalid key for \2%s\2."), entity(mu)->name); return; @@ -140,7 +140,7 @@ static void ns_cmd_verify(sourceinfo_t *si, int parc, char *parv[]) } logcommand(si, CMDLOG_SET, "failed VERIFY EMAILCHG \2%s\2, \2%s\2 (invalid key)", get_source_name(si), mu->email); - command_fail(si, fault_badparams, _("Verification failed. Invalid key for \2%s\2."), + command_fail(si, fault_badparams, _("Verification failed. Invalid key for \2%s\2."), entity(mu)->name); return; diff --git a/modules/operserv/akill.c b/modules/operserv/akill.c index f688aaecc0..0ab9175280 100644 --- a/modules/operserv/akill.c +++ b/modules/operserv/akill.c @@ -60,7 +60,7 @@ void _moddeinit(module_unload_intent_t intent) command_delete(&os_akill_del, os_akill_cmds); command_delete(&os_akill_list, os_akill_cmds); command_delete(&os_akill_sync, os_akill_cmds); - + hook_del_user_add(os_akill_newuser); mowgli_patricia_destroy(os_akill_cmds, NULL, NULL); @@ -94,7 +94,7 @@ static void os_cmd_akill(sourceinfo_t *si, int parc, char *parv[]) /* Grab args */ char *cmd = parv[0]; command_t *c; - + /* Bad/missing arg */ if (!cmd) { @@ -189,7 +189,7 @@ static void os_cmd_akill_add(sourceinfo_t *si, int parc, char *parv[]) { mowgli_strlcat(reason, " ", BUFSIZE); mowgli_strlcat(reason, treason, BUFSIZE); - } + } } if (strchr(target,'!')) @@ -286,7 +286,7 @@ static void os_cmd_akill_add(sourceinfo_t *si, int parc, char *parv[]) else command_success_nodata(si, _("AKILL on \2%s@%s\2 was successfully added."), k->user, k->host); - verbose_wallops("\2%s\2 is \2adding\2 an \2AKILL\2 for \2%s@%s\2 -- reason: \2%s\2", get_oper_name(si), k->user, k->host, + verbose_wallops("\2%s\2 is \2adding\2 an \2AKILL\2 for \2%s@%s\2 -- reason: \2%s\2", get_oper_name(si), k->user, k->host, k->reason); if (duration) @@ -482,7 +482,7 @@ static void os_cmd_akill_list(sourceinfo_t *si, int parc, char *parv[]) return; } } - + if (user || host || num) command_success_nodata(si, _("AKILL list matching given criteria (with reasons):")); else if (full) diff --git a/modules/operserv/clearchan.c b/modules/operserv/clearchan.c index 9820ae22e7..a1ca380eeb 100644 --- a/modules/operserv/clearchan.c +++ b/modules/operserv/clearchan.c @@ -72,7 +72,7 @@ static void os_cmd_clearchan(sourceinfo_t *si, int parc, char *parv[]) { /* not valid! */ command_fail(si, fault_badparams, _("\2%s\2 is not a valid action"), actionstr); - return; + return; } if (action != CLEAR_KICK && !has_priv(si, PRIV_MASS_AKILL)) diff --git a/modules/operserv/clones.c b/modules/operserv/clones.c index 457a25efb8..8dbf0c113d 100644 --- a/modules/operserv/clones.c +++ b/modules/operserv/clones.c @@ -283,7 +283,7 @@ static void db_h_ex(database_handle_t *db, const char *type) { warn = db_sread_uint(db); db_sread_uint(db); /* trash the old KILL value */ - } + } else { warn = allowed; @@ -330,7 +330,7 @@ static void os_cmd_clones(sourceinfo_t *si, int parc, char *parv[]) { command_t *c; char *cmd = parv[0]; - + /* Bad/missing arg */ if (!cmd) { @@ -338,7 +338,7 @@ static void os_cmd_clones(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_needmoreparams, _("Syntax: CLONES KLINE|LIST|ADDEXEMPT|DELEXEMPT|LISTEXEMPT|SETEXEMPT|DURATION [parameters]")); return; } - + c = command_find(os_clones_cmds, cmd); if (c == NULL) { @@ -632,7 +632,7 @@ static void os_cmd_clones_setexempt(sourceinfo_t *si, int parc, char *parv[]) command_fail(si, fault_needmoreparams, _("Syntax: CLONES SETEXEMPT ")); return; } - + int clones = atoi(clonesstr); if (!strcasecmp(ip, "DEFAULT")) @@ -889,7 +889,7 @@ static void clones_newuser(hook_user_nick_t *data) if (warn != 0) warn++; } - + /* A hard limit of 2x the "real" limit sounds good IMO --jdhore */ if (allowed > (real_allowed * 2)) allowed = real_allowed * 2; diff --git a/modules/operserv/compare.c b/modules/operserv/compare.c index edb5e348a6..1660ed4344 100644 --- a/modules/operserv/compare.c +++ b/modules/operserv/compare.c @@ -64,7 +64,7 @@ static void os_cmd_compare(sourceinfo_t *si, int parc, char *parv[]) if (!c1 || !c2) { command_fail(si, fault_nosuch_target, _("Both channels must exist for @compare")); - return; + return; } command_success_nodata(si, _("Common users in \2%s\2 and \2%s\2"), object1, object2); @@ -105,7 +105,7 @@ static void os_cmd_compare(sourceinfo_t *si, int parc, char *parv[]) { /* bad syntax */ command_fail(si, fault_badparams, _("Bad syntax for @compare. Use @compare on two channels, or two users.")); - return; + return; } } else @@ -114,7 +114,7 @@ static void os_cmd_compare(sourceinfo_t *si, int parc, char *parv[]) { /* bad syntax */ command_fail(si, fault_badparams, _("Bad syntax for @compare. Use @compare on two channels, or two users.")); - return; + return; } else { @@ -125,7 +125,7 @@ static void os_cmd_compare(sourceinfo_t *si, int parc, char *parv[]) if (!u1 || !u2) { command_fail(si, fault_nosuch_target, _("Both users must exist for @compare")); - return; + return; } command_success_nodata(si, _("Common channels for \2%s\2 and \2%s\2"), object1, object2); diff --git a/modules/operserv/noop.c b/modules/operserv/noop.c index 5fa67671a9..acbf7f66c8 100644 --- a/modules/operserv/noop.c +++ b/modules/operserv/noop.c @@ -300,13 +300,13 @@ static void os_cmd_noop(sourceinfo_t *si, int parc, char *parv[]) { switch (type) { - case type_all: + case type_all: logcommand(si, CMDLOG_GET, "NOOP:LIST"); break; - case type_hostmask: + case type_hostmask: logcommand(si, CMDLOG_GET, "NOOP:LIST:HOSTMASK"); break; - case type_server: + case type_server: logcommand(si, CMDLOG_GET, "NOOP:LIST:SERVER"); break; } diff --git a/modules/operserv/rakill.c b/modules/operserv/rakill.c index 1233d11674..2a9125ff79 100644 --- a/modules/operserv/rakill.c +++ b/modules/operserv/rakill.c @@ -114,7 +114,7 @@ static void os_cmd_rakill(sourceinfo_t *si, int parc, char *parv[]) matches++; } } - + regex_destroy(regex); command_success_nodata(si, _("\2%d\2 matches for %s akilled."), matches, pattern); logcommand(si, CMDLOG_ADMIN, "RAKILL: \2%s\2 (reason: \2%s\2) (\2%d\2 matches)", pattern, reason, matches); diff --git a/modules/operserv/rmatch.c b/modules/operserv/rmatch.c index 42f34e7865..f2607da2ec 100644 --- a/modules/operserv/rmatch.c +++ b/modules/operserv/rmatch.c @@ -77,13 +77,13 @@ static void os_cmd_rmatch(sourceinfo_t *si, int parc, char *parv[]) } regex = regex_create(pattern, flags); - + if (regex == NULL) { command_fail(si, fault_badparams, _("The provided regex \2%s\2 is invalid."), pattern); return; } - + MOWGLI_PATRICIA_FOREACH(u, &state, userlist) { sprintf(usermask, "%s!%s@%s %s", u->nick, u->user, u->host, u->gecos); @@ -100,7 +100,7 @@ static void os_cmd_rmatch(sourceinfo_t *si, int parc, char *parv[]) } } } - + regex_destroy(regex); command_success_nodata(si, _("\2%d\2 matches for %s"), matches, pattern); logcommand(si, CMDLOG_ADMIN, "RMATCH: \2%s\2 (\2%d\2 matches)", pattern, matches); diff --git a/modules/operserv/rwatch.c b/modules/operserv/rwatch.c index 3ed5fa394c..6820e73aa9 100644 --- a/modules/operserv/rwatch.c +++ b/modules/operserv/rwatch.c @@ -205,7 +205,7 @@ static void load_rwatchdb(char *path) slog(LG_INFO, "The RWATCH database has been converted to the OpenSEX format."); slog(LG_INFO, "The old RWATCH database now resides in rwatch.db.old which may be deleted."); } - + if (rw != NULL) { free(rw->regex); diff --git a/modules/operserv/set.c b/modules/operserv/set.c index 89dad686f3..2635e6c737 100644 --- a/modules/operserv/set.c +++ b/modules/operserv/set.c @@ -376,7 +376,7 @@ static void os_cmd_set_maxfounders(sourceinfo_t *si, int parc, char *parv[]) int value = atoi(founders); - /* Yes, I know how arbitrary the high value is, this is what it is in confprocess.c + /* Yes, I know how arbitrary the high value is, this is what it is in confprocess.c * (I rounded it down though) -- JD */ if (value < 1 || value > 41) diff --git a/modules/operserv/sgline.c b/modules/operserv/sgline.c index 84a4deb7a6..b06bfcd350 100644 --- a/modules/operserv/sgline.c +++ b/modules/operserv/sgline.c @@ -66,7 +66,7 @@ void _moddeinit(module_unload_intent_t intent) command_delete(&os_sgline_del, os_sgline_cmds); command_delete(&os_sgline_list, os_sgline_cmds); command_delete(&os_sgline_sync, os_sgline_cmds); - + hook_del_user_add(os_sgline_newuser); mowgli_patricia_destroy(os_sgline_cmds, NULL, NULL); @@ -98,7 +98,7 @@ static void os_cmd_sgline(sourceinfo_t *si, int parc, char *parv[]) /* Grab args */ char *cmd = parv[0]; command_t *c; - + /* Bad/missing arg */ if (!cmd) { @@ -190,7 +190,7 @@ static void os_cmd_sgline_add(sourceinfo_t *si, int parc, char *parv[]) { mowgli_strlcat(reason, " ", BUFSIZE); mowgli_strlcat(reason, treason, BUFSIZE); - } + } } char *p; @@ -229,7 +229,7 @@ static void os_cmd_sgline_add(sourceinfo_t *si, int parc, char *parv[]) else command_success_nodata(si, _("SGLINE on \2%s\2 was successfully added."), x->realname); - verbose_wallops("\2%s\2 is \2adding\2 an \2SGLINE\2 for \2%s\2 -- reason: \2%s\2", get_oper_name(si), x->realname, + verbose_wallops("\2%s\2 is \2adding\2 an \2SGLINE\2 for \2%s\2 -- reason: \2%s\2", get_oper_name(si), x->realname, x->reason); logcommand(si, CMDLOG_ADMIN, "SGLINE:ADD: \2%s\2 (reason: \2%s\2)", x->realname, x->reason); } @@ -239,7 +239,7 @@ static void os_cmd_sgline_del(sourceinfo_t *si, int parc, char *parv[]) char *target = parv[0]; xline_t *x; unsigned int number; - char *s; + char *s; if (!target) { @@ -309,8 +309,8 @@ static void os_cmd_sgline_del(sourceinfo_t *si, int parc, char *parv[]) } while ((s = strtok(NULL, ","))); return; - } - + } + if (!(x = xline_find(target))) { command_fail(si, fault_nosuch_target, _("No such SGLINE: \2%s\2."), target); @@ -335,7 +335,7 @@ static void os_cmd_sgline_list(sourceinfo_t *si, int parc, char *parv[]) if (param != NULL && !strcasecmp(param, "FULL")) full = true; - + if (full) command_success_nodata(si, _("SGLINE list (with reasons):")); else diff --git a/modules/operserv/soper.c b/modules/operserv/soper.c index 163fa34539..56c1cd30b6 100644 --- a/modules/operserv/soper.c +++ b/modules/operserv/soper.c @@ -188,7 +188,7 @@ static void os_cmd_soper_add(sourceinfo_t *si, int parc, char *parv[]) { if (crypto_module_loaded) { - mowgli_strlcpy(hash, crypt_string(parv[2], gen_salt()), PASSLEN); + mowgli_strlcpy(hash, crypt_string(parv[2], gen_salt()), PASSLEN); soper_add(entity(mu)->name, operclass->name, 0, hash); } else diff --git a/modules/operserv/sqline.c b/modules/operserv/sqline.c index 74112091d4..b7c57be458 100644 --- a/modules/operserv/sqline.c +++ b/modules/operserv/sqline.c @@ -61,7 +61,7 @@ void _modinit(module_t *m) hook_add_event("user_nickchange"); hook_add_user_nickchange(os_sqline_newuser); hook_add_event("channel_join"); - hook_add_channel_join(os_sqline_chanjoin); + hook_add_channel_join(os_sqline_chanjoin); } void _moddeinit(module_unload_intent_t intent) @@ -73,7 +73,7 @@ void _moddeinit(module_unload_intent_t intent) command_delete(&os_sqline_del, os_sqline_cmds); command_delete(&os_sqline_list, os_sqline_cmds); command_delete(&os_sqline_sync, os_sqline_cmds); - + hook_del_user_add(os_sqline_newuser); hook_del_user_nickchange(os_sqline_newuser); hook_del_channel_join(os_sqline_chanjoin); @@ -127,7 +127,7 @@ static void os_cmd_sqline(sourceinfo_t *si, int parc, char *parv[]) /* Grab args */ char *cmd = parv[0]; command_t *c; - + /* Bad/missing arg */ if (!cmd) { @@ -225,7 +225,7 @@ static void os_cmd_sqline_add(sourceinfo_t *si, int parc, char *parv[]) { mowgli_strlcat(reason, " ", BUFSIZE); mowgli_strlcat(reason, treason, BUFSIZE); - } + } } char *p; @@ -261,7 +261,7 @@ static void os_cmd_sqline_add(sourceinfo_t *si, int parc, char *parv[]) else command_success_nodata(si, _("SQLINE on \2%s\2 was successfully added."), q->mask); - verbose_wallops("\2%s\2 is \2adding\2 an \2SQLINE\2 for \2%s\2 -- reason: \2%s\2", get_oper_name(si), q->mask, + verbose_wallops("\2%s\2 is \2adding\2 an \2SQLINE\2 for \2%s\2 -- reason: \2%s\2", get_oper_name(si), q->mask, q->reason); logcommand(si, CMDLOG_ADMIN, "SQLINE:ADD: \2%s\2 (reason: \2%s\2)", q->mask, q->reason); } @@ -271,7 +271,7 @@ static void os_cmd_sqline_del(sourceinfo_t *si, int parc, char *parv[]) char *target = parv[0]; qline_t *q; unsigned int number; - char *s; + char *s; if (!target) { @@ -341,8 +341,8 @@ static void os_cmd_sqline_del(sourceinfo_t *si, int parc, char *parv[]) } while ((s = strtok(NULL, ","))); return; - } - + } + if (IsDigit(*target)) { unsigned int start = 0, end = 0, i; @@ -392,7 +392,7 @@ static void os_cmd_sqline_del(sourceinfo_t *si, int parc, char *parv[]) } command_success_nodata(si, _("SQLINE on \2%s\2 has been successfully removed."), q->mask); - + verbose_wallops("\2%s\2 is \2removing\2 an \2SQLINE\2 for \2%s\2 -- reason: \2%s\2", get_oper_name(si), q->mask, q->reason); @@ -401,7 +401,7 @@ static void os_cmd_sqline_del(sourceinfo_t *si, int parc, char *parv[]) return; } - + if (!(q = qline_find(target))) { command_fail(si, fault_nosuch_target, _("No such SQLINE: \2%s\2."), target); @@ -426,7 +426,7 @@ static void os_cmd_sqline_list(sourceinfo_t *si, int parc, char *parv[]) if (param != NULL && !strcasecmp(param, "FULL")) full = true; - + if (full) command_success_nodata(si, _("SQLINE list (with reasons):")); else diff --git a/modules/protocol/elemental-ircd.c b/modules/protocol/elemental-ircd.c index f628718a2f..43c6b63da1 100644 --- a/modules/protocol/elemental-ircd.c +++ b/modules/protocol/elemental-ircd.c @@ -60,16 +60,16 @@ struct cmode_ elemental_mode_list[] = { { 'F', CMODE_FTARGET}, { 'Q', CMODE_DISFWD }, { 'M', CMODE_IMMUNE }, - { 'C', CMODE_NOCTCP }, - { 'A', CMODE_ADMINONLY }, - { 'O', CMODE_OPERONLY }, - { 'S', CMODE_SSLONLY }, - { 'D', CMODE_NOACTIONS }, - { 'T', CMODE_NONOTICE }, - { 'G', CMODE_NOCAPS }, - { 'E', CMODE_NOKICKS }, - { 'd', CMODE_NONICKS }, - { 'K', CMODE_NOREPEAT }, + { 'C', CMODE_NOCTCP }, + { 'A', CMODE_ADMINONLY }, + { 'O', CMODE_OPERONLY }, + { 'S', CMODE_SSLONLY }, + { 'D', CMODE_NOACTIONS }, + { 'T', CMODE_NONOTICE }, + { 'G', CMODE_NOCAPS }, + { 'E', CMODE_NOKICKS }, + { 'd', CMODE_NONICKS }, + { 'K', CMODE_NOREPEAT }, { 'J', CMODE_KICKNOREJOIN }, { '\0', 0 } }; diff --git a/modules/protocol/ircd-seven.c b/modules/protocol/ircd-seven.c index 478ac07b3c..ab187a3352 100644 --- a/modules/protocol/ircd-seven.c +++ b/modules/protocol/ircd-seven.c @@ -202,7 +202,7 @@ static void m_nick(sourceinfo_t *si, int parc, char *parv[]) bool realchange; if (!si->su) - { + { slog(LG_DEBUG, "m_nick(): server trying to change nick: %s", si->s != NULL ? si->s->name : ""); return; } diff --git a/modules/protocol/ircnet.c b/modules/protocol/ircnet.c index 210b3982ca..08774ab73f 100644 --- a/modules/protocol/ircnet.c +++ b/modules/protocol/ircnet.c @@ -514,7 +514,7 @@ static void m_nick(sourceinfo_t *si, int parc, char *parv[]) else if (parc == 1) { if (!si->su) - { + { slog(LG_DEBUG, "m_nick(): server trying to change nick: %s", si->s != NULL ? si->s->name : ""); return; } diff --git a/modules/protocol/nefarious.c b/modules/protocol/nefarious.c index 58933416a7..c186df60fc 100644 --- a/modules/protocol/nefarious.c +++ b/modules/protocol/nefarious.c @@ -160,7 +160,7 @@ static void nefarious_on_login(user_t *u, myuser_t *mu, const char *wantedhost) } /* P10 does not support logout, so kill the user - * we can't keep track of which logins are stale and which aren't -- jilles + * we can't keep track of which logins are stale and which aren't -- jilles * Except we can in Nefarious --nenolod */ static bool nefarious_on_logout(user_t *u, const char *account) @@ -434,7 +434,7 @@ static void m_nick(sourceinfo_t *si, int parc, char *parv[]) else if (parc == 2) { if (!si->su) - { + { slog(LG_DEBUG, "m_nick(): server trying to change nick: %s", si->s != NULL ? si->s->name : ""); return; } diff --git a/modules/protocol/p10-generic.c b/modules/protocol/p10-generic.c index 5a636c0e29..d870f97898 100644 --- a/modules/protocol/p10-generic.c +++ b/modules/protocol/p10-generic.c @@ -654,11 +654,11 @@ static void m_nick(sourceinfo_t *si, int parc, char *parv[]) else if (parc == 2) { if (!si->su) - { + { slog(LG_DEBUG, "m_nick(): server trying to change nick: %s", si->s != NULL ? si->s->name : ""); return; } - + slog(LG_DEBUG, "m_nick(): nickname change from `%s': %s", si->su->nick, parv[0]); if (user_changenick(si->su, parv[0], atoi(parv[1]))) diff --git a/modules/protocol/shadowircd.c b/modules/protocol/shadowircd.c index a4c2fde749..2422ad972b 100644 --- a/modules/protocol/shadowircd.c +++ b/modules/protocol/shadowircd.c @@ -59,16 +59,16 @@ struct cmode_ shadowircd_mode_list[] = { { 'F', CMODE_FTARGET}, { 'Q', CMODE_DISFWD }, { 'M', CMODE_IMMUNE }, - { 'C', CMODE_NOCTCP }, - { 'A', CMODE_ADMINONLY }, - { 'O', CMODE_OPERONLY }, - { 'S', CMODE_SSLONLY }, - { 'D', CMODE_NOACTIONS }, - { 'T', CMODE_NONOTICE }, - { 'G', CMODE_NOCAPS }, - { 'E', CMODE_NOKICKS }, - { 'd', CMODE_NONICKS }, - { 'K', CMODE_NOREPEAT }, + { 'C', CMODE_NOCTCP }, + { 'A', CMODE_ADMINONLY }, + { 'O', CMODE_OPERONLY }, + { 'S', CMODE_SSLONLY }, + { 'D', CMODE_NOACTIONS }, + { 'T', CMODE_NONOTICE }, + { 'G', CMODE_NOCAPS }, + { 'E', CMODE_NOKICKS }, + { 'd', CMODE_NONICKS }, + { 'K', CMODE_NOREPEAT }, { 'J', CMODE_KICKNOREJOIN }, { '\0', 0 } }; diff --git a/modules/protocol/ts6-generic.c b/modules/protocol/ts6-generic.c index ead5f191b1..392f4e3075 100644 --- a/modules/protocol/ts6-generic.c +++ b/modules/protocol/ts6-generic.c @@ -176,7 +176,7 @@ static void ts6_msg(const char *from, const char *target, const char *fmt, ...) * is on it -- jilles * * Well, now it's operserv, but yes it's safe to assume that - * the source would be able to send to whatever target it is + * the source would be able to send to whatever target it is * sending to. --nenolod */ sts(":%s PRIVMSG %s :%s", CLIENT_NAME(u), t ? CLIENT_NAME(t) : target, buf); @@ -850,7 +850,7 @@ static void m_bmask(sourceinfo_t *si, int parc, char *parv[]) if (atol(parv[0]) > c->ts) return; - + type = *parv[2]; if (!strchr(ircd->ban_like_modes, type)) { @@ -914,7 +914,7 @@ static void m_nick(sourceinfo_t *si, int parc, char *parv[]) else if (parc == 2) { if (!si->su) - { + { slog(LG_DEBUG, "m_nick(): server trying to change nick: %s", si->s != NULL ? si->s->name : ""); return; } diff --git a/modules/proxyscan/dnsbl.c b/modules/proxyscan/dnsbl.c index 385cb341b2..d8f89fc21b 100644 --- a/modules/proxyscan/dnsbl.c +++ b/modules/proxyscan/dnsbl.c @@ -196,7 +196,7 @@ static void ps_cmd_dnsblexempt(sourceinfo_t *si, int parc, char *parv[]) de = n->data; if (!irccasecmp(de->ip, ip)) - { + { command_success_nodata(si, _("\2%s\2 has already been entered into the DNSBL exempts list."), ip); return; } @@ -368,7 +368,7 @@ static void initiate_blacklist_dnsquery(struct Blacklist *blptr, user_t *u) blcptr->dns_query.callback = blacklist_dns_callback; /* A sscanf worked fine for chary for many years, it'll be fine here */ - sscanf(u->ip, "%d.%d.%d.%d", &ip[3], &ip[2], &ip[1], &ip[0]); + sscanf(u->ip, "%d.%d.%d.%d", &ip[3], &ip[2], &ip[1], &ip[0]); /* becomes 2.0.0.127.torbl.ahbl.org or whatever */ snprintf(buf, sizeof buf, "%d.%d.%d.%d.%s", ip[0], ip[1], ip[2], ip[3], blptr->host); diff --git a/modules/rpgserv/search.c b/modules/rpgserv/search.c index 24bcdc9b01..2a44bfa54a 100644 --- a/modules/rpgserv/search.c +++ b/modules/rpgserv/search.c @@ -55,7 +55,7 @@ static void rs_cmd_search(sourceinfo_t *si, int parc, char *parv[]) continue; -__matched: +__matched: listed++; command_success_nodata(si, _("Channel \2%s\2:"), mc->name); diff --git a/modules/scripting/perl/api/perl_hooks_extra.h b/modules/scripting/perl/api/perl_hooks_extra.h index 32576cb367..507de9d550 100644 --- a/modules/scripting/perl/api/perl_hooks_extra.h +++ b/modules/scripting/perl/api/perl_hooks_extra.h @@ -22,7 +22,7 @@ static void perl_hook_marshal_hook_expiry_req_t(perl_hook_marshal_direction_t di { HV *hash = newHV(); SV *sv_tmp = NULL; - /* Doesn't matter which we pick here; the package name determines what it'll be + /* Doesn't matter which we pick here; the package name determines what it'll be * converted to before use. */ sv_tmp = bless_pointer_to_package(data->data.mc, packagename); hv_store(hash, argname, strlen(argname), sv_tmp, 0); diff --git a/modules/statserv/netsplit.c b/modules/statserv/netsplit.c index 84511c700d..0fecd3e4fc 100644 --- a/modules/statserv/netsplit.c +++ b/modules/statserv/netsplit.c @@ -21,7 +21,7 @@ command_t ss_netsplit = command_t ss_netsplit_list = { "LIST", N_("List currently split servers."), PRIV_SERVER_AUSPEX, 1, ss_cmd_netsplit_list, {.path = ""} }; -command_t ss_netsplit_remove = +command_t ss_netsplit_remove = { "REMOVE", N_("Remove a server from the netsplit list."), PRIV_JUPE, 2, ss_cmd_netsplit_remove, {.path = ""} }; mowgli_patricia_t *ss_netsplit_cmds; diff --git a/modules/statserv/server.c b/modules/statserv/server.c index 5dcfbb5c3d..59cb0ae347 100644 --- a/modules/statserv/server.c +++ b/modules/statserv/server.c @@ -25,7 +25,7 @@ command_t ss_server_list = command_t ss_server_count = { "COUNT", N_("Count the amount of servers connected to the network."), AC_NONE, 1, ss_cmd_server_count, {.path = ""} }; -command_t ss_server_info = +command_t ss_server_info = { "INFO", N_("Obtain information about a specified server."), AC_NONE, 2, ss_cmd_server_info, {.path = ""} }; mowgli_patricia_t *ss_server_cmds; @@ -56,7 +56,7 @@ static void ss_cmd_server(sourceinfo_t * si, int parc, char *parv[]) if (!cmd) { command_fail(si, fault_needmoreparams, STR_INSUFFICIENT_PARAMS, "SERVER"); - command_fail(si, fault_needmoreparams, + command_fail(si, fault_needmoreparams, _("Syntax: SERVER [INFO|LIST|COUNT] [parameters]")); return; } diff --git a/modules/transport/xmlrpc/main.c b/modules/transport/xmlrpc/main.c index f66eeec56c..04586d34b3 100644 --- a/modules/transport/xmlrpc/main.c +++ b/modules/transport/xmlrpc/main.c @@ -79,7 +79,7 @@ static void handle_request(connection_t *cptr, void *requestbuf) xmlrpc_process(requestbuf, cptr); current_cptr = NULL; - return; + return; } static void xmlrpc_config_ready(void *vptr) diff --git a/modules/transport/xmlrpc/xmlrpclib.c b/modules/transport/xmlrpc/xmlrpclib.c index 11e3b7a269..dfae381c85 100644 --- a/modules/transport/xmlrpc/xmlrpclib.c +++ b/modules/transport/xmlrpc/xmlrpclib.c @@ -6,7 +6,7 @@ * Please read COPYING and README for further details. * * Based on the original code from Denora - * + * * */ @@ -217,7 +217,7 @@ static char *xmlrpc_parse(char *buffer) char *tmp = NULL; /* - Okay since the buffer could contain + Okay since the buffer could contain HTTP header information, lets break off at the point that the starts */ diff --git a/tools/createburst/createburst.c b/tools/createburst/createburst.c index 70ed68054a..f014bb4fa1 100644 --- a/tools/createburst/createburst.c +++ b/tools/createburst/createburst.c @@ -26,7 +26,7 @@ /* * make createtestdb * ./createtestdb 500000 >atheme.db - * + * * then start atheme-services with this atheme.db */ diff --git a/tools/createtestdb/createtestdb.c b/tools/createtestdb/createtestdb.c index f64f06b582..6b61b54463 100644 --- a/tools/createtestdb/createtestdb.c +++ b/tools/createtestdb/createtestdb.c @@ -26,7 +26,7 @@ /* * make createtestdb * ./createtestdb 500000 >atheme.db - * + * * then start atheme-services with this atheme.db */