mIRC Home    About    Download    Register    News    Help

Print Thread
Text Length Cutoff #211627 25/04/09 11:28 PM
Joined: Apr 2009
Posts: 2
O
Okapia Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
O
Joined: Apr 2009
Posts: 2
When messages are over a certain number of characters the message gets truncated. I understand this isn't the client's fault, but my issue with mirc is that it does not tell me when/if the message was truncated. It appears to go all the way through and the only way I know if the other person saw my entire message is if they tell me it looks like my message got cut off. I tested a few other irc clients and they do not do this. They put the excess text on new lines.

Perhaps my use is not typical, but I paste paragraphs into irc on a regular basis. Mirc not giving me any indication of whether or not the entirety of my message is going through is driving me crazy. It's enough to make me want to switch clients, but I'm hoping to find a way to make this work since I like mirc more overall when it comes to other features.

Is there any way to add this functionality to mirc? This isn't a default configuration setting I'm missing, is it? I would be willing to edit any files or install any scripts necessary to get this to work. I am using version 6.32 but I would be willing to switch to any version this feature works with.

Last edited by Okapia; 25/04/09 11:29 PM.
Re: Text Length Cutoff [Re: Okapia] #211628 25/04/09 11:49 PM
Joined: Nov 2006
Posts: 1,559
H
Horstl Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
First thing that comes to my mind is this script. It has a "break up lines longer than X chars" setting, besides many other settings to play with.
In fact the vast settings of this script may be it's biggest con - but then, you need to get the settings "right" only once laugh

Re: Text Length Cutoff [Re: Horstl] #211630 26/04/09 12:46 AM
Joined: Apr 2009
Posts: 2
O
Okapia Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
O
Joined: Apr 2009
Posts: 2
Thank you. This appears to be exactly the kind of thing I'm looking for. Unfortunately, I can't get the "break up lines longer than X chars" option to work! The script loads without any issues, I have confirmed that the other options contained in the script are working, but the long paste lines still aren't being broken up. I tried changing the number of characters to several different values without any effect.

Re: Text Length Cutoff [Re: Okapia] #211632 26/04/09 03:30 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
As a sidenote, not related to that script, but the original question, if you have your sounds enabled, mIRC will beep when a message hits the networks truncation point, and for each character above that point... or at least it does for the various networks that I have tested this on, either accidentally, or on purpose.

Re: Text Length Cutoff [Re: Okapia] #211634 26/04/09 04:41 AM
Joined: Oct 2005
Posts: 1,741
G
genius_at_work Offline
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
Try this script:

Code:

on *:CONNECT:.msg $me $+(MLT-,$str(,512))
on me:^*:NICK:.msg $newnick $+(MLT-,$str(,512))
on me:^*:TEXT:MLT-*:?:{ set $+(%,MCL.,$cid) $len($gettok($rawmsg,3-,32)) | haltdef }
on *:DISCONNECT:unset $+(%,MCL.,$cid)
alias maxchars $iif($isid,return,echo -a Max:) $calc($iif($($+(%,MCL.,$cid),2),$ifmatch,512) - $iif($1,$len($1) - 1,0))

on *:INPUT:#:{
  if ($len($1-) < $maxchars($target)) return
  if (($inpaste) && (!$input(Warning: Line too long. $+ $crlf $+ Do you want to auto-wrap?,y))) halt
  if ((/* iswm $1) && (!$ctrlenter)) return
  var %s = 1, %t = $1-, %tt
  var %i = 0, %ii = $numtok(%t,32)
  while (%i < %ii) {
    inc %i
    if ($len($gettok(%t,$+(%s,-,%i),32)) < $maxchars($target)) {
      %tt = $gettok(%t,$+(%s,-,%i),32)
    }
    else {
      msg $target %tt
      %s = $calc(%i + 1)
    }
  }
  halt
}


You must reconnect to the network after loading the script. I only tested it a bit, but it seems to work. Let me know if there are any bugs.

-genius_at_work

Re: Text Length Cutoff [Re: genius_at_work] #211656 27/04/09 02:22 PM
Joined: Oct 2005
Posts: 1,741
G
genius_at_work Offline
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
Found a few problems, here is an updated script:

Code:

on *:CONNECT:.msg $me $+(MLT-,$str(,512))
on me:^*:NICK:.msg $newnick $+(MLT-,$str(,512))
on me:^*:TEXT:MLT-*:?:{ set $+(%,MCL.,$cid) $len($gettok($rawmsg,3-,32)) | haltdef }
on *:DISCONNECT:unset $+(%,MCL.,$cid)
alias maxchars $iif($isid,return,echo -a Max:) $calc($iif($($+(%,MCL.,$cid),2),$ifmatch,512) - $iif($1,$len($1) - 1,0))

on *:INPUT:#:{
  if ($len($1-) < $maxchars($target)) return
  if (($inpaste) && (!$input(Warning: Line too long. $+ $crlf $+ Do you want to auto-wrap?,y))) halt
  if ((/* iswm $1) && (!$ctrlenter)) return
  var %s = 1, %t = $1-, %tt
  var %i = 0, %ii = $numtok(%t,32)
  while (%i < %ii) {
    inc %i
    if ($len($gettok(%t,$+(%s,-,%i),32)) < $maxchars($target)) {
      %tt = $gettok(%t,$+(%s,-,%i),32)
    }
    else {
      msg $target %tt
      dec %i
      %s = $calc(%i + 1)
    }
  }
  if (%tt != $null) msg $target %tt
  halt
}



Note that this code is meant to split up normal conversations where individual words are shorter than the maximum number of characters allowed for that network. Extremely long words may cause the script to fail.

-genius_at_work

Last edited by genius_at_work; 27/04/09 02:30 PM.