mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2002
Posts: 60
C
Babel fish
OP Offline
Babel fish
C
Joined: Dec 2002
Posts: 60
is there a way to part a channel and have the window stay open?

Joined: Nov 2003
Posts: 228
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Nov 2003
Posts: 228
I'm not sure that there is a way of doing this via scripting alone. There is a dll available at mircscripts.org (wnd.dll) which I believe allows you to do this.

Joined: Dec 2002
Posts: 60
C
Babel fish
OP Offline
Babel fish
C
Joined: Dec 2002
Posts: 60
thanks

Joined: Dec 2002
Posts: 60
C
Babel fish
OP Offline
Babel fish
C
Joined: Dec 2002
Posts: 60
the readme is not the easyest to understand and ive not really used DLLs much before any chance of an example please?

Joined: Nov 2003
Posts: 228
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Nov 2003
Posts: 228
It's fairly easy to use.

Code:
[color:green];small alias to return the wnd.dll's location[/color]
[color:blue]alias wnd { return $findfile($mircdir,wnd.dll,1).shortfn }[/color]

[color:green];this is the signal used by the dll[/color]
[color:blue]on *:SIGNAL:Wnd: {[/color]

  [color:green];all information sent by the dll will be echoed to
  ;the status window, you can replace this with whatever
  ;you want the script to do when an event occurs.[/color]
[color:blue]  echo -s $1-
}

on ME:*:JOIN:[color:red]#channel[/color]: {[/color]

  [color:green];this will 'hook' the channel window when you join it
  ;replace #channel with the channel name you want to keep
  ;open, or just use # if you want it to work on all channels.[/color]
[color:blue]  dll $wnd hook $window($chan).hwnd
}[/color]


The dll will send a tryclose message to the Wnd signal event when you or mIRC tries to close the channel. You can use something like if ($1 == tryclose) { ... } to catch this and have the script do what you want.

Hope that helps.

Joined: Dec 2002
Posts: 60
C
Babel fish
OP Offline
Babel fish
C
Joined: Dec 2002
Posts: 60
thank you

Joined: Nov 2003
Posts: 257
A
Fjord artisan
Offline
Fjord artisan
A
Joined: Nov 2003
Posts: 257
why dont you just use the way built into mIRC?

View > go to the IRC tab and the check off 'keep channels open'

Joined: Dec 2002
Posts: 60
C
Babel fish
OP Offline
Babel fish
C
Joined: Dec 2002
Posts: 60
forgot/never knew of its existence, thanks

Joined: Feb 2003
Posts: 67
N
Naz Offline
Babel fish
Offline
Babel fish
N
Joined: Feb 2003
Posts: 67
I believe 'keep channels open' only works when you are kicked from a channel. The window closes on me when I use /part and that option is ticked.


Those who live by the sword get shot by those who don't.
Joined: Jun 2003
Posts: 5,024
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
Correct, it does. Also, for when you /quit, the channel window stay open. It will not keep a channel window open when you /part it.

Regards,


Mentality/Chris

Link Copied to Clipboard