mIRC Home    About    Download    Register    News    Help

Print Thread
#267108 03/04/20 10:04 PM
Joined: Jul 2008
Posts: 57
R
RiMaJoy Offline OP
Babel fish
OP Offline
Babel fish
R
Joined: Jul 2008
Posts: 57
Good day all
I have this on input event:
Code
on *:input:#: {
  if (/* !iswm $1) && (~* !iswm $1) {
    hdef
    var %msg = $1-
    .echo -q $regsub(%msg,/((?:ftp:\/\/|https?:\/\/|www2?\.)[^<>\.\s]+(?:\.[^<>\.\s]+)+(?:\/[^<>\.\s]+)*)/g,12\1,%msg)
    .!msg $active %msg | echo -i26 14 $+ $timestamp  $+ $str( ,$calc(13 - $len($nick($chan,$nick).pnick))) $+ $p $+ $+( ,$me,) $+ : %msg
  }
}


Now i like to add an acronym to it wich has this as an on input event:
Code
on *:input:*:{ 
  var %z = 1, %a = acronyms.txt
  if ($left($1-,1) !iswm /) && ($active !iswm Status window) {
    while (%z <= $lines(%a)) { 
      var %i = $read(%a,%z)
      if ($istok($strip($1-),$gettok(%i,1,32),32)) var %u = $replace($1-,$gettok(%i,1,32),$gettok(%i,2-,32))  
      inc %z
    }
    msg $active $iif(%u,%u,$1-) | haltdef
  }
}


I'm no pro but i can't put those two together.
No matter what i try after i say something in the room the room closes without error.
I figured out that this part is causing that:
Code
$str( ,$calc(13 - $len($nick($chan,$nick).pnick))) $+ $p $+ $+( ,$me,) 

Is there any way to change this so it will work?

I hoped this would work:
Code
on *:input:*:{ 
  var %z = 1, %a = acronyms.txt
  if ($left($1-,1) !iswm /) && ($active !iswm Status window) {
    while (%z <= $lines(%a)) { 
      var %i = $read(%a,%z)
      if ($istok($strip($1-),$gettok(%i,1,32),32)) var %u = $replace($1-,$gettok(%i,1,32),$gettok(%i,2-,32))  
      inc %z
    }
    hdef
    var %msg = $iif(%u,%u,$1-)
    .echo -q $regsub(%msg,/((?:ftp:\/\/|https?:\/\/|www2?\.)[^<>\.\s]+(?:\.[^<>\.\s]+)+(?:\/[^<>\.\s]+)*)/g,12\1,%msg)
    .!msg $active %msg | echo -i26 14 $+ $timestamp  $+ $str( ,$calc(13 - $len($nick($chan,$nick).pnick))) $+ $p $+ $+( ,$me,) $+ : %msg
  }
}


I hope someone can help

Joined: Jul 2008
Posts: 57
R
RiMaJoy Offline OP
Babel fish
OP Offline
Babel fish
R
Joined: Jul 2008
Posts: 57
damn ..... i forgot to add the alias for the $p. whistle cry


Last edited by RiMaJoy; 04/04/20 08:23 PM.

Link Copied to Clipboard