]> git.armaanb.net Git - sic.git/commitdiff
applied Eric's follow up patch
authorAnselm R Garbe <garbeam@gmail.com>
Wed, 12 Nov 2014 10:18:50 +0000 (11:18 +0100)
committerAnselm R Garbe <garbeam@gmail.com>
Wed, 12 Nov 2014 10:18:50 +0000 (11:18 +0100)
config.def.h
sic.c

index 6bbad14192a29e8911a11b7fe54c9febd1a9d485..6d720e9a1912f80df8725fef6d9ab2b9c204c165 100644 (file)
@@ -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
index 7a3edee0a7a816d1e3f04878680f180fa952f6e6..e91a426fb0a2f85611dcbcd786652e87e2ec50d0 100644 (file)
--- 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':