mIRC Homepage
Posted By: ZoDiaC on quit - 06/08/07 06:40 AM
on 1:quit: {
.say #chaco-corrientes ZoD|aC script ®2008 scriptFoundation }
}

i dont know if is write how i do any help

thnx
Posted By: trink Re: on quit - 06/08/07 10:55 AM
Originally Posted By: ZoDiaC
on 1:quit: {
.say #chaco-corrientes ZoD|aC script ®2008 scriptFoundation }
}


Well, #1, You've got 2 }'s. If you're trying to actually say } in the message, I'd suggest using $chr(125) instead of }

From what I'm seeing, you can't send a message to a channel on quit. What I'd suggest is in your aliases create a line that says /quit /msg #chaco-corrientes Zod|aC script ®2008 scriptFoundation | quit
This is if you're trying to send a message to #chaco-corrientes of course.
If you're trying to say that message prefixed with #chaco-corrientes, then you'd use /quit /say #chaco-corrientes Zod|aC script ®2008 scriptFoundation | quit
If you're trying to exit by using the X button on the top right hand corner, I'd say there pretty much isn't anything you can do. I could be wrong, I havent messed with on quit much. :x
Posted By: SladeKraven Re: on quit - 06/08/07 11:14 AM
Or if that server supports custom QUIT messages do that.
Posted By: ZoDiaC Re: on quit - 06/08/07 02:41 PM
my mystake any help
Posted By: LonDart Re: on quit - 07/08/07 06:32 PM
from the help file:
Quote:
The on QUIT event triggers when a user quits IRC while on the same channel as you.

The on DISCONNECT event triggers when you quit or are disconnected from an IRC Server.

/quit [message]
Disconnects you from IRC and will give the optional message as the reason for your departure. (this message only appears to people who are on the same channels as you).


So you could simply use
Code:
/quit ZoD|aC script ®2008 scriptFoundation


If you want that quit message to appear *only* on #chaco-corrientes, and not every channel you happen to be on, all I can think of is to part every other channel first, then quit using the above.

Or if you're happy to just message to #chaco-corrientes prior to quitting, and not have that be your actual quit message:

Code:
on ^*:disconnect: { if (#chaco-corrientes ischan ) msg $v1 ZoD|aC script ®2008 scriptFoundation }

Posted By: Bekar Re: on quit - 07/08/07 09:09 PM
'ischan' will just check of the channel name s in a valid format, not whether you were on it or not. You might want to check if:
Code:
if ($chan(#chaco-corrientes)) { echo $v1 ... }


As to whether you can 'msg' a channel in a DISCONNECT event, I'm not sure. I'd have thought it was too late. You're probably better off re-aliasing the '/quit' command.
Posted By: SladeKraven Re: on quit - 07/08/07 09:25 PM
Quote:

'ischan' will just check of the channel name s in a valid format, not whether you were on it or not.


Actually that does check to see whether or not you are on that channel..

ischan if v1 is a channel which you are on.
Posted By: LonDart Re: on quit - 07/08/07 10:51 PM
Quote:
As to whether you can 'msg' a channel in a DISCONNECT event...

That is why I used the ^ prefix. I doubt it would work on a server disconnect,
but think it should work if you issue a /quit.

Indeed it may not work at all, but it seemed like a good idea at the time.
Posted By: Bekar Re: on quit - 07/08/07 11:14 PM
Originally Posted By: SladeKraven
Actually that does check to see whether or not you are on that channel..

ischan if v1 is a channel which you are on.

I think you are confusing 'ison' with 'ischan'.
Posted By: LonDart Re: on quit - 07/08/07 11:16 PM
You're right.

Some rudimentary testing shows that the ^ prefix does not seem to work with on DISCONNECT.

*sigh*

Update:
Aha! found it. /help Halting default text:

Quote:
The ^ event prefix currently works only on the following types of events:
ACTION, BAN, CHAT, DEHELP, DEOP, DEVOICE, HELP, INVITE, JOIN, KICK,
MODE, NICK, NOTICE, OP, OPEN, PART, PING, TEXT, UNBAN, USERMODE,
VOICE, QUIT, SERV, SERVERMODE, SERVEROP, SNOTICE, TOPIC, WALLOPS.


Some stuff in the help file is hard to find. Had I seen that first...
Posted By: SladeKraven Re: on quit - 07/08/07 11:23 PM
Quote:

I think you are confusing 'ison' with 'ischan'.


No. That was taken directly from the help file.

/help ischan

isvoice nickname v1 has a voice on channel v2

isreg nickname v1 is a normal nick on channel v2

ischan if v1 is a channel which you are on.

isban if v1 is a banned address in internal ban list on channel v2

Part the channel #mIRC if you're on it.

//if (#mIRC ischan) echo -a $true

Re-join it and again:

//if (#mIRC ischan) echo -a $true
Posted By: Horstl Re: on quit - 08/08/07 02:12 AM
Well, in fact, there is a slight difference:
ison checks for: "nick v1 is a nick in the nicklist of v2". (Therefore, v1 being a user on that chan, and v2 being a valid chan).
ischan checks for: "v1 being a open channel window". This is more precise than the quoted "is a channel which you are on" -

To see what I mean:
- disable the "rejoin channel when kicked" or "rejoin channels on connect" option. have "keep channels open" enabled.
- prior to being kicked or disconnected, both statements will be true: "$me ison #chan" and "#chan ischan".
- get kicked out of that chan or disconnect.
- now (disconnected or kicked) "$me ison #chan" will be false, but "#chan ischan" still true: as that channel window remained open.

Imho, the condition "ischan" is completely sufficient in most circumstances.
© mIRC Discussion Forums