mIRC Homepage
Posted By: bleach window problem - 15/12/06 01:32 PM
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.
Posted By: sparta Re: window problem - 15/12/06 02:08 PM
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.
Posted By: Sais Re: window problem - 15/12/06 02:29 PM
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()...

Posted By: sparta Re: window problem - 15/12/06 02:59 PM
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..
Posted By: bleach Re: window problem - 15/12/06 03:07 PM
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...
Posted By: Sais Re: window problem - 15/12/06 08:02 PM
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
Posted By: bleach Re: window problem - 15/12/06 09:19 PM
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
Posted By: Sais Re: window problem - 15/12/06 09:35 PM
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.
Posted By: Riamus2 Re: window problem - 15/12/06 09:53 PM
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.
Posted By: bleach Re: window problem - 16/12/06 08:21 AM
yeah, this may help us. I am waiting. thanks
Posted By: Mpdreamz Re: window problem - 16/12/06 10:32 AM
alternatively: Channel Splitter

Coding is poor and is due an update though, but it does work. :P
Posted By: bleach Re: window problem - 16/12/06 12:09 PM
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
Posted By: Riamus2 Re: window problem - 16/12/06 09:14 PM
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.
© mIRC Discussion Forums