Commit Graph

41 Commits

Author SHA1 Message Date
Alexander Barton a13bb78b1e Update copyright notices of recently changed files 2014-03-17 12:22:00 +01:00
Alexander Barton b130b35f48 Update #include's: remove unused and add missing ones
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-17 11:37:25 +01:00
Alexander Barton 259c314d14 Remove imp.h and exp.h header files
These include files don't have a function any more, remove them.
2014-03-17 00:17:02 +01:00
Federico G. Schwindt 80d0613bf2 Use sizeof() intead of the explicit size 2013-11-06 18:25:11 +00:00
Alexander Barton 131364def1 IRC_SetPenalty(): Code cleanup 2013-09-07 00:05:49 +02:00
Alexander Barton 904c8a4375 Introduce new function IRC_WriteErrClient()
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-07 00:10:50 +02:00
Alexander Barton 0a3d8d60d3 irc-write.c: Clean up code and add more documentation comments 2013-08-06 23:21:48 +02:00
Alexander Barton 08d49a8fa0 Fix return code of some IRC_WriteXXX() functions
These functions usually write to more than one target, and therefore
can't return value indicating success or failure in a sane way. And, even
more omportant, these functions should send to as much as possible clients
and not stop at the first client which isn't reachable any more!
2013-08-06 23:18:57 +02:00
Federico G. Schwindt 15dfdaac82 More spelling fixes
Remove superflous comments, mostly in German. Fix spelling and
use american variants for consistency.
2013-08-04 12:45:11 +01:00
Federico G. Schwindt e03d8eb728 Add Client_HasFlag() to check if a client has certain flag 2013-08-04 04:00:34 +01:00
Alexander Barton 2a7dd06ebd Code cleanup: mostly removing empty lines 2011-02-13 17:52:38 +01:00
Alexander Barton 03628dbeaf Add Doxygen @file documentation to each source and header file 2011-02-13 17:52:38 +01:00
Alexander Barton 31ea0f8ee9 IRC_WriteStrClientPrefix() / Get_Prefix(): respect hostname cloaking 2010-08-17 21:14:51 +02:00
Alexander Barton fd4dfccc30 Refactor IRC_WriteStr{Channel|Related}Prefix(); support cloaking
Move common code to new local function Send_Marked_Connections()
and respect hostname cloaking.
2010-08-17 21:11:37 +02:00
Alexander Barton 5462c6c50f Don't #include client.h when conn.h/conn-func.h is already included
conn.h and cinn-func.h both already #include client.h, so it is
not needed to do it twice.
2010-06-30 23:49:52 +02:00
Alexander Barton 0c0d4af55a const'ify IRC_WriteStrXXX() and Get_Prefix() functions 2010-06-26 00:38:20 +02:00
Alexander Barton 7d6de7c352 IRC_SendWallops(): support format string and variable parameter lists. 2009-09-30 16:00:05 +02:00
Alexander Barton eaaf0c3bd5 New function IRC_SendWallops().
Implement new global function IRC_SendWallops() that can be called by
other functions to generate WALLOPS messages to users with +w mode.
2009-09-30 16:00:05 +02:00
Florian Westphal 544b9884f4 remove or translate old comments 2009-04-21 20:58:30 +02:00
Alexander Barton f199d63724 New function IRC_WriteStrServersPrefixFlag_CB() using a callback function. 2008-09-23 11:47:17 +02:00
Florian Westphal 0eccdbc137 -whitespace damage 2006-08-12 11:56:24 +00:00
Alexander Barton dd3a3bc603 Use some more specific data types (e. g. pid_t vs. int), make "SPLint" happy :-) 2006-05-10 21:24:01 +00:00
Alexander Barton 77f54693ef Removed unnecessary #define of "LOCAL", now use plain C "static" instead. 2005-07-31 20:13:07 +00:00
Alexander Barton aa25cd7da2 Reorder #includes, necessary due to removal of #include "defines.h" in
the client.h header file.
2005-04-27 07:38:00 +00:00
Florian Westphal 8adff59223 Remove INT, LONG, BOOLEAN, STATIC, CONST, CHAR datatypes.
use stdbool.h / inttypes.h if available.
2005-03-19 18:43:48 +00:00
Alexander Barton c1f32e8214 Made ngIRCd compile on HP/UX 10.20 with native HP pre-ANSI C compiler and
most probably other older C compilers on other systems.
2004-10-20 13:47:32 +00:00
Alexander Barton 7b6e26628a Fixed and enhanced penalty handling; changed internal time resoluiton of
the server to one second. Code cleanup.
2003-11-05 23:24:48 +00:00
Alexander Barton b8d7dcec77 - Adjusted includes for new "conn-func.h" header. 2002-12-30 17:15:42 +00:00
Alexander Barton 490f28ffd1 - new file header format (in english);
- new file ident semantics.
2002-12-12 12:24:18 +00:00
Alexander Barton a6265aa0df - falsche Konstante korrigiert ... *argl*! 2002-11-04 13:26:00 +00:00
Alexander Barton 4c870f4be9 - Server und "normale" Clients werden wieder korrekt unterschieden. 2002-11-04 12:34:22 +00:00
Alexander Barton 601f0ede61 - Modul an neues Connection-Handling angepasst. 2002-11-02 22:59:41 +00:00
Alexander Barton ec474a4bd2 - "format-string-bugs", die zum Abbruch des Servers fuehrten, behoben. 2002-10-04 11:21:46 +00:00
Alexander Barton 982a08b80d - katastrophalen Fix fuer Return-Wert korrigiert ... ARGL! 2002-09-17 17:11:56 +00:00
Alexander Barton e6f96a7a86 - IRC_WriteStrServersPrefix() lieferte einen Return-Wert, obwohl als VOID deklariert. 2002-09-16 09:19:23 +00:00
Alexander Barton 3010f03414 - neue Funktion IRC_WriteStrServersPrefixFlag(). 2002-09-03 23:56:06 +00:00
Alexander Barton f7327524fc - Weitere Anpassungen an pre-ANSI-Compiler. 2002-05-30 16:52:20 +00:00
Alexander Barton c2f60abe55 - Anpassungen an pre-ANSI-Compiler,
- Includes aufgeraumt: Header includieren keine anderen mehr.
2002-05-27 13:09:26 +00:00
Alexander Barton 117c1df65a - bei Get_Prefix() fehlte das "LOCAL". 2002-03-25 17:13:07 +00:00
Alexander Barton ca33cbda05 - externe portab-Header werden nicht mehr benoetigt/benutzt, dadurch
einige Aenderungen an diversen Source-Dateien und Headern.
- Dateien enthalten keine CVS-History mehr.
2002-03-12 14:37:51 +00:00
Alexander Barton c23199d971 - Modul aus irc.c bzw. irc.h ausgegliedert. 2002-02-27 23:26:21 +00:00