mIRC Home    About    Download    Register    News    Help

Print Thread
#163552 01/11/06 09:30 AM
Joined: Oct 2006
Posts: 342
L
learn3r Offline OP
Fjord artisan
OP Offline
Fjord artisan
L
Joined: Oct 2006
Posts: 342
%script == nameofmyscript


How do I make my quit message always be accompanied by %script at the end of the quit message?

example : when I type /quit blah blah out now...

my quit message will be automatically like this

* nick (*!*@*) Quit (blah blah out now... nameofmyscript)
or if no message has been typed on quitting default quit message will be use..

* nick (*!*@*) Quit (nameofmyscript)

#163553 01/11/06 10:02 AM
Joined: Oct 2006
Posts: 166
B
Vogon poet
Offline
Vogon poet
B
Joined: Oct 2006
Posts: 166
maybe something like this??

Code:
alias quit {
if ($1 = set) set %quitmsg -s $$?
else quit $iif(%quitmsg,$v1,Bye)
}


Kind Regards, blink
#163554 01/11/06 10:19 AM
Joined: Oct 2006
Posts: 342
L
learn3r Offline OP
Fjord artisan
OP Offline
Fjord artisan
L
Joined: Oct 2006
Posts: 342
alias quit {
if ($1-) .set %quitmsg $1- | /quit %quitmsg %script | .unset %quitmsg
else quit $iif(%quitmsg,$v1,%script)
}
;------------

I think this is the right code?

What about when i just click the quit on the menu?
and do not type the /quit

#163555 01/11/06 04:09 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
If you're just going to unset the variable, better to use a var.

As a general reply, there's no need to set the script variable, only accompany it, as such this should work:

Code:
alias quit { /quit $1- %script }


No reason to make it more complex than necessary.

edit: (directer ad original author)
as a side note, if you're looking to use the original quit in a script or on your own, use /!quit


-KingTomato

Link Copied to Clipboard