--- /dev/null
+/* Host used when "-h" is not given */
+#define DEFAULT_HOST "localhost"
+
+/* Port used when "-p" is not given */
+#define DEFAULT_PORT "6667"
+
+/* 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!"
static char nick[32];
static char bufin[4096];
static char bufout[4096];
-static char channel[256];
+static char channel[256] = "#chat";
static time_t trespond;
static FILE *srv;
if (!srv)
eprint("fdopen:");
/* login */
- if(password)
- sout("PASS %s", password);
- sout("NICK %s", nick);
- sout("USER %s localhost %s :%s", nick, host, nick);
+// if(password)
+// sout("PASS %s", password);
+ sout("NICK tortoise");
+ sout("USER tortoise localhost localhost :tortoise");
+ sout("JOIN #chat");
fflush(srv);
setbuf(stdout, NULL);
setbuf(srv, NULL);
setbuf(stdin, NULL);
-#ifdef __OpenBSD__
- if (pledge("stdio", NULL) == -1)
- eprint("error: pledge:");
-#endif
for(;;) { /* main loop */
FD_ZERO(&rd);
FD_SET(0, &rd);