| View previous topic :: View next topic |
| Author |
Message |
yanny Voice
Joined: 20 Aug 2009 Posts: 2
|
Posted: Fri Aug 21, 2009 7:37 am Post subject: CS auto why |
|
|
| hi i would like to request for tcl script that would automatically do /cs why #channel nick when someone is opped and would notice to the channel ops immediately.. thanks i badly need this script to know whos access are they using.. i hope someone will make it for me |
|
| Back to top |
|
 |
arfer Master

Joined: 26 Nov 2004 Posts: 436 Location: Manchester, UK
|
Posted: Fri Aug 21, 2009 9:22 am Post subject: |
|
|
The response to a /WHO command may differ depending on the ircd services module, so, whilst I have tested this on DALnet, I can't guarantee it will work as expected elsewhere.
| Code: |
# why.tcl
# find out why users are op'd by chanserv services and onotice channel
set vWhyServ "chanserv@services.dal.net"
set vWhyTime 10
bind MODE - "% +o" pWhySend
bind NOTC - * pWhyReceive
proc pWhyCancel {} {
global vWhyChan vWhyNick
foreach item [utimers] {
if {[string equal pWhyTimeout [lindex $item 1]]} {
killutimer [lindex $item 2]
}
}
if {[info exists vWhyNick]} {unset vWhyNick}
if {[info exists vWhyChan]} {unset vWhyChan}
return 0
}
proc pWhyReceive {nick uhost hand text dest} {
global vWhyNick vWhyChan vWhyServ
if {![regexp {^#} $dest]} {
if {[string equal -nocase $nick [lindex [split $vWhyServ @] 0]]} {
if {[info exists vWhyNick]} {
set response [stripcodes bcruag $text]
if {[string match -nocase *${vWhyNick}* [join [lrange [split $response] 0 2]]]} {
putserv "NOTICE @$vWhyChan :$response"
pWhyCancel
}
}
}
}
return 0
}
proc pWhySend {nick uhost hand chan mode target} {
global vWhyServ vWhyNick vWhyChan vWhyTime
if {[string equal -nocase $nick [lindex [split $vWhyServ @] 0]]} {
set vWhyNick $target
set vWhyChan $chan
putserv "PRIVMSG $vWhyServ :WHY $vWhyChan $vWhyNick"
utimer $vWhyTime pWhyTimeout
}
return 0
}
proc pWhyTimeout {} {
global vWhyNick vWhyChan
putserv "PRIVMSG @$vWhyChan :a /WHY command for $vWhyNick timed out without response"
pWhyCancel
return 0
}
# eof
|
_________________ I must have had nothing to do
Last edited by arfer on Wed Aug 26, 2009 12:42 pm; edited 1 time in total |
|
| Back to top |
|
 |
yanny Voice
Joined: 20 Aug 2009 Posts: 2
|
Posted: Fri Aug 21, 2009 1:51 pm Post subject: |
|
|
| it is working perfectly fine... u are terrific!! thank you!! |
|
| Back to top |
|
 |
Thanhas Op

Joined: 02 Sep 2006 Posts: 124 Location: Ottawa, Canada
|
Posted: Sun Aug 23, 2009 2:34 am Post subject: |
|
|
Hello,
i apprecaite the codes of arfer.
i have one request in it?
can you add last mask in it? i me it tells that the Op was Joined with those nicks and masks past one week.
for e.g
arfer was seen with arfer1 (arfe@your.rock.ever) arfr2 (arfer@Long.live.bratish) being as op Past one week
hope its pssible... |
|
| Back to top |
|
 |
arfer Master

Joined: 26 Nov 2004 Posts: 436 Location: Manchester, UK
|
Posted: Wed Aug 26, 2009 12:45 pm Post subject: |
|
|
That information is not returned with a /WHY request (not on the network I use anyway) _________________ I must have had nothing to do |
|
| Back to top |
|
 |
Thanhas Op

Joined: 02 Sep 2006 Posts: 124 Location: Ottawa, Canada
|
Posted: Wed Aug 26, 2009 1:05 pm Post subject: |
|
|
| arfer wrote: | | That information is not returned with a /WHY request (not on the network I use anyway) |
But i have seen this on some channel so i request here...
Give a try if you could ? |
|
| Back to top |
|
 |
devilsoulblack Halfop

Joined: 19 Nov 2003 Posts: 62 Location: Chile
|
Posted: Sat Sep 18, 2010 8:21 pm Post subject: |
|
|
@arfer : thanks for sharing _________________ ---------
Add [SOLVED] to the thread title if your issue has been.
Search - FAQ |
|
| Back to top |
|
 |
4mirc Voice

Joined: 16 May 2008 Posts: 37
|
Posted: Tue Oct 12, 2010 4:29 pm Post subject: |
|
|
hello all
its wonderfull script but can any one add code
to make the code work in chans i want not all chans the bot in?
thanks for all |
|
| Back to top |
|
 |
|