aboutsummaryrefslogtreecommitdiff
path: root/src/cmd.c
blob: 3c7f48243788db3067581f58726c867e28ff600c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <atari.h>
#include <stdio.h>
#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");
}