mIRC Homepage
Posted By: KilledInAction multiple on INPUT targets - 29/09/07 06:02 AM
From the bugs forum thread located here: https://forums.mirc.com/ubbthreads.php?ubb=showflat&Number=186596&page=1#Post186596

This is requesting the ability to handle multiple targets for the on INPUT, as on TEXT events handle. For example:
on *:INPUT:#,?:
would allow you to make one script for both channels and queries.

This could also be applied to other event types that currently only allow a single target.
Posted By: RusselB Re: multiple on INPUT targets - 29/09/07 07:39 AM
What's wrong with the * character, which is currently available?
Posted By: hixxy Re: multiple on INPUT targets - 29/09/07 11:19 AM
* includes @windows and dcc chats.
Posted By: RusselB Re: multiple on INPUT targets - 29/09/07 01:43 PM
Hixxy: I realize that, and, after re-reading my post, I realize I could've worded it better.

KilledInAction: As a temporary solution, the * could be used, as this will cover channel and pm windows. If you want to know if it's a channel window or not, check the return from $chan.

If it's a channel window, then $chan will return the name of the channel, otherwise it'll return $null

Hixxy's notation is, realistically, if not literally, the only drawback that I know of.
Posted By: Ghozer Re: multiple on INPUT targets - 30/09/07 03:39 AM
*ignore*
Posted By: deegee Re: multiple on INPUT targets - 30/09/07 03:57 AM
Originally Posted By: RusselB
Hixxy: I realize that, and, after re-reading my post, I realize I could've worded it better.

KilledInAction: As a temporary solution, the * could be used, as this will cover channel and pm windows. If you want to know if it's a channel window or not, check the return from $chan.

If it's a channel window, then $chan will return the name of the channel, otherwise it'll return $null

Hixxy's notation is, realistically, if not literally, the only drawback that I know of.

Code:
on *:input:*:{
  if $window($target).type isin channel query { do stuff }
}
© mIRC Discussion Forums