ii

irc it, simple FIFO based irc client
git clone git://git.suckless.org/ii
Log | Files | Refs | README | LICENSE

commit 3504249d87f324d197f8a83fd1a44d8e8efe5a80
parent e1dcfc0d32c98505df553978ae9f750dccd0b2a3
Author: Anselm R. Garbe <garbeam@wmii.de>
Date:   Fri, 27 Jan 2006 14:51:11 +0200

applied next patch of Kai

Diffstat:
Mii.c | 7+++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/ii.c b/ii.c @@ -230,11 +230,10 @@ static void proc_channels_privmsg(char *channel, char *buf) write(irc, message, strlen(message)); } -static void proc_channels_input(int fd, char *buf) +static void proc_channels_input(Channel *c, char *buf) { static char infile[256]; char *p; - Channel *c = get_channel(fd); if(buf[0] != '/' && buf[0] != 0) { proc_channels_privmsg(c->name, buf); @@ -281,7 +280,7 @@ static void proc_channels_input(int fd, char *buf) snprintf(message, PIPE_BUF, "PART %s :ii - 500SLOC are too much\r\n", c->name); write(irc, message, strlen(message)); - close(fd); + close(c->fd); create_filepath(infile, sizeof(infile), c->name, "in"); unlink(infile); rm_channel(c); @@ -404,7 +403,7 @@ static void handle_channels_input(Channel *c) rm_channel(c); return; } - proc_channels_input(c->fd, buf); + proc_channels_input(c, buf); } static void handle_server_output()