mIRC Home    About    Download    Register    News    Help

Print Thread
#180013 02/07/07 02:10 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
I trying to make my own alias for /quit, how ever i got a small problem, this is how the code looks like:
Code:
quit {
  if ($1) { 
    .!quit $1-
  }
  else {
    .!quit Time wasted: $duration($online)
  }
}

and it would use /quit $1- if a value for $1 is given, how ever it return my nick when i use it, how come it dosent grab the value from $1- ? it woking ok if i dont give a value for $1 , then it quit with Time wasted: $duration($online) , i use ! so it wouldent be any alias that made it return my nick instead of $1-, ideas?


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
sparta #180014 02/07/07 02:18 PM
Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031
It works as expected here, are you sure you don't have another quit alias?

[09:14] * Quits: tnick (Quit: Time wasted: 0secs)
[09:15] * Joins: tnick
[09:15] * Quits: tnick (Quit: testing)

sparta #180015 02/07/07 02:19 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
How are you calling /quit? Nothing in the code you've given us will cause that problem.

RoCk #180016 02/07/07 02:26 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
I have a theme on quit, but ! would skip any aliases and quit, wouldent it ?

on ^*:quit: {
haltdef
var %message = $1-
echo theme colors here
}

and that wouldent cose any problems to /quit ?

cos i calling my alias with /quit.

//echo -a $isalias(quit)
return false if i remove the quit alias i testing now.

;------ Edit

this is the quit message i get if i type: /quit quitmessage

Closing Link: test[my.host.se] (Quit: test)

my nick is test

Now i also tryed without my theme on quit, same problem so it's not that..

and debug gives me:

<- ERROR :Closing Link: test[my.host.se] (Quit: test)

Last edited by sparta; 02/07/07 02:34 PM.

if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
sparta #180017 02/07/07 02:34 PM
Joined: Mar 2007
Posts: 218
V
Fjord artisan
Offline
Fjord artisan
V
Joined: Mar 2007
Posts: 218
on ^*:ERROR:*.*:{

vexed2 #180018 02/07/07 02:35 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
No alias that grab error .. smirk

the only thing i think of is that i grab raw events with:

raw *:*: {

then i match $numeric

Last edited by sparta; 02/07/07 02:37 PM.

if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
sparta #180019 02/07/07 02:37 PM
Joined: Mar 2007
Posts: 218
V
Fjord artisan
Offline
Fjord artisan
V
Joined: Mar 2007
Posts: 218
huh?
I just tried this and it works

on ^*:ERROR:*.*:{ if (closing link isin $1-) { echo -s closing link to server | halt }

That grabs the message YOU get when you /quit
Even your debug showed that

By the way, your 'time wasted' will always be 0 because you're inputting /quit

Last edited by vexed2; 02/07/07 02:40 PM.
vexed2 #180020 02/07/07 02:39 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Ok, but it wont use the quit msg, still using quit: (my_nick)


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
sparta #180021 02/07/07 02:40 PM
Joined: Mar 2007
Posts: 218
V
Fjord artisan
Offline
Fjord artisan
V
Joined: Mar 2007
Posts: 218
The on ^*:quit: { event triggers for other users, not you.

vexed2 #180022 02/07/07 03:09 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
I know, but something cosing mirc to use my nick instead of the quit message, how ever i cant figure out what is it..


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
sparta #180023 02/07/07 03:14 PM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
Open a debug window (/debug @debug) and check that your quit message is actually being sent to the server.

Note that some servers disallow quit messages for a certain period after connection to prevent quit message spam. Some networks also have a channel mode that prevents use of custom part/quit messages.

Collective #180024 02/07/07 03:15 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
It's my own server, and i dont have anything like that on it.


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
sparta #180025 02/07/07 03:20 PM
Joined: Mar 2007
Posts: 218
V
Fjord artisan
Offline
Fjord artisan
V
Joined: Mar 2007
Posts: 218
Originally Posted By: sparta
I know, but something cosing mirc to use my nick instead of the quit message, how ever i cant figure out what is it..


Dunno what network you're on, but i'm on some that if you don't produce a quit message, the server automatically shows the nickname

sparta #180026 02/07/07 03:21 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Do what he said anyway. Open a /debug window and check what's being sent to the server when you use your /quit alias, then copy/paste it here for us to look at.

hixxy #180042 02/07/07 08:58 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
i had to remove the . , don't ask me why, but when i did it worked as it should.


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }

Link Copied to Clipboard