mIRC Home    About    Download    Register    News    Help

Print Thread
#181802 31/07/07 10:24 AM
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
alias msg {
..
msg $1-
}

basically i want to override the msg command so when i do /msg .. i want it to echo me the script name/line number of where it came from and still msg the channel and stuff

Joined: Dec 2002
Posts: 503
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
$script and $scriptline are your friends.


Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
$script/$scriptline would return the filename/line of the /msg alias itself. The OP wants the location of the command that called that /msg alias, which is not possible to retrieve currently.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Joined: Feb 2006
Posts: 181
C
Vogon poet
Offline
Vogon poet
C
Joined: Feb 2006
Posts: 181
You could use $remove($script,$scriptdir)

Joined: Dec 2002
Posts: 503
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
Oo.. Good point.. Apologies.

Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
Originally Posted By: Crinul
You could use $remove($script,$scriptdir)


huh? i dont get you

Joined: Feb 2006
Posts: 181
C
Vogon poet
Offline
Vogon poet
C
Joined: Feb 2006
Posts: 181
Quote:
$script would return the filename... The OP wants the location of the command that called that /msg alias...


So: $remove($script,$scriptdir) returns the location (script1.ini)

Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031
That would return the currently executing script (the MSG alias), the OP wants the name and line number of the script that called the MSG alias, which is currently not possible.

~ Edit ~

Why not $nopath($script) ?


Link Copied to Clipboard