egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CS auto why

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
yanny
Voice


Joined: 20 Aug 2009
Posts: 2

PostPosted: Fri Aug 21, 2009 7:37 am    Post subject: CS auto why Reply with quote

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
View user's profile Send private message
arfer
Master


Joined: 26 Nov 2004
Posts: 436
Location: Manchester, UK

PostPosted: Fri Aug 21, 2009 9:22 am    Post subject: Reply with quote

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
View user's profile Send private message
yanny
Voice


Joined: 20 Aug 2009
Posts: 2

PostPosted: Fri Aug 21, 2009 1:51 pm    Post subject: Reply with quote

it is working perfectly fine... u are terrific!! thank you!!
Back to top
View user's profile Send private message
Thanhas
Op


Joined: 02 Sep 2006
Posts: 124
Location: Ottawa, Canada

PostPosted: Sun Aug 23, 2009 2:34 am    Post subject: Reply with quote

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 Smile

hope its pssible...
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
arfer
Master


Joined: 26 Nov 2004
Posts: 436
Location: Manchester, UK

PostPosted: Wed Aug 26, 2009 12:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
Thanhas
Op


Joined: 02 Sep 2006
Posts: 124
Location: Ottawa, Canada

PostPosted: Wed Aug 26, 2009 1:05 pm    Post subject: Reply with quote

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
View user's profile Send private message Yahoo Messenger MSN Messenger
devilsoulblack
Halfop


Joined: 19 Nov 2003
Posts: 62
Location: Chile

PostPosted: Sat Sep 18, 2010 8:21 pm    Post subject: Reply with quote

@arfer : thanks for sharing
_________________
---------
Add [SOLVED] to the thread title if your issue has been.
Search - FAQ
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
4mirc
Voice


Joined: 16 May 2008
Posts: 37

PostPosted: Tue Oct 12, 2010 4:29 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber