blob: 1eccdf555e4e3f247f0785b669edd6d1e8dce5a7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#include <atari.h>
#include <stdio.h>
#include "irc.h"
#include "addrs.h"
#include "screen.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 scr_print(SCR_CURR, "*** You are not on a channel\n");
}
void cmd_execute(void) {
cmd_command(edit_box);
}
|