flakes / mirc_fish_10

"FiSH 10" - a blowfish encryption script for mIRC 7, compatible to previous FiSH scripts and other clients! Come visit us in #fish10 on EFNet!
https://syndicode.org/fish_10/
86 stars 16 forks source link

IRCv3 support #67

Closed xKevin04 closed 3 years ago

xKevin04 commented 3 years ago

IRCv3 introduces features that alter the PRIVMSG structure. So far, I've only noticed labeled responses to interfere: https://ircv3.net/specs/extensions/labeled-response Networks with IRCv3 support can be found here: https://ircv3.net/support/networks

I'm on tilde.chat myself and modified the workaround by @silv3rr (see https://github.com/flakes/mirc_fish_10/issues/65#issuecomment-636329747) to work there. So adding this to the top of fish_10.mrc should fix both issues:

on *:PARSELINE:out:*PRIVMSG *:{
  var %matches = $regsub($parseline,/^(?:.*? )?C?PRIVMSG (\S+).*$\n/m,\1,%privmsgtarget)
  if (%matches == 1 && $len($dll(%FiSH_dll,FiSH_GetKey10,$network %privmsgtarget))) > 1) {
    noop $regsubex(pl,$parseline,^(?:.*? )?C?(PRIVMSG \S+)(?: #\S+)?( :.*)$,\1 \2,&pl)
    if ($bvar(&pl,0) > 11) {
      .parseline -ob &pl
    }
  }
}

This essentially just removes all the extra stuff before PRIVMSG prior to sending it, in addition to the CPRIVMSG replacement. May not work on other networks and there could be more features that break functionality in different ways.

flakes commented 3 years ago

For incoming messages it's already been supported for many years, but apparently not for outgoing ones ...

flakes commented 3 years ago

New version released today, including a fix for this issue, please test, and open a new issue if required 😝