diff options
| author | B. Watson <urchlay@slackware.uk> | 2026-04-01 15:31:48 -0400 |
|---|---|---|
| committer | B. Watson <urchlay@slackware.uk> | 2026-04-01 15:32:04 -0400 |
| commit | 15fb9d187d05aed7f80d643fe69ea3dd16cd0e22 (patch) | |
| tree | 0dd9688f8cd0f1970f64500fe0c1c1dd8b9fb2dd /src/irc.c | |
| parent | 546e07e530e100a739a510efc2731e32d8679ec1 (diff) | |
| download | fujinet-chat-15fb9d187d05aed7f80d643fe69ea3dd16cd0e22.tar.gz | |
Tighten up irc.c a bit. Now 5499 bytes free.
Diffstat (limited to 'src/irc.c')
| -rw-r--r-- | src/irc.c | 30 |
1 files changed, 13 insertions, 17 deletions
@@ -152,7 +152,7 @@ static void print_ctcp(void) { } /* FIXME: this isn't very fast */ -static void do_ctcp(int is_notice) { +static void do_ctcp(char is_notice) { static char *p, *ctcp_type, *resp; resp = 0; @@ -330,25 +330,10 @@ static void do_kick(void) { print_reason(); } -static void do_mode(void) { - int i; - if(msg_src) - scr_print_active(msg_src); - else - scr_print_active("Server"); - scr_print_active(" sets mode: "); - for(i = 0; i < msg_argcount; i++) { - scr_print_active(msg_args[i]); - scr_putc_active(' '); - } - if(msg_text) scr_print_active(msg_text); - scr_eol_active(); -} - /* numerics call this with arg==1, since arg 0 is always our nick. other commands call with arg==0 to print everything. */ -static void do_catchall(int arg) { +static void do_catchall(char arg) { if(msg_src) { scr_print_active(msg_src); scr_putc_active(' '); @@ -368,6 +353,17 @@ static void do_catchall(int arg) { scr_eol_active(); } +static void do_mode(void) { + if(msg_src) { + scr_print_active(msg_src); + msg_src = 0; /* don't let do_catchall() print it again */ + } else { + scr_print_active("Server"); + } + scr_print_active(" sets mode:"); + do_catchall(0); +} + /* permutes last character (doesn't add one), so for "Bob" you get: Bo_, Bo1 through Bo9, BoA through BoZ Gives a total of 36 replacement nicks to try. |
