small fix, don't write message to server if channel is not given
This commit is contained in:
parent
cb68ce9e2c
commit
ea71b6e88e
2
sic.c
2
sic.c
@ -53,6 +53,8 @@ pout(char *channel, char *msg) {
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
privmsg(char *channel, char *msg) {
|
privmsg(char *channel, char *msg) {
|
||||||
|
if(channel[0] == 0)
|
||||||
|
return;
|
||||||
snprintf(bufout, sizeof bufout, "<%s> %s", nick, msg);
|
snprintf(bufout, sizeof bufout, "<%s> %s", nick, msg);
|
||||||
pout(channel, bufout);
|
pout(channel, bufout);
|
||||||
snprintf(bufout, sizeof bufout, "PRIVMSG %s :%s\r\n", channel, msg);
|
snprintf(bufout, sizeof bufout, "PRIVMSG %s :%s\r\n", channel, msg);
|
||||||
|
Loading…
Reference in New Issue
Block a user