aboutsummaryrefslogtreecommitdiffstats
path: root/irc.c
diff options
context:
space:
mode:
Diffstat (limited to 'irc.c')
-rw-r--r--irc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/irc.c b/irc.c
index f4ec697..9fe4ec6 100644
--- a/irc.c
+++ b/irc.c
@@ -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;
}