diff options
| author | B. Watson <urchlay@slackware.uk> | 2026-03-14 06:15:42 -0400 |
|---|---|---|
| committer | B. Watson <urchlay@slackware.uk> | 2026-03-14 06:15:42 -0400 |
| commit | c71c6f1efbc4366a4fd73e68ec6e4916493b3a72 (patch) | |
| tree | d55737b7f0d5e8f53bbb20c4149af0cc4639271d | |
| parent | 46cf314a383fd0015f11801e7ab1412d9d1df7c9 (diff) | |
| download | fujinet-chat-c71c6f1efbc4366a4fd73e68ec6e4916493b3a72.tar.gz | |
Handle 470 "forwarded to another channel".
| -rw-r--r-- | TODO | 8 | ||||
| -rw-r--r-- | src/irc.c | 16 |
2 files changed, 16 insertions, 8 deletions
@@ -37,7 +37,6 @@ Other stuff: - 'Dead' screens (channels we've parted, or failed to join) should show some kind of indicator, and not accept input. Although maybe this isn't worth doing (you already get "cannot send to channel"). -- Use GR.1 for the activity indicators, so they can be colorful. - *Possibly* save the config from within the client... though not all options can be changed (really only /nick and /beep). To make this useful would probably bloat the code too much. Some @@ -48,13 +47,6 @@ Other stuff: data can be kept in scrollback RAM, since scr_init() clears it. Should be small & simple (one line of GR.2 probably). Have to not disable ANTIC DMA during the client load. -- Handle redirects better. Trying to "/join #slackware" on Libera - results in actually joining ##slackware. But a screen got created - for #slackware, and ##slackware will appear in the [server] screen. - The message sent when this happens: - :molybdenum.libera.chat 470 UrchTest #slackware ##slackware :Forwarding to another channel - This shouldn't be hard to do. Interestingly, 470 is not in the list - of numerics at https://modern.ircdocs.horse. - Input box history. Up-arrow to recall previous command. Unfortunately this needs a lot of RAM. Maybe just one previous command, so you can up-arrow to re-ping someone, etc. @@ -368,6 +368,18 @@ static void permute_nick(void) { } } +/* see: https://defs.ircdocs.horse/ */ +static void do_forward_chan(void) { + char s; + + if(msg_argcount > 2 && msg_args[1][0] == '#' && msg_args[2][0] == '#') { + s = scr_getbyname(msg_args[1]); + if(s) + strncpy(scr_names[s], msg_args[2], 31); + } + do_catchall(1); +} + static void do_numeric(void) { unsigned int num = atoi(msg_cmd); @@ -448,6 +460,10 @@ static void do_numeric(void) { scr_eol_active(); break; + case 470: /* aka ERR_LINKCHANNEL, for Unreal and Solanum ircds */ + do_forward_chan(); + break; + default: do_catchall(1); break; |
