mIRC Home    About    Download    Register    News    Help

Print Thread
$inpaste bug? #208066 11/01/09 06:54 PM
Joined: May 2007
Posts: 27
V
Vliedel Offline OP
Ameglian cow
OP Offline
Ameglian cow
V
Joined: May 2007
Posts: 27
Hey I have this code:
Code:
on *:INPUT:#,?:{ if ($inpaste) || ($ctrlenter) || (/* !iswm $1) { msg $active $1- | halt } }

Now when i paste this:
Quote:
bla
/bla

then in a channel window it simply msg's those 2 lines. But in a query it will msg the 1st line and try to execute /bla

Re: $inpaste bug? [Re: Vliedel] #208067 11/01/09 07:31 PM
Joined: Dec 2002
Posts: 2,014
R
RoCk Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,014

You can't specify both # and ? that way. You would have to use * or make two separate events.

Like this.
Code:
on *:INPUT:*: {
  if (($active !ischan) && (!$query($active))) return
  if (($inpaste) || ($ctrlenter) || (/* !iswm $1)) {
    msg $active $1-
    halt
  }
}


Or like this.
Code:

on *:INPUT:#: {
  if (($inpaste) || ($ctrlenter) || (/* !iswm $1)) {
    msg $active $1-
    halt
  }
}

on *:INPUT:?: {
  if (($inpaste) || ($ctrlenter) || (/* !iswm $1)) {
    msg $active $1-
    halt
  }
}



No bug here.

Last edited by RoCk; 11/01/09 07:33 PM.
Re: $inpaste bug? [Re: Vliedel] #208068 11/01/09 07:32 PM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
You want "on *:INPUT:*:", not #,? -- if you debug your script you'll see it's not even triggering in queries.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: $inpaste bug? [Re: Vliedel] #208070 11/01/09 07:44 PM
Joined: May 2007
Posts: 27
V
Vliedel Offline OP
Ameglian cow
OP Offline
Ameglian cow
V
Joined: May 2007
Posts: 27
yeah just heard.. sorry.
So question remains: why doesn't #,? work? Since I often use that, I didn't doubt about that at all.

Re: $inpaste bug? [Re: Vliedel] #208072 11/01/09 07:55 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Some events, like ON TEXT do allow the usage of #,?
If you look in the help file under /help ON TEXT you'll see that it shows
Quote:
Format: on <level>:TEXT:<matchtext>:<*><?><#[,#]>:<commands>

The fact that the <#,[#]> indicates that more than one channel can be specified, and the fact that the ? is listed as a separate option, means that the two can be combined, as opposed to the format for ON INPUT which shows as
Quote:
on <level>:input:<*#?=!@>:<commands>
which indicates that only one of those options can be used at a time.

Re: $inpaste bug? [Re: Vliedel] #208073 11/01/09 08:05 PM
Joined: May 2007
Posts: 27
V
Vliedel Offline OP
Ameglian cow
OP Offline
Ameglian cow
V
Joined: May 2007
Posts: 27
ah my assumption behavior fails smile

Re: $inpaste bug? [Re: Vliedel] #208075 11/01/09 09:00 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
As a teacher of mine used to say,
Quote:
Never assume, because it can make an ass out of u and me

Re: $inpaste bug? [Re: Vliedel] #208077 11/01/09 09:49 PM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
Actually, "#chan1,#chan2" does work in an ON INPUT, but "#chan1,?" does not.. so technically you can say *that* is a bug, though mIRC's help file was never known for being accurate to the T.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"