Compare commits
22 Commits
armageddon
...
test
Author | SHA1 | Date |
---|---|---|
Sam Dodrill | 417a320324 | |
Sam Dodrill | e1657f04ec | |
Sam Dodrill | daac54878c | |
Sam Dodrill | e7f3a5ad93 | |
Sam Dodrill | 9c83aac397 | |
Sam Dodrill | 0c372c65fc | |
Sam Dodrill | 8cff086fc5 | |
Sam Dodrill | 48a3589d5e | |
Sam Dodrill | 7c4267175b | |
Sam Dodrill | aa4ebff4a5 | |
Sam Dodrill | a3e2e47b86 | |
Sam Dodrill | 88cd0168ad | |
Sam Dodrill | 874ca05045 | |
Sam Dodrill | 2c0ee6900c | |
Sam Dodrill | 9b969de641 | |
Sam Dodrill | cc0c8d338d | |
Sam Dodrill | 0361eeeedf | |
Sam Dodrill | a6eb07553e | |
Sam Dodrill | 62a511ab7b | |
Sam Dodrill | 3e6d026b38 | |
Sam Dodrill | 100324f5c9 | |
Sam Dodrill | 771cc10e92 |
|
@ -0,0 +1 @@
|
|||
.gitignore
|
|
@ -40,3 +40,5 @@ tools/mkpasswd
|
|||
tools/viconf
|
||||
include/serno.h
|
||||
libratbox/src/version.c.last
|
||||
*.pyc
|
||||
.git
|
||||
|
|
|
@ -5,8 +5,5 @@ compiler:
|
|||
before-install:
|
||||
- sudo apt-get update
|
||||
install:
|
||||
- sudo apt-get install build-essential libssl-dev flex bison
|
||||
script: "./configure && make"
|
||||
|
||||
notifications:
|
||||
irc: "irc.yolo-swag.com#elemental-ircd"
|
||||
- sudo apt-get install build-essential libssl-dev flex bison astyle
|
||||
script: "(cd ./testsuite/astyle && ./check_style.sh) && ./configure && make"
|
||||
|
|
|
@ -0,0 +1,118 @@
|
|||
import os
|
||||
import ycm_core
|
||||
|
||||
# These are the compilation flags that will be used in case there's no
|
||||
# compilation database set (by default, one is not set).
|
||||
# CHANGE THIS LIST OF FLAGS. YES, THIS IS THE DROID YOU HAVE BEEN LOOKING FOR.
|
||||
flags = [
|
||||
'-Wall',
|
||||
'-Wextra',
|
||||
'-Werror',
|
||||
'-g',
|
||||
'-g',
|
||||
'-Iinclude',
|
||||
'-Ilibratbox/include',
|
||||
]
|
||||
|
||||
# Set this to the absolute path to the folder (NOT the file!) containing the
|
||||
# compile_commands.json file to use that instead of 'flags'. See here for
|
||||
# more details: http://clang.llvm.org/docs/JSONCompilationDatabase.html
|
||||
#
|
||||
# You can get CMake to generate this file for you by adding:
|
||||
# set( CMAKE_EXPORT_COMPILE_COMMANDS 1 )
|
||||
# to your CMakeLists.txt file.
|
||||
#
|
||||
# Most projects will NOT need to set this to anything; you can just change the
|
||||
# 'flags' list of compilation flags. Notice that YCM itself uses that approach.
|
||||
compilation_database_folder = ''
|
||||
|
||||
if os.path.exists( compilation_database_folder ):
|
||||
database = ycm_core.CompilationDatabase( compilation_database_folder )
|
||||
else:
|
||||
database = None
|
||||
|
||||
SOURCE_EXTENSIONS = [ '.cpp', '.cxx', '.cc', '.c', '.m', '.mm' ]
|
||||
|
||||
def DirectoryOfThisScript():
|
||||
return os.path.dirname( os.path.abspath( __file__ ) )
|
||||
|
||||
|
||||
def MakeRelativePathsInFlagsAbsolute( flags, working_directory ):
|
||||
if not working_directory:
|
||||
return list( flags )
|
||||
new_flags = []
|
||||
make_next_absolute = False
|
||||
path_flags = [ '-isystem', '-I', '-iquote', '--sysroot=' ]
|
||||
for flag in flags:
|
||||
new_flag = flag
|
||||
|
||||
if make_next_absolute:
|
||||
make_next_absolute = False
|
||||
if not flag.startswith( '/' ):
|
||||
new_flag = os.path.join( working_directory, flag )
|
||||
|
||||
for path_flag in path_flags:
|
||||
if flag == path_flag:
|
||||
make_next_absolute = True
|
||||
break
|
||||
|
||||
if flag.startswith( path_flag ):
|
||||
path = flag[ len( path_flag ): ]
|
||||
new_flag = path_flag + os.path.join( working_directory, path )
|
||||
break
|
||||
|
||||
if new_flag:
|
||||
new_flags.append( new_flag )
|
||||
return new_flags
|
||||
|
||||
|
||||
def IsHeaderFile( filename ):
|
||||
extension = os.path.splitext( filename )[ 1 ]
|
||||
return extension in [ '.h', '.hxx', '.hpp', '.hh' ]
|
||||
|
||||
|
||||
def GetCompilationInfoForFile( filename ):
|
||||
# The compilation_commands.json file generated by CMake does not have entries
|
||||
# for header files. So we do our best by asking the db for flags for a
|
||||
# corresponding source file, if any. If one exists, the flags for that file
|
||||
# should be good enough.
|
||||
if IsHeaderFile( filename ):
|
||||
basename = os.path.splitext( filename )[ 0 ]
|
||||
for extension in SOURCE_EXTENSIONS:
|
||||
replacement_file = basename + extension
|
||||
if os.path.exists( replacement_file ):
|
||||
compilation_info = database.GetCompilationInfoForFile(
|
||||
replacement_file )
|
||||
if compilation_info.compiler_flags_:
|
||||
return compilation_info
|
||||
return None
|
||||
return database.GetCompilationInfoForFile( filename )
|
||||
|
||||
|
||||
def FlagsForFile( filename, **kwargs ):
|
||||
if database:
|
||||
# Bear in mind that compilation_info.compiler_flags_ does NOT return a
|
||||
# python list, but a "list-like" StringVec object
|
||||
compilation_info = GetCompilationInfoForFile( filename )
|
||||
if not compilation_info:
|
||||
return None
|
||||
|
||||
final_flags = MakeRelativePathsInFlagsAbsolute(
|
||||
compilation_info.compiler_flags_,
|
||||
compilation_info.compiler_working_dir_ )
|
||||
|
||||
# NOTE: This is just for YouCompleteMe; it's highly likely that your project
|
||||
# does NOT need to remove the stdlib flag. DO NOT USE THIS IN YOUR
|
||||
# ycm_extra_conf IF YOU'RE NOT 100% SURE YOU NEED IT.
|
||||
try:
|
||||
final_flags.remove( '-stdlib=libc++' )
|
||||
except ValueError:
|
||||
pass
|
||||
else:
|
||||
relative_to = DirectoryOfThisScript()
|
||||
final_flags = MakeRelativePathsInFlagsAbsolute( flags, relative_to )
|
||||
|
||||
return {
|
||||
'flags': final_flags,
|
||||
'do_cache': True
|
||||
}
|
|
@ -1,20 +1,43 @@
|
|||
# Contribution guidelines
|
||||
|
||||
Please open contributions as either issue reports or pull requests. We will ask
|
||||
that anything that requires testing outside our normally supported platforms be
|
||||
Please open contributions as either issue reports or pull requests. We will ask
|
||||
that anything that requires testing outside our normally supported platforms be
|
||||
marked as such.
|
||||
|
||||
As ircd is such an ancient project with varying code styles, please try to
|
||||
follow the current coding style of the file you are in. If all else fails,
|
||||
please use the [Linux Kernel](https://www.kernel.org/doc/Documentation/CodingStyle)
|
||||
coding style.
|
||||
Style
|
||||
-----
|
||||
|
||||
Please run all code against the following `astyle` command before sending in
|
||||
Please run all code against the following `astyle` command before sending in
|
||||
a pull request:
|
||||
|
||||
```console
|
||||
$ astyle --style=linux --mode=c -n $file
|
||||
```
|
||||
|
||||
It should be trivial to set up your text editor to do this for you.
|
||||
It should be trivial to set up your text editor to do this for you. If you use
|
||||
vim, add this to your vim configuration:
|
||||
|
||||
```vimscript
|
||||
" Lvimrc
|
||||
" if .lvimrc exists in current or parent directory of the currently loaded file,
|
||||
" load it as config
|
||||
if filereadable('../.lvimrc')
|
||||
source ../.lvimrc
|
||||
endif
|
||||
if filereadable('./.lvimrc')
|
||||
source ./.lvimrc
|
||||
endif
|
||||
```
|
||||
|
||||
Otherwise please make sure the appropriate command is ran as part of your
|
||||
editing process before you send a pull request. All pull requests that do not
|
||||
follow the coding style will not be considered until they follow the coding
|
||||
style.
|
||||
|
||||
Testing
|
||||
-------
|
||||
|
||||
When testing Elemental, please be sure to test it on a network of at least
|
||||
3 instances of elemental. Please also be sure to have one of these instances
|
||||
run **without** the patch you are testing, to be able to show that there is
|
||||
a difference.
|
||||
|
|
4
NEWS
4
NEWS
|
@ -1,6 +1,10 @@
|
|||
This is elemental-ircd 6.6.1, Copyright (c) 2014 elemental-ircd team.
|
||||
See LICENSE for licensing details (GPL v2).
|
||||
|
||||
-- elemental-ircd 6.6.2
|
||||
|
||||
Fix ban logic
|
||||
|
||||
-- elemental-ircd 6.6.1
|
||||
|
||||
All code is now in the linux kernel coding style. Patches that do not
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.69 for elemental-ircd 6.6.1.
|
||||
# Generated by GNU Autoconf 2.69 for elemental-ircd 6.6.2.
|
||||
#
|
||||
# 2014 elemental-ircd Team
|
||||
#
|
||||
|
@ -579,8 +579,8 @@ MAKEFLAGS=
|
|||
# Identity of this package.
|
||||
PACKAGE_NAME='elemental-ircd'
|
||||
PACKAGE_TARNAME='elemental-ircd'
|
||||
PACKAGE_VERSION='6.6.1'
|
||||
PACKAGE_STRING='elemental-ircd 6.6.1'
|
||||
PACKAGE_VERSION='6.6.2'
|
||||
PACKAGE_STRING='elemental-ircd 6.6.2'
|
||||
PACKAGE_BUGREPORT=''
|
||||
PACKAGE_URL=''
|
||||
|
||||
|
@ -1303,7 +1303,7 @@ if test "$ac_init_help" = "long"; then
|
|||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures elemental-ircd 6.6.1 to adapt to many kinds of systems.
|
||||
\`configure' configures elemental-ircd 6.6.2 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
|
@ -1364,7 +1364,7 @@ fi
|
|||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of elemental-ircd 6.6.1:";;
|
||||
short | recursive ) echo "Configuration of elemental-ircd 6.6.2:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
|
@ -1488,7 +1488,7 @@ fi
|
|||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
elemental-ircd configure 6.6.1
|
||||
elemental-ircd configure 6.6.2
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
|
@ -2092,7 +2092,7 @@ cat >config.log <<_ACEOF
|
|||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by elemental-ircd $as_me 6.6.1, which was
|
||||
It was created by elemental-ircd $as_me 6.6.2, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
|
@ -10100,7 +10100,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
|||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by elemental-ircd $as_me 6.6.1, which was
|
||||
This file was extended by elemental-ircd $as_me 6.6.2, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
|
@ -10166,7 +10166,7 @@ _ACEOF
|
|||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
elemental-ircd config.status 6.6.1
|
||||
elemental-ircd config.status 6.6.2
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ AC_PREREQ(2.57)
|
|||
dnl Sneaky way to get an Id tag into the configure script
|
||||
AC_COPYRIGHT([2014 elemental-ircd Team])
|
||||
|
||||
AC_INIT([elemental-ircd],[6.6.1])
|
||||
AC_INIT([elemental-ircd],[6.6.2])
|
||||
|
||||
AC_CONFIG_HEADER(include/setup.h)
|
||||
|
||||
|
|
|
@ -57,13 +57,6 @@ serverinfo {
|
|||
helpurl = "http://www.mynet.net/help";
|
||||
hub = yes;
|
||||
|
||||
/* On multi-homed hosts you may need the following. These define
|
||||
* the addresses we connect from to other servers. */
|
||||
/* for IPv4 */
|
||||
#vhost = "192.169.0.1";
|
||||
/* for IPv6 */
|
||||
#vhost6 = "3ffe:80e8:546::2";
|
||||
|
||||
/* ssl_private_key: our ssl private key */
|
||||
ssl_private_key = "etc/ssl.key";
|
||||
|
||||
|
|
|
@ -159,16 +159,6 @@ serverinfo {
|
|||
*/
|
||||
hub = no;
|
||||
|
||||
/* vhost: the IP to bind to when we connect outward to ipv4 servers.
|
||||
* This should be an ipv4 IP only.
|
||||
*/
|
||||
#vhost = "192.169.0.1";
|
||||
|
||||
/* vhost6: the IP to bind to when we connect outward to ipv6 servers.
|
||||
* This should be an ipv6 IP only.
|
||||
*/
|
||||
#vhost6 = "3ffe:80e8:546::2";
|
||||
|
||||
/* ssl_private_key: our ssl private key */
|
||||
ssl_private_key = "etc/ssl.key";
|
||||
|
||||
|
|
|
@ -155,16 +155,6 @@ serverinfo {
|
|||
*/
|
||||
hub = no;
|
||||
|
||||
/* vhost: the IP to bind to when we connect outward to ipv4 servers.
|
||||
* This should be an ipv4 IP only.
|
||||
*/
|
||||
#vhost = "192.169.0.1";
|
||||
|
||||
/* vhost6: the IP to bind to when we connect outward to ipv6 servers.
|
||||
* This should be an ipv6 IP only.
|
||||
*/
|
||||
#vhost6 = "3ffe:80e8:546::2";
|
||||
|
||||
/* ssl_private_key: our ssl private key */
|
||||
ssl_private_key = "etc/ssl.key";
|
||||
|
||||
|
|
|
@ -67,7 +67,6 @@ SRCS = \
|
|||
m_mkpasswd.c \
|
||||
m_oaccept.c \
|
||||
m_ojoin.c \
|
||||
m_olist.c \
|
||||
m_okick.c \
|
||||
m_omode.c \
|
||||
m_opme.c \
|
||||
|
|
|
@ -1,149 +0,0 @@
|
|||
/*
|
||||
* ircd-ratbox: A slightly useful ircd.
|
||||
* m_olist.c: List channels. olist is an oper only command
|
||||
* that shows channels regardless of modes. This
|
||||
* is kinda evil, and might be morally wrong, but
|
||||
* somebody will likely need it.
|
||||
*
|
||||
* Copyright (C) 2002 by the past and present ircd coders, and others.
|
||||
* Copyright (C) 2004 ircd-ratbox Development Team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
* USA
|
||||
*
|
||||
*/
|
||||
|
||||
#include "stdinc.h"
|
||||
#include "channel.h"
|
||||
#include "client.h"
|
||||
#include "ircd.h"
|
||||
#include "numeric.h"
|
||||
#include "logger.h"
|
||||
#include "s_serv.h"
|
||||
#include "send.h"
|
||||
#include "whowas.h"
|
||||
#include "match.h"
|
||||
#include "hash.h"
|
||||
#include "msg.h"
|
||||
#include "parse.h"
|
||||
#include "modules.h"
|
||||
#include "s_newconf.h"
|
||||
|
||||
static int mo_olist(struct Client *, struct Client *, int parc, const char *parv[]);
|
||||
|
||||
#ifndef STATIC_MODULES
|
||||
|
||||
struct Message olist_msgtab = {
|
||||
"OLIST", 0, 0, 0, MFLG_SLOW,
|
||||
{mg_unreg, mg_not_oper, mg_ignore, mg_ignore, mg_ignore, {mo_olist, 1}}
|
||||
};
|
||||
|
||||
mapi_clist_av1 olist_clist[] = { &olist_msgtab, NULL };
|
||||
|
||||
DECLARE_MODULE_AV1(okick, NULL, NULL, olist_clist, NULL, NULL, "$Revision: 6 $");
|
||||
|
||||
#endif
|
||||
|
||||
static void list_all_channels(struct Client *source_p);
|
||||
static void list_named_channel(struct Client *source_p, const char *name);
|
||||
|
||||
/*
|
||||
** mo_olist
|
||||
** parv[1] = channel
|
||||
*/
|
||||
static int
|
||||
mo_olist(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
|
||||
{
|
||||
if(!IsOperSpy(source_p)) {
|
||||
sendto_one(source_p, form_str(ERR_NOPRIVS),
|
||||
me.name, source_p->name, "oper_spy");
|
||||
sendto_one(source_p, form_str(RPL_LISTEND),
|
||||
me.name, source_p->name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* If no arg, do all channels *whee*, else just one channel */
|
||||
if(parc < 2 || EmptyString(parv[1]))
|
||||
list_all_channels(source_p);
|
||||
else
|
||||
list_named_channel(source_p, parv[1]);
|
||||
|
||||
sendto_one(source_p, form_str(RPL_LISTEND), me.name, source_p->name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* list_all_channels
|
||||
* inputs - pointer to client requesting list
|
||||
* output - 0/1
|
||||
* side effects - list all channels to source_p
|
||||
*/
|
||||
static void
|
||||
list_all_channels(struct Client *source_p)
|
||||
{
|
||||
struct Channel *chptr;
|
||||
rb_dlink_node *ptr;
|
||||
|
||||
report_operspy(source_p, "LIST", NULL);
|
||||
sendto_one(source_p, form_str(RPL_LISTSTART), me.name, source_p->name);
|
||||
|
||||
RB_DLINK_FOREACH(ptr, global_channel_list.head) {
|
||||
chptr = ptr->data;
|
||||
|
||||
sendto_one(source_p, ":%s 322 %s %s %lu :[%s] %s",
|
||||
me.name, source_p->name, chptr->chname,
|
||||
rb_dlink_list_length(&chptr->members),
|
||||
channel_modes(chptr, &me),
|
||||
chptr->topic == NULL ? "" : chptr->topic);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* list_named_channel
|
||||
* inputs - pointer to client requesting list
|
||||
* output - 0/1
|
||||
* side effects - list all channels to source_p
|
||||
*/
|
||||
static void
|
||||
list_named_channel(struct Client *source_p, const char *name)
|
||||
{
|
||||
struct Channel *chptr;
|
||||
char *p;
|
||||
char *n = LOCAL_COPY(name);
|
||||
|
||||
if((p = strchr(n, ',')))
|
||||
*p = '\0';
|
||||
|
||||
/* Put operspy notice before any output, but only if channel exists */
|
||||
chptr = EmptyString(n) ? NULL : find_channel(n);
|
||||
if(chptr != NULL)
|
||||
report_operspy(source_p, "LIST", chptr->chname);
|
||||
|
||||
sendto_one(source_p, form_str(RPL_LISTSTART), me.name, source_p->name);
|
||||
|
||||
if(EmptyString(n))
|
||||
return;
|
||||
|
||||
if(chptr == NULL)
|
||||
sendto_one_numeric(source_p, ERR_NOSUCHCHANNEL,
|
||||
form_str(ERR_NOSUCHCHANNEL), n);
|
||||
else
|
||||
sendto_one(source_p, ":%s 322 %s %s %lu :[%s] %s", me.name, source_p->name,
|
||||
chptr->chname, rb_dlink_list_length(&chptr->members),
|
||||
channel_modes(chptr, &me), chptr->topic ? chptr->topic : "");
|
||||
}
|
|
@ -485,6 +485,10 @@ msg_channel(int p_or_n, const char *command,
|
|||
rb_strlcpy(text2, text, BUFSIZE);
|
||||
strip_unprintable(text2);
|
||||
|
||||
if(!MyClient(source_p)) {
|
||||
goto skip_NOCAPS_check;
|
||||
}
|
||||
|
||||
// Don't count the "ACTION" part of action as part of the message --SnoFox
|
||||
if (p_or_n != NOTICE && *text == '\001' &&
|
||||
!strncasecmp(text + 1, "ACTION ", 7)) {
|
||||
|
@ -503,6 +507,7 @@ msg_channel(int p_or_n, const char *command,
|
|||
return;
|
||||
}
|
||||
}
|
||||
skip_NOCAPS_check:
|
||||
|
||||
if(chptr->mode.mode & MODE_NOCOLOR && (!ConfigChannel.exempt_cmode_c || !is_any_op(msptr))) {
|
||||
rb_strlcpy(text2, text, BUFSIZE);
|
||||
|
|
|
@ -219,7 +219,7 @@ get_channel_access(struct Client *source_p, struct membership *msptr)
|
|||
/* check_bans_number()
|
||||
*
|
||||
* inputs - client, channel ban list
|
||||
* outputs - 0 on ban being allowed, 1 on ban being disallowed
|
||||
* outputs - 1 on ban being allowed, 0 on ban being disallowed
|
||||
* side effects - none
|
||||
*/
|
||||
int
|
||||
|
@ -227,10 +227,10 @@ check_bans_number(struct Client *source_p, struct Channel *chptr, rb_dlink_list
|
|||
{
|
||||
if (rb_dlink_list_length(list) >= (chptr->mode.mode & MODE_EXLIMIT ?
|
||||
ConfigChannel.max_bans_large : ConfigChannel.max_bans)) {
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* add_id()
|
||||
|
|
|
@ -1002,6 +1002,9 @@ validate_conf(void)
|
|||
cflag_orphan('M');
|
||||
continue;
|
||||
}
|
||||
if(*dm == 'u') {
|
||||
cflag_orphan('u');
|
||||
}
|
||||
}
|
||||
}
|
||||
construct_cflag_param_string();
|
||||
|
|
|
@ -0,0 +1,66 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
set -x
|
||||
|
||||
cd ../..
|
||||
|
||||
for file in $(find **/*.c)
|
||||
do
|
||||
if [[ $file = "bandb/sqlite3.c" ]]
|
||||
then
|
||||
continue
|
||||
fi
|
||||
|
||||
if [[ $file = "src/lex.yy.c" ]]
|
||||
then
|
||||
continue
|
||||
fi
|
||||
|
||||
if [[ $file = "src/y.tab.c" ]]
|
||||
then
|
||||
continue
|
||||
fi
|
||||
|
||||
if [[ $file = "tools/convertilines.c" ]]
|
||||
then
|
||||
continue
|
||||
fi
|
||||
|
||||
if [[ $file = "tools/convertklines.c" ]]
|
||||
then
|
||||
continue
|
||||
fi
|
||||
|
||||
if [[ $file = "tools/mkpasswd.c" ]]
|
||||
then
|
||||
continue
|
||||
fi
|
||||
|
||||
if [[ $file = "tools/viconf.c" ]]
|
||||
then
|
||||
continue
|
||||
fi
|
||||
|
||||
if [[ $file = "unsupported/make_override_immune.c" ]]
|
||||
then
|
||||
continue
|
||||
fi
|
||||
|
||||
if [[ $file = "unsupported/m_clearchan.c" ]]
|
||||
then
|
||||
continue
|
||||
fi
|
||||
|
||||
if [[ $file = "unsupported/sno_channeljoin.c" ]]
|
||||
then
|
||||
continue
|
||||
fi
|
||||
|
||||
if [[ $(astyle --style=linux --mode=c -n $file 2>&1 | cut -f1 -d' ') = "Unchanged" ]]
|
||||
then
|
||||
echo "$file passed coding standards"
|
||||
else
|
||||
echo "$file is not at coding standards."
|
||||
exit 1
|
||||
fi
|
||||
done
|
Loading…
Reference in New Issue