aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO8
-rw-r--r--src/irc.c16
2 files changed, 16 insertions, 8 deletions
diff --git a/TODO b/TODO
index 46b1d76..cbe3226 100644
--- a/TODO
+++ b/TODO
@@ -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.
diff --git a/src/irc.c b/src/irc.c
index e185350..7464dd9 100644
--- a/src/irc.c
+++ b/src/irc.c
@@ -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;