Services Windows

By Cados on Apr 19, 2010

I got sick of every time I typed: /cs help my entire active screen would get flooded so I put all notices from the services into a window. and anything typed into the window will be put into: /msg *serv $1-
hope you like it. :-)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Services Window                   ;
; Edited with thanks too:           ;
; trill, napa182                    ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; SOF ;
on ^*:NOTICE:*:?:{
  if ($regex($nick,/((Chan|Bot|Nick|Memo|Host|Oper)Serv?\b)/i)) {
    if (!$window($+(@,$nick,.,$network))) { window -e0 $+(@,$nick,.,$network) }
    aline -p $+(@,$nick,.,$network) $nick : $1-
    haltdef
  }
}
on *:INPUT:*:{ 
  if ($regex($1,/^@((Chan|Bot|Nick|Memo|Host|Oper)Serv?\b)/iS)) {
    .msg $regml(1) $2- 
    haltdef
  }
}

Comments

Sign in to comment.
Cados   -  Apr 20, 2010

Thanks.

 Respond  
jsg55   -  Apr 20, 2010

lol great idea on this script cados, nice and convenient.

 Respond  
Cados   -  Apr 20, 2010

I have some. I'll probably be finished in about 10 minutes. I'll post it soon.

 Respond  
Cheiron   -  Apr 20, 2010

much much better. nice one guys and nice idea Cados. look forward to seeing any others you come up with thumbs up

 Respond  
Cados   -  Apr 20, 2010

Man, today just isn't my day. :D Fixed it...AGAIN

 Respond  
napa182   -  Apr 20, 2010

lol you got the notice event, but you forgot to add the on input event ;x

 Respond  
Cheiron   -  Apr 20, 2010

it does yes.. but readers of the threads here can see why it is now as it looks.
delete the Cracker thread as it is nothing to do with this snippet or topic. rating it now a 7

i would do it though like this

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; this code's name                  ;
; edited with thanks too            ;
; trill, napa182, etc               ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
on ^*:NOTICE:*:?:{
  if ($regex($nick,/((Chan|Bot|Nick|Memo|Host|Oper)Serv?\b)/i)) {
    if (!$window($+(@,$nick,.,$network))) { window -e0 $+(@,$nick,.,$network) }
    aline -p $+(@,$nick,.,$network) $nick : $1-
    haltdef
  }
}

that way they can see the acknowledgement as it is supposed to be done :)

 Respond  
Cados   -  Apr 20, 2010

Edited. It's looks too small for people to think it was the same as my old one. :D

 Respond  
trill   -  Apr 20, 2010

edited the rewrite to take out the whois as Cados said.

 Respond  
Cheiron   -  Apr 20, 2010

get the code edited there Cados so we can see how it looks as per trill's final there

 Respond  
Cados   -  Apr 20, 2010

Ah sorry had an excess part of another one of my snippets. The @Whois you can delete.

 Respond  
Cheiron   -  Apr 20, 2010

its not too bad actually.. i use a different switches though for windows.
i use echo -t switch > echo -t @bans [ban logger] for my stuff or this ... > .window -g @optrack
the .echo and the .window make it a silent event too note..
gonna give it a 7 :)

 Respond  
Cados   -  Apr 20, 2010

Well I'll try that to see if it works. Other than that, like the snippet?

 Respond  
Cheiron   -  Apr 20, 2010

damn.. someone beat Jethro_ to the regex
question though.. is that regex right.. i always thought it was

if ($regex($1-,/(^|\s)(rest of regex here) or is the $1 correct in this instance with the server notices

 Respond  
napa182   -  Apr 20, 2010

lol yw

 Respond  
trill   -  Apr 19, 2010

you can turn this

on 1:INPUT:@ChanServ*:{
  .msg chanserv $1-
  halt
}
on 1:INPUT:@BotServ*:{
  .msg botserv $1-
  halt
}
on 1:INPUT:@HostServ*:{
  .msg hostserv $1-
  halt
}
on 1:INPUT:@NickServ*:{
  .msg nickserv $1-
  halt
}
on 1:INPUT:@MemoServ*:{
  .msg memoserv $1-
  halt
}
on 1:INPUT:@Operserv*:{
  .msg operserv $1-
  halt
}

into this to make it alil smaller just to give you an idea.

on *:INPUT:*:{ 
  if ($regex($1,/^@((Chan|Bot|Nick|Memo|Host|Oper)Serv?\b)/iS)) { 
    .msg $regml(1) $2- 
    haltdef
  }
}

you can also do much more to shorten the on notices. maybe somthing like this.

on ^*:NOTICE:*:?:{
  if ($regex($nick,/((Chan|Bot|Nick|Memo|Host|Oper)Serv?\b)/i)) {
    if (!$window($+(@,$nick,.,$network))) { window -e0 $+(@,$nick,.,$network) }
    aline -p $+(@,$nick,.,$network) $nick : $1-
    haltdef
  }
}

so the whole code would be

on *:INPUT:*:{ 
  if ($regex($1,/^@((Chan|Bot|Nick|Memo|Host|Oper)Serv?\b)/iS)) { 
    .msg $regml(1) $2- 
    haltdef
  }
}
on ^*:NOTICE:*:?:{
  if ($regex($nick,/((Chan|Bot|Nick|Memo|Host|Oper)Serv?\b)/i)) {
    if (!$window($+(@,$nick,.,$network))) { window -e0 $+(@,$nick,.,$network) }
    aline -p $+(@,$nick,.,$network) $nick : $1-
    haltdef
  }
}

thanks to napa for helping me make this smaller

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.