Commit Graph

56 Commits

Author SHA1 Message Date
Alexander Barton 8fd0e29d46 Fix "implicit conversion shortens 64-bit value" warning
This patch fixes the following gcc warning in our sources:
"implicit conversion shortens 64-bit value into a 32-bit value"
2009-09-11 22:52:12 +02:00
Florian Westphal 544b9884f4 remove or translate old comments 2009-04-21 20:58:30 +02:00
Alexander Barton c09742c518 Enhance INFO command to report compile time, if available 2009-03-05 16:04:36 +01:00
Alexander Barton 3243d9ee44 Implement the IRC command "SERVLIST"
The IRC command "SERVLIST" lists all the registered services, see RFC 2811, section 3.5.1.
The syntax is "SERVLIST [<mask> [<type>]]". The parameter <type> is not used by ngIRCd at
the moment, all registered services are of type 0 (which is the default when omitted).
2008-11-19 18:16:26 +01:00
Alexander Barton 2cc21caf32 Implement local channels (prefix "&")
This patch implements server-local channels, prefix "&", that are only
visible to users of the same local server and not in the network.

Patch written by Scott Perry (2008-06-04), see:
 - http://arthur.barton.de/cgi-bin/bugzilla/show_bug.cgi?id=87
 - http://arthur.barton.de/cgi-bin/bugzilla/attachment.cgi?id=24&action=view
2008-11-17 21:52:56 +01:00
Florian Westphal ef3327d372 TLS/SSL support: code changes.
This adds the required code to enable ssl/tls support
during compile and run time, respectively.
2008-09-13 15:10:32 +02:00
Alexander Barton 3358ad07d7 Fix t_diff(): declaration of 'div' shadows a global declaration
This patch fixes the following GCC warning message:
irc-info.c:422: warning: declaration of 'div' shadows a global declaration
2008-07-27 15:58:06 +02:00
Brandon Beresini d4eb55c79f Cleaned up PRIVMSG and NOTICE patches. 2008-07-27 01:23:20 +02:00
Scott Perry 70254a5553 This patch implements a (maybe) compliant WHOWAS command.
It is hard to test this in the test suite because we 1) shouldn't rely on
previous tests populating WHOWAS and 2) don't connect a user for more than 30
seconds.

