mIRC Home    About    Download    Register    News    Help

Print Thread
script name/line number etc #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

Re: script name/line number etc [Re: pouncer] #181808 31/07/07 01:10 PM
Joined: Dec 2002
Posts: 503
B
Bekar Offline
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
$script and $scriptline are your friends.


Re: script name/line number etc [Re: Bekar] #181809 31/07/07 02:10 PM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
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
Re: script name/line number etc [Re: qwerty] #181810 31/07/07 02:13 PM
Joined: Feb 2006
Posts: 181
C
Crinul Offline
Vogon poet
Offline
Vogon poet
C
Joined: Feb 2006
Posts: 181
You could use $remove($script,$scriptdir)

Re: script name/line number etc [Re: qwerty] #181839 31/07/07 09:23 PM
Joined: Dec 2002
Posts: 503
B
Bekar Offline
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
Oo.. Good point.. Apologies.

Re: script name/line number etc [Re: Crinul] #181863 01/08/07 09:14 AM
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

Re: script name/line number etc [Re: pouncer] #181865 01/08/07 09:18 AM
Joined: Feb 2006
Posts: 181
C
Crinul Offline
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)

Re: script name/line number etc [Re: Crinul] #181873 01/08/07 11:57 AM
Joined: Dec 2002
Posts: 2,021
R
RoCk Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,021
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) ?