mIRC Home    About    Download    Register    News    Help

Print Thread
#182196 06/08/07 06:40 AM
Joined: Aug 2007
Posts: 9
Z
ZoDiaC Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Z
Joined: Aug 2007
Posts: 9
on 1:quit: {
.say #chaco-corrientes ZoD|aC script ®2008 scriptFoundation }
}

i dont know if is write how i do any help

thnx

ZoDiaC #182202 06/08/07 10:55 AM
Joined: May 2007
Posts: 13
T
Pikka bird
Offline
Pikka bird
T
Joined: May 2007
Posts: 13
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

ZoDiaC #182203 06/08/07 11:14 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Or if that server supports custom QUIT messages do that.

SladeKraven #182212 06/08/07 02:41 PM
Joined: Aug 2007
Posts: 9
Z
ZoDiaC Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Z
Joined: Aug 2007
Posts: 9
my mystake any help

ZoDiaC #182307 07/08/07 06:32 PM
Joined: Jul 2006
Posts: 107
L
Vogon poet
Offline
Vogon poet
L
Joined: Jul 2006
Posts: 107
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 }



LonDart
LonDart #182316 07/08/07 09:09 PM
Joined: Dec 2002
Posts: 503
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
'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.

Bekar #182319 07/08/07 09:25 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
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.

SladeKraven #182321 07/08/07 10:51 PM
Joined: Jul 2006
Posts: 107
L
Vogon poet
Offline
Vogon poet
L
Joined: Jul 2006
Posts: 107
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.

Last edited by LonDart; 07/08/07 10:51 PM.

LonDart
SladeKraven #182322 07/08/07 11:14 PM
Joined: Dec 2002
Posts: 503
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
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'.

Bekar #182323 07/08/07 11:16 PM
Joined: Jul 2006
Posts: 107
L
Vogon poet
Offline
Vogon poet
L
Joined: Jul 2006
Posts: 107
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...


LonDart
Bekar #182324 07/08/07 11:23 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
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

ZoDiaC #182332 08/08/07 02:12 AM
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
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.

Last edited by Horstl; 08/08/07 02:19 AM.

Link Copied to Clipboard