Also makes WHOWAS return ERR_NONICKNAMEGIVEN_MSG as implied by RFC.
2008-05-12 18:56:31 +02:00
Ali Shemiran 12cd554af1 Fix secret channel information leak
/who on a secret channel that the user is not a member of
now returns proper RPL_ENDOFWHO_MSG instead of nothing.
2008-05-09 21:47:31 +02:00
Alexander Barton 4e56e5341f Implement IRC commands SERVICE, SERVLIST, and SQUERY as dummy functions
SERVICE, SERVLIST, and SQUERY are required by RFC 2812 (it states in
section 3 that "all commands described in this section MUST be implemented
by any server for this protocol." -- So we implement them without (much)
actual functionality ...
2008-05-05 18:06:43 +02:00
Alexander Barton 33b1204349 Get rid of cvs-version.* and CVSDATE definition.
(cherry picked from commit b187fac244f4e14705f882ba7c43eef0238e2830)
2008-04-25 00:14:11 +02:00
Alexander Barton ddecfcd831 Implemented IRC commands INFO, USERS (dummy), and SUMMON (dummy). 2008-02-26 23:49:33 +01:00
Dana Dahlstrom 2f71fbb2a1 Include flags in RPL_WHOREPLY messages.
RPL_WHOREPLY messages generated by IRC_WHO don't include flags (*,@,+)
that should appear according to this description:

http://www.mishscript.de/reference/rawhelp3.htm#raw352

Other IRC servers do include the flags.

Modify who-test.e to expose missing flags,
modify ngircd-test.conf to accommodate who-test.e, and fix
irc-info.c to correct these problems.
2008-02-26 23:49:33 +01:00
Florian Westphal 4d152b771e Make IRC_WHO also search username/servername/hostname.
Dana Dahlstrom reported that IRC_WHO did not follow
RFC 2812, Section 3.6.1. Specifically:

- IRC_WHO did not send "G" flag instead if "H" if client was away
- did not search username/servername/hostname etc. if argument
  was not a channel.

Fix all of the above and tidy things up a bit.
Also add IRC_WHO test script contributed by Dana.
2008-02-26 23:49:33 +01:00
Florian Westphal 8974e90552 implement '/STAT u' (uptime) 2007-12-11 11:29:43 +00:00
Alexander Barton 47ca178a21 Introduce option to configure the maximum nick name lenth in ngircd.conf
- 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-21 12:16:33 +00:00
Alexander Barton 06bfb3adfb Fix code to compile using K&R C compiler and ansi2kr again. 2007-11-18 15:05:35 +00:00
Alexander Barton d4ed056147 Numeric 317: implemented "signon time" (displayed in WHOIS result). 2007-10-04 15:03:55 +00:00
Florian Westphal 018e351630 -Whitespace Damage; Client_OperCount(), Client_UnknownCount(), Client_MyServerCount() return unsigned long 2006-10-07 10:40:52 +00:00
Florian Westphal 6e105bf87e channel maxusers now unsigned long 2006-10-06 21:32:58 +00:00
Alexander Barton 257312b102 Changed Numerics 265 and 266 to follow ircd 2.11.x "standards". 2006-10-01 19:13:32 +00:00
Florian Westphal e426c131c7 fix embarassing fileptr leak 2006-09-16 12:22:09 +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
Florian Westphal 87f4b1c6f6 Client_GetFromConn() removed and replaced with new function Conn_GetClient() 2006-04-23 10:37:27 +00:00
Florian Westphal c8fb6a2258 simplify IRC_Show_MOTD() 2006-01-27 17:19:58 +00:00
Florian Westphal 2d4dd33627 use strlcpy 2005-06-17 19:15:43 +00:00
Alexander Barton 06caecb0c4 Implemented IRC function "WHOWAS". 2005-05-16 12:25:15 +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 4ef172d603 Implemented support for "secret channels" (channel mode "s"). 2005-03-02 16:35:10 +00:00
Alexander Barton 894cd2cd68 Don't create version information string each time a client connects but
insetead on server startup. By Florian Westphal.
2005-02-09 09:52:58 +00:00
Alexander Barton 85acb82469 Use ngt_TrimLastChr() where useful, by Florian Westphal. 2005-02-04 13:15:38 +00:00
Alexander Barton 34e912d9f2 Fixed a typo in variable name ... 2005-01-24 14:19:04 +00:00
Alexander Barton 44172a8c7f Fixed a possible buffer underrun when reading the MOTD file. Thanks to
Florian Westphal, <westphal@foo.fh-furtwangen.de>.
2005-01-24 14:17:21 +00:00
Alexander Barton 7281b8dd4d New "chroot" feature (from Benjamin Pineau), introducing new configuration
variables "ChrootDir" and "MotdPhrase".
2004-05-07 11:19:20 +00:00
Alexander Barton 57c7e23622 Added #include for strings.h to fix compiler warnings. 2004-01-17 03:17:49 +00:00
Alexander Barton c40592d2ce Removed "USE_" prefixes of configuration #defines. 2003-12-26 15:55:07 +00:00
Alexander Barton 05e2c0f048 Extended version reporting of CVS builds. 2003-12-04 14:05:16 +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 260b8e5f36 VERSION shows the CVS date if apropriate now. 2003-06-06 20:46:11 +00:00
Alexander Barton 489d8c5cd0 Removed unportable %z formater in strftime(). 2003-04-21 10:54:30 +00:00
Alexander Barton 62796722f1 Changed all PACKAGE's to PACKAGE_NAME and all VERSION's to PACKAGE_VERSION. 2003-03-31 15:54:21 +00:00
Alexander Barton e17976a172 - Fixed up command forwarding: only to servers!
- Forwarding of WHOIS was broken in some situations.
2003-01-01 13:30:35 +00:00
Alexander Barton b8d7dcec77 - Adjusted includes for new "conn-func.h" header. 2002-12-30 17:15:42 +00:00
Alexander Barton 437f2c335f - Renamed functions now found in "conn-zip.c". 2002-12-30 16:07:50 +00:00
Alexander Barton b316c380ad - replaced some calls to sprintf() with snprintf() -- more secure :-) 2002-12-26 17:14:48 +00:00
Alexander Barton 6626395c88 - replaced a lot of strcat() calls with strlcat() which is more secure. 2002-12-26 16:48:14 +00:00
Alexander Barton 212d36a33c - enhanced LUSERS reply: RPL_LOCALUSERS, RPL_NETUSERS. 2002-12-22 23:30:33 +00:00
Alexander Barton 210282d00f - implemented subfunction "m" of STATS command. 2002-12-18 13:55:41 +00:00
Alexander Barton 98677b4348 - "STATS l" now only shows server-server-links and the own connection. 2002-12-18 13:07:46 +00:00