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 

auto deop & devoice

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


Joined: 26 Apr 2004
Posts: 1580
Location: Switzerland

PostPosted: Tue May 08, 2007 9:36 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
ZEXEL
Halfop


Joined: 27 Jun 2006
Posts: 45

PostPosted: Wed May 09, 2007 12:18 am    Post subject: yeah.. Reply with quote

thanks @awyeah & nice job! Cool
_________________
.:[ Knowledge Is The Power ]:.
Back to top
View user's profile Send private message Visit poster's website
ircguru
Voice


Joined: 21 Jul 2007
Posts: 5

PostPosted: Sat Aug 04, 2007 4:37 pm    Post subject: ayeah sir Reply with quote

if we already have more bots the bot will aslo deop the other bot ? if they are idle????
Back to top
View user's profile Send private message
awyeah
Revered One


Joined: 26 Apr 2004
Posts: 1580
Location: Switzerland

PostPosted: Sun Aug 05, 2007 8:25 pm    Post subject: Re: ayeah sir Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
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