mIRC Home    About    Download    Register    News    Help

Print Thread
#3825 29/12/02 12:16 AM
Joined: Dec 2002
Posts: 1,527
_
_D3m0n_ Offline OP
Hoopy frood
OP Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527

on ^10:PART:#:{ part # 12D3m0nicMirc7 = 4http://cyber-chats.com/main/about.html 14!!! | halt }

ok what im tryin to do is fix the problem im having with it looping back around and tryin to part the channel twice ???
any suggestions on that??
and um id like to know where i actually went wrong on this if anyone can help me ..... it would help me alot in later scripting on things

<- :_D3m0n_!D3m0nic@ChatUniverse-298F4A2.cfl.rr.com PART #Channel
-> Shadow.chatuniverse.net PART #Channel laugh3m0nicMirc = http://cyber-chats.com/main/about.html !!!
-> Shadow.chatuniverse.net PART #Channel
<- :_D3m0n_!D3m0nic@ChatUniverse-298F4A2.cfl.rr.com PART #Channel laugh3m0nicMirc = http://cyber-chats.com/main/about.html !!!
<- :Shadow.chatuniverse.net 403 _D3m0n_ #Channel :No such channel


D3m0nnet.com
#3826 29/12/02 12:26 AM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
Yet there's no solution for that. You can't stop the mIRC default /part command, so just halt the "you're not on a channel" annoying raw.

#3827 29/12/02 12:29 AM
Joined: Dec 2002
Posts: 1,527
_
_D3m0n_ Offline OP
Hoopy frood
OP Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
ok see i was wondering how i could do this cause ive seen so many other mircs with defualt part messages and well wasnt sure if they had overcome this and if im the only mentally challanged one out there altho it would be nice to halt that second loopback


D3m0nnet.com
#3828 29/12/02 05:14 AM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
You can alias the part command itself to add your default /part message, and you can apply it to the channel popup to part the channel. The on PART event does you no good because you have already left the channel...the event is reacting after the fact. on Part reacts when it sees the PART command come back from the server, not when you issue a PART command and not when you click the [X] in the top right.

I know of no way to catch the closing of a channel window (since on CLOSE doesn't capture it); therefore, I don't see any way to set a true "default part message" as such.

It would be VERY nice if clicking the [X] close button for a channel window would trigger the special case on me:*:PART:#: and allow you to specify a default part message or do whatever other processing needs to be done (such as savebuf-ing).


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
#3829 29/12/02 05:18 AM
Joined: Dec 2002
Posts: 1,527
_
_D3m0n_ Offline OP
Hoopy frood
OP Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
hammer unfortunatly the debug window shows the on part command as sending my onpart event i set up ........ im using mirc 6.02 and well maybe u should test it and see im really not making it up .... i clicked the [X] as u said wouldnt work and it sends it just fine ..... and the person with the remedy of halting the error message worked out perfectly ..... i dont see it anymore and the part message fires perfectly even when clicking the X .......... i tried it with the debug window open and it shows it as being sent ..... also everyone in the channel sees my part message .......... anyhow .... i do know u know ur stuff ive seen alot of ur posts but this time i think maybe ur mistaken or misundersatnding what im asking


D3m0nnet.com
#3830 29/12/02 05:33 AM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
When the X is clicked on a channel window on PART fires first, but when the /part command is used on PART fires only when it has recieved the part message from the server.

#3831 29/12/02 06:41 AM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
You are correct; I should have tested it before I answered and I didn't because I assumed (having tried it before, a long time ago) that it wouldn't work. I'm definitely wrong this time.
Code:

on me:*:PART:#:{
  set -u60 %Part.Chans $addtok(%Part.Chans,$chan,32)
  .raw PART $chan :Testing this default part message.
  ; halt &lt;-- this halt has no effect (tested it, this time!)
}
raw 442:*: if ($istok(%Part.Chans,$2,32)) halt

However, after having read the @Debug log, it's just a wee bit confusing in terms of order of listed events. Something very suspicious is happening here.
  1. I click the [X] button to part #MyChannel
  2. <- :MyNick!myuserid@my.host.net PART #MyChannel

    This is the confusing part. This line appears to indicate that the server is telling me that I am leaving the channel before I even issue the command(s) to do so!! cool Very slick, Khaled; cool a faked on PART to pre-fire on me:*:PART:#:{ commands }. This gives me time to insert my own default part message.
  3. -> irc.server.net PART #MyChannel :Testing this default part message.
  4. -> irc.server.net PART #MyChannel

    Odd that the halt doesn't stop me from sending the other PART #MyChannel (without the message).
  5. <- :MyNick!myuserid@my.host.net PART #MyChannel :Testing this default part message.

    Ok, here's the REAL server telling me that I really did part the channel this time (with a part message, too!). I notice that I don't react again to this on me:*:PART:#: event and get caught in a vicious loop.
  6. <- :irc.server.net 442 MyNick #MyChannel :You're not on that channel

    As you mentioned, just halt this if $2 is a channel we just left.
This happens to me occasionally, just like it happens to everyone else I have ever met. You make assumptions based either on previous versions or previous experiences that you perhaps misinterpretted. Then you proceed (without testing things thoroughly) to shove your foot straight down your throat all the way up to the hip! I've made some memorable hip insertions in the past and I doubtless will do so again in the future.

I'll go so far as to go on record, here and now, to say that I know for a fact I don't know what a fact is, or even that there really is such a thing.


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
#3832 29/12/02 04:36 PM
Joined: Dec 2002
Posts: 1,527
_
_D3m0n_ Offline OP
Hoopy frood
OP Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
LoL hammer its cool tho ..... im really glad uve went into such great detail and time to test it and everything ..... also uve given me an alternative coding method to test since as u seen mines different than urs...... everyone has thier own way and im gonna test the way uve shown me as well to see which one works for me best in my scripting and ty again for taking the time and effort to reproduce exactly what i was talking about


D3m0nnet.com
#3833 05/01/03 01:52 AM
Joined: Dec 2002
Posts: 1,527
_
_D3m0n_ Offline OP
Hoopy frood
OP Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
hey hammer u have something like that for adding a colored Quit messages since anytime ive added one in it erases the color codes ???? ive tried a few things and couldnt come up with anything that worked ill show u what ive tried but um its just basic stuff

on me:*:QUIT:{
.raw QUIT :12D3m0nicMirc7 = 4http:REMOVED 14!!
}


D3m0nnet.com
#3834 05/01/03 03:18 AM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
File / Options (Alt-O) / IRC / Messages

Quit message: $MyQuitMessage

Then in your remotes (Alt-R), add the following line:

alias MyQuitMessage return 12D3m0nicMirc7 = 4http:REMOVED 14!!


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
#3835 05/01/03 03:27 AM
Joined: Dec 2002
Posts: 1,527
_
_D3m0n_ Offline OP
Hoopy frood
OP Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
kewl ty i couldnt figure out how to get round that color codes being stripped from there ........ altho maybe they should add something in to options about a possible default part message ..... would make things alot nicer and possibly fix that raw error from even being displayed again ty for tha help


D3m0nnet.com

Link Copied to Clipboard