diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2015-06-19 09:14:14 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2015-06-19 09:14:14 +0200 |
commit | 26bf2b6c79378ca8cdc63c71b1d9ac97044f1c0b (patch) | |
tree | 8f76ce0b30ea5c9ea0f845705f32dd0c16bf855f /irc.c | |
parent | 4c772eac025459d848a753a5b7e78721ded80e81 (diff) | |
download | sircbot-26bf2b6c79378ca8cdc63c71b1d9ac97044f1c0b.tar.bz2 sircbot-26bf2b6c79378ca8cdc63c71b1d9ac97044f1c0b.tar.xz |
irc: pass username option
Diffstat (limited to 'irc.c')
-rw-r--r-- | irc.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -35,7 +35,7 @@ static int tcp_connect(const char *host, int port) } struct irc_session *irc_connect(const char* server, int port, const char *nick, - const char *pass) + const char *username, const char *pass) { char buf[256]; struct irc_session *sess; @@ -54,7 +54,7 @@ struct irc_session *irc_connect(const char* server, int port, const char *nick, if (pass) irc_send(sess, "PASS", pass); irc_send(sess, "NICK", nick); - snprintf(buf, sizeof(buf), "%s localhost %s :%s", nick, server, nick); + snprintf(buf, sizeof(buf), "%s 0 * :%s", username, username); irc_send(sess, "USER", buf); return sess; } |