mIRC Homepage
Posted By: Vliedel $inpaste bug? - 11/01/09 06:54 PM
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
Posted By: RoCk Re: $inpaste bug? - 11/01/09 07:31 PM

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.
Posted By: argv0 Re: $inpaste bug? - 11/01/09 07:32 PM
You want "on *:INPUT:*:", not #,? -- if you debug your script you'll see it's not even triggering in queries.
Posted By: Vliedel Re: $inpaste bug? - 11/01/09 07:44 PM
yeah just heard.. sorry.
So question remains: why doesn't #,? work? Since I often use that, I didn't doubt about that at all.
Posted By: RusselB Re: $inpaste bug? - 11/01/09 07:55 PM
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.
Posted By: Vliedel Re: $inpaste bug? - 11/01/09 08:05 PM
ah my assumption behavior fails smile
Posted By: RusselB Re: $inpaste bug? - 11/01/09 09:00 PM
As a teacher of mine used to say,
Quote:
Never assume, because it can make an ass out of u and me
Posted By: argv0 Re: $inpaste bug? - 11/01/09 09:49 PM
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.
© mIRC Discussion Forums