Spelling fixes, mostly in file comments
Silence compiler warning in Init_New_Client() Use strdup() instead of pointless strndup() to fix the following compiler warning: client.c: In function ‘Init_New_Client’: client.c:216:32: warning: ‘strndup’ specified bound 127 exceeds source size 5 [-Wstringop-overread] 216 | client->away = strndup(DEFAULT_AWAY_MSG, CLIENT_AWAY_LEN - 1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Make the debug loglevel always available This basically means to unifdef DEBUG in (almost) all places. We keep it in src/portab/portab.h so DEBUG stays available to enable assert(). Also add a comment about this.
Convert uses of Log(LOG_DEBUG, ...) to LogDebug()
Fix a possible race condition in Client_Introduce() Conf_GetServer() can return NULL when the server introducing the client had a write error for example, and is being disconnected. So make sure that we have a valid server before calling Conf_NickIsService()!
Update Client_SetHostname() to not use strpbrk() Not sure about the portability of strpbrk() in really ancient OS, and this was the only place where it became used recently in ngIRCd ... So let's play it safe! ;-)
Allow hostmask cloaking when rDNS is disabled
Fix hostmask cloaking bug for IPv6 too
Fix hostmask cloaking bug, don't cloak multiple times Previously, each server would cloak every user's hostmask. The problem is that if a network has more than one server, then a user's hostmask would get cloaked twice. This patch ensures that a server only cloaks the hostmask if it has not yet been cloaked (the period indicates it's still an IP address). Closes #228.
Whitespace fixes (no functional changes)
Allow longer usernames for authentication
Update copyright notices of recently changed files
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
Remove imp.h and exp.h header files These include files don't have a function any more, remove them.
Client_SetHostname(): Don't use strlen() to test for value
Add support for longer config lines With the introduction of CipherList we could have longer config lines. Handle up to 1024 bytes and warn if the line will be truncated.
Remove CLIENT.oper_by_my, Client_SetOperByMe() and Client_OperByMe() All places where Client_OperByMe() is used can either be converted to Client_HasMode(Client, 'o') or Op_Check(). And Op_Check() itself can use the connection handle for deciding whether the IRC Operator is a local user or not.
Change away to be allocated dynamically
Introduce Free_Client() function to free CLIENT structure
Save client IP address text for "WebIRC" users This patch introduces a new field in the CLIENT structure, "ipa_text", which points to an optional textual representation of the client IP address (or NULL) which can be used to store the "real" IP address information of a client using the "WEBIRC" protocol. Without this patch, ngIRCd ignored the <ip-address> paramater ... In addition, the functions Client_SetIPAText() and Client_IPAText() have been introduced to set and get the textual representation of the client IP address. Client_IPAText() can be used even when no "IP address text" has been set before, it then returns the real IP address of the connection. Closes bug #159.