mIRC Home    About    Download    Register    News    Help

Print Thread
Solution to accidental pastes #43682 23/08/03 10:04 AM
Joined: Aug 2003
Posts: 2
H
hrst Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
H
Joined: Aug 2003
Posts: 2
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.


Air tastes good.
Re: Solution to accidental pastes #43683 23/08/03 11:04 AM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
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).


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Re: Solution to accidental pastes #43684 23/08/03 11:05 AM
Joined: Feb 2003
Posts: 2,685
Raccoon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,685
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


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Re: Solution to accidental pastes #43685 23/08/03 11:07 AM
Joined: Dec 2002
Posts: 2,985
Watchdog Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
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.

Re: Solution to accidental pastes #43686 23/08/03 03:37 PM
Joined: Dec 2002
Posts: 2,809
C
codemastr Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
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.

Re: Solution to accidental pastes #43687 23/08/03 06:52 PM
Joined: Dec 2002
Posts: 339
D
Doomstars Offline
Fjord artisan
Offline
Fjord artisan
D
Joined: Dec 2002
Posts: 339
In addition to disabling it, an option to choose how many lines and/or bytes it would have to be for the warning.

Re: Solution to accidental pastes #43688 29/08/03 09:51 AM
Joined: Aug 2003
Posts: 136
MrPeepers Offline
Vogon poet
Offline
Vogon poet
Joined: Aug 2003
Posts: 136
There is already an option sorta like that, if you go into ur options, Display - Options
Use multi line edit box


In Virginia, chickens cannot lay eggs before 8:00 a.m., and must be done before 4:00 p.m.