summary refs log tree commit diff
path: root/src/ngircd/irc-server.c
AgeCommit message (Collapse)Author
2014-03-17Re-add #include's for header files of the C file itselfAlexander Barton
This partially reverts commit b130b35f4, "Update #include's: remove unused and add missing ones", but fixes the following compiler and analyzer warnings of Apple Xcode 5: "Semantic issue: No previous prototype for function 'yyy'"
2014-03-17Update copyright notices of recently changed filesAlexander Barton
2014-03-17Update #include's: remove unused and add missing onesAlexander Barton
The "deheader" tool (<http://www.catb.org/~esr/deheader/>) has been used to find unused #include directives as well as missing ones. Tested on: - A/UX 3.1.1 - ArchLinux (2014-03-17) - Debian GNU/Hurd - Debian GNU/Linux 6.0.9 - Debian GNU/Linux 7.4 - Fedora 20 - FreeBSD 9.2 - OpenBSD 4.8 - OpenBSD 5.1 - OS X 10.9 - Solaris 11
2014-03-17Remove imp.h and exp.h header filesAlexander Barton
These include files don't have a function any more, remove them.
2013-11-06Remove unneded IRC_SetPenalty() callsFederico G. Schwindt
IRC_WriteErrClient() already calls IRC_SetPenalty(). While here convert some IRC_SetPenalty() + IRC_WriteStrClient() to IRC_WriteErrClient().
2013-10-17Add support for longer config linesFederico G. Schwindt
With the introduction of CipherList we could have longer config lines. Handle up to 1024 bytes and warn if the line will be truncated.
2013-09-06Add more penalty timesFederico G. Schwindt
Ensure before every numeric 461 there is a call to IRC_SetPenalty().
2013-09-06Rework check for number of parametersFederico G. Schwindt
Move most of the checks that return numeric 461 into Handle_Request().
2013-09-05Reorder checksFederico G. Schwindt
Move oper and Conf_MorePrivacy checks after checking the number of parameters.
2013-08-07IRC_SERVER(): Code cleanupAlexander Barton
2013-08-07Introduce new function IRC_WriteErrClient()Alexander Barton
This function is used to send "error messages", including numerics, back to clients and to automatically enforce a 2 second penalty. With this patch, all error results enforces a delay for the client. All callers of IRC_WriteStrClient(ERR_xxx) have been converted. Please note that this patch prolongs the time "make check" needs to complete its tests, because of lots of new enforced penalties ...
2013-08-04More spelling fixesFederico G. Schwindt
Remove superflous comments, mostly in German. Fix spelling and use american variants for consistency.
2013-08-04Add Client_HasFlag() to check if a client has certain flagFederico G. Schwindt
2013-08-04Fix spellingFederico G. Schwindt
2013-08-03Update irc-server.c to use irc-macros.hAlexander Barton
And add some comments :-)
2013-01-26Streamline punctuation of log messagesAlexander Barton
Make sure that all log messages end with a correct punctuation mark. The rules for formatting log messages are: 1. Add punctuation marks to all messages passed to the actual logging functions like Log() and LogDebug(). 2. Don't add any punctuation marks to messages that are stored in variables for later use or are passed over the network. 3. IP addresses, DNS host names and IRC server names should be quoted. 4. Messages originating in the network should be quoted (at least if they are "untrusted" or variable). Most probably this patch doesn't fix all mistakes, but it should be a good starting point ...
2012-10-29Fix warning message introduced when cleaning up IRC_SERVER()Alexander Barton
This reverts a not intentional code change and fixes the following compiler warning message (tested with gcc 4.4.5): irc-server.c: In function "IRC_SERVER": irc-server.c:142: warning: suggest parentheses around operand of "!" or change "&" to "&&" or "!" to "~"
2012-10-29Don't accept connections for servers already beeing linkedAlexander Barton
If two servers try to link each other, there was a time frame that could result in one connection overwriting the other, e. g. the incoming connection overwriting the status of the outgoing one. And this could lead to all kind of weirdness (even crashes!) later on. So now such incoming connections are dropped. But this most probably prevents the two servers from linking until timing changes somehow (network latency?) because each server drops the incoming connection of the other one, so no connection survives in the end. But this has to be addressed by an other patch ...
2012-10-29IRC_SERVER(): Code cleanupAlexander Barton
2012-09-26NJOIN: correctly reset channel level flagsAlexander Barton
This fixes commit 7b01bb83. Bug reported by DNS777 <dns@rbose.org>, thanks!
2012-09-11Fix some "whitespace glitches"Alexander Barton
Some have been introduced by commit 7b01bb83, some are older.
2012-09-11Merge branch 'xop' of https://github.com/kart0ffelsack/ngircd into bug92-xopAlexander Barton
* 'xop' of https://github.com/kart0ffelsack/ngircd: Tests and documentation for xop Implemented xop support Conflicts (because of merge of the 'cmode-M' branch): src/ngircd/channel.c src/ngircd/defines.h src/ngircd/messages.h
2012-08-23Indentation and style fixes.Brett Smith
2012-08-23Move client password from the Client to the Connection struct.Brett Smith
This is a relatively naive implementation, basically doing the bare minimum necessary to make the switchover go. Subsequent commits can focus on improving the implementation.
2012-08-06Implemented xop supportSebastian Köhler
3 new channel user modes have been added. Half Op: +h(Prefix: %) can set the channel modes +imntvIbek and kick all +v and normal users. Admin: +a(Prefix: &) can set channel modes +imntvIbekoRsz and kick all +o, +h, +v and normal users. Owner: +q(Prefix: ~) can set channel modes +imntvIbekoRsz and kick all +a, +o, +h, +v and normal users
2011-03-21Generate WALLOPS message on SQUIT from IRC operatorAlexander Barton
So SQUIT now behaves like CONNECT and DISCONNECT commands, when called by an IRC operator (and not received from an other server).
2011-02-13Code cleanup: mostly removing empty linesAlexander Barton
2011-02-13Add Doxygen @file documentation to each source and header fileAlexander Barton
2010-06-30Don't #include client.h when conn.h/conn-func.h is already includedAlexander Barton
conn.h and cinn-func.h both already #include client.h, so it is not needed to do it twice.
2010-06-29Only #include resolve.h if it is really neededAlexander Barton
2009-09-30Generate WALLOPS message on operator-generated SQUITAlexander Barton
2009-09-30Enable SQUIT command for IRC OperatorsAlexander Barton
This patch enables IRC Operators to use the SQUIT command as specified in RFC 2812, section 3.1.8 "Squit". When forwarding SQUIT commands, the server connected to the target will drop the connection (not the target server itself!). Please note: - the configuration option "AllowRemoteOper" mus be enabled on the server disconnecting the target to allow forwarding of SQUIT commands. - if the remote server is configured to establish the connection, it will just do this; so the disconnect is not permanent in this case!
2009-09-30Code cleanup of IRC_SQUIT() in preparation to deal with bug #73.Alexander Barton
2009-09-11IRC_SERVER(): code cleanup, remove unneeded variableAlexander Barton
2009-04-22irc-server: do not remove hostnames from info textFlorian Westphal
that code does not really make sense -- the info text is freely cofngiureable and des not follow a specific format. Also, that "+2" might have caused invalid memory accesses.
2009-04-21remove or translate old commentsFlorian Westphal
2008-09-23Server links: detect RFC 1459 mode direct after SERVER commandAlexander Barton
This patch allows ngIRCd to detect right after receiving the SERVER command from the peer whether the RFC 1459 compatibility mode must be used or not. And it fixes the announcement of users during establishing new server links with such peers.
2007-11-21Introduce option to configure the maximum nick name lenth in ngircd.confAlexander Barton
- New configuration option "MaxNickLength" to specify the allowed maximum length of user nick names. Note: must be unique in an IRC network! - Enhanced the IRC+ protocol to support an enhanced "server handshake" and enable server to recognice numeric 005 (ISUPPORT) and 376 (ENDOFMOTD). See doc/Protocol.txt for details.
2007-11-20Fixes the wrong logging output when nested servers are introducedAlexander Barton
to the network as well as the wrong output of the LINKS command.
2007-11-18Fix code to compile using K&R C compiler and ansi2kr again.Alexander Barton
2006-12-07moved invite/ban lists to channel structureFlorian Westphal
2006-12-02Log(LOG_DEBUG, .. -> LogDebug()Florian Westphal
2006-10-06channel maxusers now unsigned longFlorian Westphal
2006-10-01Allow PASS syntax defined in RFC 1459 for server links, too.Alexander Barton
Removed client status CLIENT_GOTPASSSERVER.
2006-04-30Send invite and ban lists only once and not repeatedly for every channel.Alexander Barton
2005-03-19Remove INT, LONG, BOOLEAN, STATIC, CONST, CHAR datatypes.Florian Westphal
use stdbool.h / inttypes.h if available.
2004-05-11Fixed resolver when using IDENT lookups, cleaned up code.Alexander Barton
2004-04-25Synchronize INVITE- and BAN-lists if the peer requests it:Alexander Barton
server flag "L". And better debug logging.
2004-01-17Added #include for strings.h to fix compiler warnings.Alexander Barton
2003-12-26Removed "USE_" prefixes of configuration #defines.Alexander Barton