| View previous topic :: View next topic |
| Author |
Message |
awyeah Revered One

Joined: 26 Apr 2004 Posts: 1580 Location: Switzerland
|
Posted: Tue May 08, 2007 9:36 pm Post subject: |
|
|
Heres a similar script I coded, it uses chanserv why replies to find out. You can check it out, though you need to modify the active channels and upto which chanserv access level the bot can deop the user.
It runs every 15mins and checks all idle ops and deops if they are idle for an hour or more and voices them instead.
| Code: |
bind time - "*" idle:ops
bind notc - "*" idle:ops:chanserv:why
proc idle:ops {m h d mo y} {
global botnick chanserv idledeop
if {$m} {set m [string trimleft $m 0]}
if {$m % 15 == 0} {
foreach chan "#klsex #miri" {
foreach user [chanlist $chan] {
if {[isop $user $chan] && ![isbotnick $user] && ![string equal "awyeah" $user] && ![string equal "enforcing" $user] && ([getchanidle $user $chan] > 60)} {
putserv "PRIVMSG $chanserv :WHY $chan $user"
if {[info exists idledeop]} { unset idledeop }
set idledeop 1
}
}
}
}
}
proc idle:ops:chanserv:why {nick uhost hand text {dest ""}} {
global botnick idledeop
if {[info exists idledeop]} {
set text [stripcodes bcruag $text]
if {[isbotnick $dest] && [string equal "ChanServ" $nick] && [string match "*has * access to #* *Reason:*" $text] && [string equal -nocase "#klsex" [string trimright [lindex $text 5] .]] || [string equal -nocase "#miri" [string trimright [lindex $text 5] .]]} {
if {[string equal "AOp" [lindex $text 2]] || [string equal "NO" [lindex $text 2]]} {
utimer [rand 60] [list putquick "MODE [string trimright [lindex $text 5] .] -o+v-k [lindex $text 0] [lindex $text 0] 2Idle.op.12deoped.and.2voiced" -next]
if {[info exists idledeop]} { unset idledeop }
}
}
}
}
|
Note: edited as there was a small bug _________________ ·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Last edited by awyeah on Fri May 11, 2007 8:57 am; edited 3 times in total |
|
| Back to top |
|
 |
ZEXEL Halfop

Joined: 27 Jun 2006 Posts: 45
|
Posted: Wed May 09, 2007 12:18 am Post subject: yeah.. |
|
|
thanks @awyeah & nice job!  _________________ .:[ Knowledge Is The Power ]:. |
|
| Back to top |
|
 |
ircguru Voice
Joined: 21 Jul 2007 Posts: 5
|
Posted: Sat Aug 04, 2007 4:37 pm Post subject: ayeah sir |
|
|
| if we already have more bots the bot will aslo deop the other bot ? if they are idle???? |
|
| Back to top |
|
 |
awyeah Revered One

Joined: 26 Apr 2004 Posts: 1580 Location: Switzerland
|
Posted: Sun Aug 05, 2007 8:25 pm Post subject: Re: ayeah sir |
|
|
| ircguru wrote: | | if we already have more bots the bot will aslo deop the other bot ? if they are idle???? |
Yes indeed.. _________________ ·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
================================== |
|
| Back to top |
|
 |
|