summaryrefslogtreecommitdiff
path: root/sic.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@suckless.org>2007-02-08 15:03:42 +0100
committerAnselm R. Garbe <arg@suckless.org>2007-02-08 15:03:42 +0100
commitea71b6e88e385304013567869de7dc626194eb90 (patch)
tree687a0789ac24dc3fe801f809f53c40ed2512a8f2 /sic.c
parentcb68ce9e2c8406bd19fad4376dd024b623946d66 (diff)
downloadcic-ea71b6e88e385304013567869de7dc626194eb90.tar.gz
small fix, don't write message to server if channel is not given
Diffstat (limited to 'sic.c')
-rw-r--r--sic.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sic.c b/sic.c
index da79dfc..6e7b627 100644
--- 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);