mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline OP
Hoopy frood
OP Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
I would like more $identifiers defined while in matchtext of events.

What do I mean?

Well. event match texts can currently be defined with things like...

ON *:TEXT:$($+(*,$me,*)):#channel:{ echo -a Alert : $nick said your name on $chan }

It would be nice if the $nick and $chan identifier were also availabe with in that matchtext (specific to # events, i dont expect a $chan in a ? etc)

I do know the matchtext is done before the #channel comparision is done, but I felt that knowing who and where this "possable" event is from during the matchtext can be usefull

example below (and yes i know it could be done differently, who can say "example")

ON *:TEXT:$+($iif((!trigger == $1) && (!%ignore. [ $+ [ $nick ] ]),$1-)):#channel:{
msg $chan triggered by $nick
set -su10 %ignore. $+ $nick $true
}

Currently $chan & $nick have no value within the above examples matchtext, even tho they are clearly specific to the possable event.

Other matchings im sure could also do with some extra ones, not just ON TEXT, but this is the one i choose to show.

Joined: Dec 2002
Posts: 208
H
Fjord artisan
Offline
Fjord artisan
H
Joined: Dec 2002
Posts: 208
Agreed.


If I knew now what I will know then... maybe things will have been different...
Joined: Feb 2005
Posts: 681
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
Weird, this worked
on *:TEXT:$($+(*,$nick,*)):#:echo -a $1-

but this did not
on *:TEXT:$($nick):#:echo -a $1-

this worked
on *:TEXT:$($+(*,#,*)):#:echo -a $1-

but this did not
on *:TEXT:$(#):#:echo -a $1-

same results using $chan instead of # on last two

~ Edit ~
this worked
on *:TEXT:$($iif($nick == $nick,$1-)):#:echo -a $1-

this worked
on *:TEXT:$($iif(# == #,$1-)):#:echo -a $1-

Last edited by mIRCManiac; 06/04/05 12:52 PM.
Joined: Aug 2003
Posts: 314
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2003
Posts: 314
Code:
on *:TEXT:$($+(*,$nick,*)):#:echo -a $1-


Not weird, this triggers because $nick evaluates to $null and the matchtext becomes :**: which matches all incoming messages. :$($nick): becomes :: which matches only $null

Same goes for using # or $chan

Joined: Feb 2005
Posts: 681
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
ahhhh gotcha, duh me lol, thanks for pointing that out.

Joined: Sep 2003
Posts: 4,230
D
DaveC Offline OP
Hoopy frood
OP Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
I used the belwo to see which ones were valid.

on *:TEXT:$($showme($!nick $nick $!chan $chan $!1- $1-)):#:echo -a $1-

alais showme { echo -s SHOWEM $1- | return $1- }


Link Copied to Clipboard