mIRC Home    About    Download    Register    News    Help

Print Thread
#208066 11/01/09 06:54 PM
V
Vliedel
Vliedel
V
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

#208067 11/01/09 07:31 PM
Joined: Dec 2002
Posts: 1,995
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 1,995

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.
#208068 11/01/09 07:32 PM
Joined: Oct 2003
Posts: 3,641
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,641
You want "on *:INPUT:*:", not #,? -- if you debug your script you'll see it's not even triggering in queries.

#208070 11/01/09 07:44 PM
V
Vliedel
Vliedel
V
yeah just heard.. sorry.
So question remains: why doesn't #,? work? Since I often use that, I didn't doubt about that at all.

#208072 11/01/09 07:55 PM
Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
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.

#208073 11/01/09 08:05 PM
V
Vliedel
Vliedel
V
ah my assumption behavior fails smile

#208075 11/01/09 09:00 PM
Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
As a teacher of mine used to say,
Quote:
Never assume, because it can make an ass out of u and me

#208077 11/01/09 09:49 PM
Joined: Oct 2003
Posts: 3,641
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,641
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.


Link Copied to Clipboard