mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jul 2003
Posts: 16
M
Pikka bird
OP Offline
Pikka bird
M
Joined: Jul 2003
Posts: 16
how can i put chan o chanserv on one @window

Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
Code:
[color:brown];[/color]
[color:brown]; relay all chanserv notices to a custom window[/color]
[color:brown];[/color]
on [color:green]^[/color]*:NOTICE:*:*: {
  [color:brown]; if you receive a notice, make sure it's from ChanServ[/color]
  [color:brown]; on most networks, if there is a ChanServ, it is a restricted nick. if it is not, make sure to account for idiots trying to fool you[/color]
  if ([color:red]$nick == ChanServ[/color]) {
    [color:brown]; make sure the window exists![/color]
    if (!$window([color:blue]$+(@,$nick)[/color])) window [color:blue]$+(@,$nick)[/color]
    [color:brown]; send the notice to the window[/color]
    aline [color:blue]$+(@,$nick)[/color] $timestamp $1-
    [color:brown]; kill the default notice - haltdef works together with the ^ in the event line ![/color]
    [color:green]haltdef[/color]
  }
}


Note:this code is easily expandable to dump all services notices into one window, or a separate window for each service, that's the reason for the seemingly bloated $+(@,$nick) construction to provide the windowname. In that case, just change the red to
Code:
  if ([color:red]*Serv iswm $nick[/color]) {


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius

Link Copied to Clipboard