mIRC Home    About    Download    Register    News    Help

Print Thread
Identifier: $location #70160 03/02/04 09:15 AM
Joined: Jul 2003
Posts: 655
Om3n Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Jul 2003
Posts: 655
To work similar to the way $chan $nick etc do within an event.
$location should remember both the exact location (such as #chan1 / Nick059 / =Nick059 etc) as well as the location type (use a suffix for this?)
Or even just two seperate identifiers $location $locationtype


"Allen is having a small problem and needs help adjusting his attitude" - Flutterby
Re: Identifier: $location #70161 03/02/04 09:49 AM
Joined: Apr 2003
Posts: 426
neophyte Offline
Fjord artisan
Offline
Fjord artisan
Joined: Apr 2003
Posts: 426
Why? $chan and $nick do fine. So does $window(name).type

Heck, there are so many others that you could use.


--------
mIRC - fun for all the family (except grandma and grandpa)
Re: Identifier: $location #70162 03/02/04 02:02 PM
Joined: Feb 2003
Posts: 2,785
Raccoon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,785
$target might be what you're looking for, maybe maybe.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Re: Identifier: $location #70163 03/02/04 05:55 PM
Joined: May 2003
Posts: 161
A
Ashkrynt Offline
Vogon poet
Offline
Vogon poet
A
Joined: May 2003
Posts: 161
unfortunately in queries $target returns your own nick instead of the querier. So you need somthing ugly like $iif($target == $me, $nick, $target)

Re: Identifier: $location #70164 04/02/04 04:32 AM
Joined: Jul 2003
Posts: 655
Om3n Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Jul 2003
Posts: 655
It is my understand that $target does not distinguish between DCC Chat, Fserve & Query. So it can not be used efficiently within $window().type

What i wish to be able to do is refer to the location type within an event. $window().type half works.

on ^*:TEXT:*:*: { echo -a $window($target).type }

Will correctly return 'channel' for text in a channel, but will give '* /echo: insufficient parameters' for text that is in a query, and will do absolutely nothing for a DCC or fserve window.

on TEXT

The location where the event occurrs can be specified using:

? for any private message
# for any channel message
#mirc for any messages on channel #mirc
* for any private or channel messages

What i am suggesting $location do is return the location type in the simplest format, that is: ? # = ! @ according to where the event was triggered.
Alternatively i guess the $target and $window().type procedures could be improved to work correctly together and define properly between types when used within an event.


"Allen is having a small problem and needs help adjusting his attitude" - Flutterby
Re: Identifier: $location #70165 04/02/04 07:13 AM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
"and will do absolutely nothing for a DCC or fserve window."
Well 'on text' doesn't trigger for dcc chat or fserve messages
  • on TEXT

    The on TEXT event triggers when you receive private and/or channel messages.

on *:TEXT:*:*: { echo -a $window($iif(#,#,$nick)).type }
will do fine unless the dqwindow is on (which requires reading from $mircini to know)
on *:chat:*: { echo -s $window(=$nick).type }
on *:serv:*: { echo -s $window(=$nick).type }

Re: Identifier: $location #70166 07/02/04 06:40 PM
Joined: Sep 2003
Posts: 70
M
madewokherd Offline
Babel fish
Offline
Babel fish
M
Joined: Sep 2003
Posts: 70
And the location of an on text event is actually the status window, not a query or channel window.