mIRC Homepage
Posted By: hrst Solution to accidental pastes - 23/08/03 10:04 AM
Too often somebody pastes several - even dozens of - lines to some IRC channel, assuming that (s)he's going to paste only one word or line. Wouldn't it be a good idea to simply pop up a window when the text being pasted includes, for instance, two or more line feeds. It could be like this:

"You are going to paste n lines.
Ok
Cancel
Replace line feeds with spaces"

How about this idea? Opinions, please laugh.

- hrst @ IRCnet.
Posted By: starbucks_mafia Re: Solution to accidental pastes - 23/08/03 11:04 AM
I agree it would be nice to have paste restriction settings available in mIRC.

For now though it is possible to script it into mIRC using something like this (based on a previous post from Raccoon):
Code:
on *:input:*: {
  if ($inpaste) {
    .timerpaste 1 0 check_paste $target
    halt
  }
}

alias check_paste if ($input(Do you want to paste $cb(0) lines to $+($1,?), y, Paste warning)) .play -b $1 100

Just paste that into Remotes (Alt+R) and that would pop up a dialog box asking you to confirm that you want to paste the text.

You could just change the check_paste alias there to convert all the lines into one, although that would often cause problems because most likely the entire multi-line text would be longer than mIRC's maximum line length (about 920 characters).
Posted By: Raccoon Re: Solution to accidental pastes - 23/08/03 11:05 AM
Yes, this is a nifty idea.. and one of the earlier scripts I had written.

Using a combination of On Input, $inpaste, $cb, /timer and /play... you can do this yourself very easily.

Check out this post for more on the subject.

- Raccoon
Posted By: Watchdog Re: Solution to accidental pastes - 23/08/03 11:07 AM
It's a good idea but I would want to be able to disable it. So a switch for it in the options dialogue would be good too.
Posted By: codemastr Re: Solution to accidental pastes - 23/08/03 03:37 PM
I like the idea. I usually wind up doing that myself anyway. I usually paste into notepad and then remove the linefeeds, so having mIRC do it internally would be nice imho. Another idea that might be nice is, if you are pasting more than N lines it does like /play and adds a little delay, to prevent you from flooding the server.
Posted By: Doomstars Re: Solution to accidental pastes - 23/08/03 06:52 PM
In addition to disabling it, an option to choose how many lines and/or bytes it would have to be for the warning.
Posted By: MrPeepers Re: Solution to accidental pastes - 29/08/03 09:51 AM
There is already an option sorta like that, if you go into ur options, Display - Options
Use multi line edit box
© mIRC Discussion Forums