sic

simple irc client
git clone git://git.suckless.org/sic
Log | Files | Refs | README | LICENSE

commit 5eaa0fff0d2d5c4b3f875add16894d53a7da9c45
parent f87d3f5bef896bc066d46170b6e124d2a2239fba
Author: Anselm R Garbe <garbeam@gmail.com>
Date:   Wed, 12 Nov 2014 11:18:50 +0100

applied Eric's follow up patch

Diffstat:
Mconfig.def.h | 14++++++++++----
Msic.c | 4++--
2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/config.def.h b/config.def.h @@ -1,8 +1,14 @@ -// Host used when "-h" is not given +/* Host used when "-h" is not given */ #define DEFAULT_HOST "irc.oftc.net" -// Port used when "-p" is not given +/* Port used when "-p" is not given */ #define DEFAULT_PORT "6667" -// Timestamp format; see strftime(3) -#define TIMESTAMP_FORMAT "%F %R" +/* Timestamp format; see strftime(3). */ +#define TIMESTAMP_FORMAT "%Y-%m-%d %R" + +/* Command prefix character. In most IRC clients this is '/'. */ +#define COMMAND_PREFIX_CHARACTER ':' + +/* Parting message used when none is specified with ":l ..." command. */ +#define DEFAULT_PARTING_MESSAGE "sic - 250 LOC are too much!" diff --git a/sic.c b/sic.c @@ -63,7 +63,7 @@ parsein(char *s) { if(s[0] == '\0') return; skip(s, '\n'); - if(s[0] != ':') { + if(s[0] != COMMAND_PREFIX_CHARACTER) { privmsg(channel, s); return; } @@ -84,7 +84,7 @@ parsein(char *s) { if(*p) *p++ = '\0'; if(!*p) - p = "sic - 250 LOC are too much!"; + p = DEFAULT_PARTING_MESSAGE; sout("PART %s :%s", s, p); return; case 'm':