aboutsummaryrefslogtreecommitdiff
path: root/src/irc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/irc.c')
-rw-r--r--src/irc.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/irc.c b/src/irc.c
index e4c0184..f31d89c 100644
--- a/src/irc.c
+++ b/src/irc.c
@@ -78,7 +78,7 @@ static void do_pong(void) {
}
static void bold(void) {
- scr_print_active("\x02");
+ scr_putc_active('\x02');
}
static void hilite_bold(void) {
@@ -88,30 +88,28 @@ static void hilite_bold(void) {
static void do_chan_nick(void) {
if(hilite) {
bell();
- // scr_hilite_active();
new_scr_status = SCR_HILITE;
}
hilite_bold();
- scr_print_active("<");
+ scr_putc_active('<');
hilite_bold();
scr_print_active(msg_src);
if(scr_active == SCR_SERVER) {
/* if we don't have a window for it */
- scr_print_active("/");
+ scr_putc_active('/');
scr_print_active(msg_dest);
}
hilite_bold();
- scr_print_active(">");
+ scr_putc_active('>');
hilite_bold();
- scr_print_active(" ");
+ scr_putc_active(' ');
}
static void do_priv_nick(void) {
if(msg_src) {
- scr_print_active("*");
+ scr_putc_active('*');
scr_print_active(msg_src);
scr_print_active("* ");
- // scr_hilite_active();
new_scr_status = SCR_HILITE;
bell();
}
@@ -147,14 +145,14 @@ static void print_ping_time(char *p) {
scr_print_active(" lag: ");
itoa(sec, numbuf, 10);
scr_print_active(numbuf);
- scr_print_active(".");
+ scr_putc_active('.');
itoa(frac, numbuf, 10);
scr_print_active(numbuf);
- scr_print_active(" sec");
+ scr_putc_active('s');
/*
// for debugging:
- scr_print_active(" ");
+ scr_putc_active(' ');
itoa(pingtime, numbuf, 10);
scr_print_active(numbuf);
*/
@@ -203,7 +201,7 @@ static void do_ctcp(int is_notice) {
if(streq_i(ctcp_type, "ACTION")) {
scr_print_active("* ");
scr_print_active(msg_src);
- scr_print_active(" ");
+ scr_putc_active(' ');
scr_print_active(p);
scr_eol_active();
return;
@@ -355,7 +353,7 @@ static void do_mode(void) {
scr_print_active(" sets mode: ");
for(i = 0; i < msg_argcount; i++) {
scr_print_active(msg_args[i]);
- scr_print_active(" ");
+ scr_putc_active(' ');
}
if(msg_text) scr_print_active(msg_text);
scr_eol_active();
@@ -367,18 +365,18 @@ static void do_mode(void) {
static void do_catchall(int arg) {
if(msg_src) {
scr_print_active(msg_src);
- scr_print_active(" ");
+ scr_putc_active(' ');
}
scr_print_active(msg_cmd);
for(; arg < msg_argcount; arg++) {
- scr_print_active(" ");
+ scr_putc_active(' ');
scr_print_active(msg_args[arg]);
}
if(msg_text) {
- scr_print_active(" ");
+ scr_putc_active(' ');
scr_print_active(msg_text);
}
scr_eol_active();
@@ -586,8 +584,10 @@ static void dispatch_msg(void) {
}
if(scr_active != scr_current) {
- scr_status[scr_active] = new_scr_status;
- scr_show_status(scr_current);
+ if(scr_status[scr_active] < new_scr_status) {
+ scr_status[scr_active] = new_scr_status;
+ scr_show_status(scr_current);
+ }
}
}
@@ -756,7 +756,7 @@ int irc_read(void) {
if(!trip) return 1;
last_read_min = minutes;
- err = nstatus(conf->url);
+ err = nstatus();
if(err != 1) {
scr_display(SCR_SERVER);
@@ -779,7 +779,7 @@ int irc_read(void) {
ind_net_rx();
if(rxbuflen > 0) {
- err = nread(conf->url, rx_buf, rxbuflen);
+ err = nread(rx_buf, rxbuflen);
if(err != 1) {
ind_net_down();
print_errnum();