mIRC Home    About    Download    Register    News    Help

Print Thread
window problem #166823 15/12/06 01:32 PM
Joined: Sep 2003
Posts: 156
B
bleach Offline OP
Vogon poet
OP Offline
Vogon poet
B
Joined: Sep 2003
Posts: 156
I am an operator in a global chan which has 1000 users. that's why there's too many joins, parts, nick changes etc. our problem is this; our users can't talk in the channel because of too many join and part echoes. I tried to halt default echoes and echo them in a custom window. but echoes needed to be shown on an active window, how can I do this?

I am thinkin about spliting channel window or dock a custom window to channel window but I can't do these. please help me, thanks.

Re: window problem [Re: bleach] #166825 15/12/06 02:08 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Code:
on ^*:JOIN:#:{
  if ($window(@events) == $null) window @events 60 100 600 200
  echo @evens $nick ( $+ $address $+ ) has joined $chan
}
on ^*:PART:#:{
  if ($window(@events) == $null) window @events 60 100 600 200
  set %partmsg $1-
  if (%partmsg == $null) { set %partmsg $nick }
  if ($window(@events) == $null) window @events 60 100 600 200
  echo @evens $nick ( $+ $address $+ ) has left $chan ( $+ %partmsg $+ )
}

something like that? the "^" hide the default message. this goes to your remote "ALT + R" in mirc.


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: window problem [Re: sparta] #166827 15/12/06 02:29 PM
Joined: Oct 2003
Posts: 313
S
Sais Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 313
If all you want to do is hide the events, there's an option built into mIRC (alt-o IRC [Events], then you can choose where to have them displayed) . I'm not entirely sure whether the OP actually wanted the events or not.


However:

Code:
on ^*:JOIN:#:{
  if ($window(@events) == $null) window @events 60 100 600 200
  echo @events $nick ( $+ $address $+ ) has joined $chan
  haltdef
}
on ^*:PART:#:{
  if ($window(@events) == $null) window @events 60 100 600 200
  var %partmsg = $iif($1,$1-,$nick)
  if ($window(@events) == $null) window @events 60 100 600 200
  echo @events $nick ( $+ $address $+ ) has left $chan ( $+ %partmsg $+ )
}


Originally Posted By: sparta
something like that? the "^" hide the default message.


Err - the ^ just makes the event trigger before the default handler. You need a haltdef to stop the default. (a couple of typos corrected; var instead of set and assignment in one line...)

on quit is an interesting one, since it isn't specific to a channel so you need to check $comchan()...



Sais
Re: window problem [Re: Sais] #166828 15/12/06 02:59 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Code:
on ^*:QUIT:{
  if ($nick == $me) { goto end }
  set %quitmessage $1-
  if Ping timeout isin %quitmessage { set %quitmessage Ping timeout }
  if Connection reset by peer isin %quitmessage { set %quitmessage Connection reset by peer }
  set %quitchan $chan
  %quit.1 = 1 
  :quits
  if ($nick ison $chan(%quit.1)) { 
    set %quit.echo $chan(%quit.1) 
    themequit
    inc %quit.1
    goto quits 
  }
  elseif ($chan(%quit.1) != $null) { inc %quit.1
  goto quits }
  halt
  else { goto naiquit }
  :naiquit
  halt
  :end
}
alias themequit {
  if ($window(@events) == $null) window @events 60 100 600 200
  if %quitmessage == $null { set %quitmessage no reason }
  echo @events $chan(%quit.1) $nick ( $+ $address $+ ) Quit ( $+ %quitmessage $+ ) | haltdef
}

This whould work to echo the quit events to @events .. and yeah, i mixed them up smirk so add haltdef in the end of the other events would hide the messages in the channel..


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: window problem [Re: Sais] #166829 15/12/06 03:07 PM
Joined: Sep 2003
Posts: 156
B
bleach Offline OP
Vogon poet
OP Offline
Vogon poet
B
Joined: Sep 2003
Posts: 156
I don't need these. I know how to halt default text and echo them on another window. this operation is already easy, I did.

But I need to dock a custom window into top of channel window. And am gonna echo default text in this window.

Sparta thank you so much but I made better one, I don't need these! please, please help me this is important for us...

Re: window problem [Re: bleach] #166846 15/12/06 08:02 PM
Joined: Oct 2003
Posts: 313
S
Sais Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 313
You can use window @win x y w h to move a window, and you could use the channel window's x,y,w ($window(#chan).x, etc) to set the placement of your @win.

But if you want to move the @win....I think to do it purely with mIRC script you'd need to run a polled test (with a timer) to see if the #chan window had moved, and adjust the @win's at that time.

Alternatively there are probably some DLLs that will dock two windows together. Someone else would have to comment on that, though; I avoid DLLs where possible laugh

Last edited by Sais; 15/12/06 08:03 PM.

Sais
Re: window problem [Re: Sais] #166854 15/12/06 09:19 PM
Joined: Sep 2003
Posts: 156
B
bleach Offline OP
Vogon poet
OP Offline
Vogon poet
B
Joined: Sep 2003
Posts: 156
yes thanks but I used these properties before and custom window doesn't shown in the front of channel window always. if I use ACTIVE event or a timer to active it, then channel window deactives. Channel window should be active and custom window should be shown in front of it. I need to attach/dock custom window to channel window. I am waiting and gonna wait for help... frown

Re: window problem [Re: bleach] #166857 15/12/06 09:35 PM
Joined: Oct 2003
Posts: 313
S
Sais Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 313
Does it have to be _in front_, can't it be above or below or to one side (and hence always visible)? All of those are doable with scripting.

There are also the -d and -o options for /window.


Sais
Re: window problem [Re: Sais] #166858 15/12/06 09:53 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
I actually have a mini window (dialog) that shows bandwidth (up/down and the total is in the title of it). I have it set to check the position of the main mIRC window and every second and to move it to match the main window and at the same time to activate the main window again after moving it. That may be what you're trying to do. It isn't docked exactly, but it's enough for me and I don't really need to have a DLL to just handle that for me. DCX does have docking,though (I think).

If you want to see how I did that, let me know and I'll paste it when I get home... I forget how I have it set up right now.


Invision Support
#Invision on irc.irchighway.net
Re: window problem [Re: Riamus2] #166897 16/12/06 08:21 AM
Joined: Sep 2003
Posts: 156
B
bleach Offline OP
Vogon poet
OP Offline
Vogon poet
B
Joined: Sep 2003
Posts: 156
yeah, this may help us. I am waiting. thanks

Re: window problem [Re: bleach] #166900 16/12/06 10:32 AM
Joined: Apr 2004
Posts: 759
M
Mpdreamz Offline
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 759
alternatively: Channel Splitter

Coding is poor and is due an update though, but it does work. :P


$maybe
Re: window problem [Re: Mpdreamz] #166902 16/12/06 12:09 PM
Joined: Sep 2003
Posts: 156
B
bleach Offline OP
Vogon poet
OP Offline
Vogon poet
B
Joined: Sep 2003
Posts: 156
yeah that's what I need. but when I enlarge nick list, custom window doesn't constrict? if you fix this error, then you make us happy so much, thanks smile

Re: window problem [Re: bleach] #166925 16/12/06 09:14 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Here's where I posted it for someone else.

You'll want both parts in a timer (or timers) that trigger every 1-2 seconds. Docking is usually easier, but this works if you don't want to use an entire DLL just to keep your dialog in the correct place.


Invision Support
#Invision on irc.irchighway.net