]> git.armaanb.net Git - sic.git/commitdiff
small fix, don't write message to server if channel is not given
authorAnselm R. Garbe <arg@suckless.org>
Thu, 8 Feb 2007 14:03:42 +0000 (15:03 +0100)
committerAnselm R. Garbe <arg@suckless.org>
Thu, 8 Feb 2007 14:03:42 +0000 (15:03 +0100)
sic.c

diff --git a/sic.c b/sic.c
index da79dfc826454513ef60b65dc6e7624f80dbdef8..6e7b6271c7717ae323f5c11562d41fb7dfbe5b4c 100644 (file)
--- a/sic.c
+++ b/sic.c
@@ -53,6 +53,8 @@ pout(char *channel, char *msg) {
 
 static void
 privmsg(char *channel, char *msg) {
+       if(channel[0] == 0)
+               return;
        snprintf(bufout, sizeof bufout, "<%s> %s", nick, msg);
        pout(channel, bufout);
        snprintf(bufout, sizeof bufout, "PRIVMSG %s :%s\r\n", channel, msg);