HexChat is an IRC client based on XChat, but unlike XChat it’s completely free for both Windows and Unix-like systems. Since XChat is open source, it’s perfectly legal. For more info, please read the Shareware background.
HexChat was originally called XChat-WDK which in turn was a successor of freakschat. For more info, please read the announcement
XChat itself now is dual licensed. Contributions to XChat are accepted both as GPL and as assigned to zed, so that the code may be included with the official win32 build. Anyone may modify and distribute XChat in anyway they desire as long as it follows the GPL.