mIRC Home    About    Download    Register    News    Help

Print Thread
#156608 18/08/06 09:37 PM
Joined: Mar 2006
Posts: 7
O
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
O
Joined: Mar 2006
Posts: 7
Undernet has a line length limit of 446 characters I think. If you paste/type a line longer than this then either the line is truncated or discarded by the server.

Does mIRC have an option to split long lines into chunks of 446 character lines? If not, can someone suggest a scripting solution? Thanks.

#156609 19/08/06 12:08 AM
Joined: Aug 2003
Posts: 66
B
Babel fish
Offline
Babel fish
B
Joined: Aug 2003
Posts: 66
Put in your remotes:

Code:
 

on 1:input:*: { 
  if ($len($1-) > 420) { 
    { %pos = 420 
      :loop 
      if %pos < 390 goto end | 
      %chara = $mid($1-,%pos,1) 
      if $asc(%chara) == 32 goto end | 
      %pos = %pos - 1 
      goto loop 
      :end 
    } 
    %first = $left($1-,%pos - 1) 
    %cuttext = $remove($1-,%first) 
    %prefix = $left(%first,4) 
    %mtch = { /me  } 
    if (%prefix == %mtch) { %metxt = $remove(%first,%mtch) | /me %metxt 4<-cut } | /else { /say %first 4<-cut } 
    /say 4cut-> %cuttext 
    /halt 
  } 
}

 

#156610 19/08/06 12:14 AM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Code:
on *:input:*:{
  if (!$istok(channel chat query,$window($active).type,32)) { return }
  var %i = 1
  while ($mid($1-,%i,446) != $null) {
    say $v1
    inc %i 446
  }
  haltdef
}


Link Copied to Clipboard