#include #include #include "irc.h" void cmd_chan_text(const char *cmd) { txbuf_set_str("PRIVMSG "); txbuf_append_str(channel); txbuf_append_str(" :"); txbuf_append_str(cmd); txbuf_send(); } void cmd_command(const char *cmd) { if(*cmd == '/') txbuf_send_str(cmd + 1); else if(channel[0]) cmd_chan_text(cmd); else ui_print("*** You are not on a channel\n"); }