I noticed that ii was sending a PART command when leaving a privmsg
channel with another user. This patch just checks that the channel is
in fact an IRC channel before sending the PART command. I hope this is
useful.
-bob
275,280c275,282
< if(buf[2] == ' ' && strlen(buf)>=3)
< snprintf(message, PIPE_BUF, "PART %s :%s\r\n", c->name, &buf[3]);
< else
< snprintf(message, PIPE_BUF,
< "PART %s :ii - 500 SLOC are too much\r\n", c->name);
< write(irc, message, strlen(message));
---
> if(c->name[0] == '#' || c->name[0] == '&' || c->name[0] == '+' || c->name[0] == '!') {
> if(buf[2] == ' ' && strlen(buf)>=3)
> snprintf(message, PIPE_BUF, "PART %s :%s\r\n", c->name, &buf[3]);
> else
> snprintf(message, PIPE_BUF,
> "PART %s :ii - 500 SLOC are too much\r\n", c->name);
> write(irc, message, strlen(message));
> }