| View previous topic :: View next topic |
| Author |
Message |
Football Master
Joined: 26 Dec 2008 Posts: 205 Location: Quakenet, #Football
|
Posted: Fri Jun 04, 2010 2:49 pm Post subject: Deop ops on inactivity & Reop on activity |
|
|
I need a script that will deop the users on one hour of inactivity and reop them once they are active again (hop a channel, change nick, talks..)
Please help! _________________ Idling at #Football, Quakenet. |
|
| Back to top |
|
 |
tueb Halfop
Joined: 04 Oct 2007 Posts: 76 Location: #quiz.de @ irc.gamesurge.net
|
Posted: Sun Jun 06, 2010 5:43 am Post subject: |
|
|
i hope this helps:
| Code: | #your channel:
variable opchan "#channel"
#idle time in minutes:
variable idletime 60
bind time - "* * * *" deop_user
variable oplist ""
proc deop_user {a b c d e} {
global opchan idletime oplist
set users [lrange [chanlist $opchan] 1 end]
foreach user $users {
if {[getchanidle $user $opchan] >= $idletime && [isop $user $opchan] && ![isbotnick $user]} {
putserv "MODE $opchan -o $user"
lappend oplist [getchanhost $user $opchan]
} elseif {[getchanidle $user $opchan] < $idletime && ![isop $user $opchan]} {
if {[lsearch -exact $oplist [getchanhost $user $opchan]] != -1} {
putserv "MODE $opchan +o $user"
}
}
}
} |
_________________ #Quiz.de @ irc.GameSurge.net
JavaChat |
|
| Back to top |
|
 |
Football Master
Joined: 26 Dec 2008 Posts: 205 Location: Quakenet, #Football
|
Posted: Sun Jun 06, 2010 1:53 pm Post subject: |
|
|
[20:46:57] * Collina sets mode: -o Xabriel
[20:52:37] <Xabriel> no games on tonight
[20:52:39] <Xabriel> not usedto that
[20:52:40] <Xabriel> hrmm
[20:52:57] * Collina sets mode: +o Xabriel
Works, thanks! _________________ Idling at #Football, Quakenet. |
|
| Back to top |
|
 |
Behemoth Voice
Joined: 19 May 2008 Posts: 20 Location: Mauritius
|
Posted: Sat Jun 26, 2010 10:35 am Post subject: |
|
|
Hello there..
this script works well
but one more thing i would like to know...
is it possible to add a line where it can exempt some specific ops of specific channels plz ??
thnkx _________________ Http://optix-pro.labrute.fr/
Http://ircaz.fr/
Losers Always Whine About Their Best, But Winners Go Home And F*** The Prom Queen!
Last edited by Behemoth on Tue Jul 20, 2010 11:03 am; edited 1 time in total |
|
| Back to top |
|
 |
Football Master
Joined: 26 Dec 2008 Posts: 205 Location: Quakenet, #Football
|
Posted: Wed Jul 14, 2010 12:52 pm Post subject: |
|
|
tueb, is it possible to edit the script so that when I rehash/restart it, it won't forget who should be opped/deopped on activity/inactivity? _________________ Idling at #Football, Quakenet. |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Wed Jul 14, 2010 2:36 pm Post subject: |
|
|
| Football wrote: | | tueb, is it possible to edit the script so that when I rehash/restart it, it won't forget who should be opped/deopped on activity/inactivity? |
| Code: | Change this:
variable oplist ""
To this:
if {![info exists oplist]} { set oplist "" } |
_________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
Football Master
Joined: 26 Dec 2008 Posts: 205 Location: Quakenet, #Football
|
Posted: Thu Jul 15, 2010 8:08 am Post subject: |
|
|
speechles, it will work only on rehash not on restart right?
Thanks! _________________ Idling at #Football, Quakenet. |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Thu Jul 15, 2010 5:41 pm Post subject: |
|
|
| Football wrote: | speechles, it will work only on rehash not on restart right?
Thanks! |
Correct, to have it "remember" what it knows after a .restart would require using an external file to keep track of your $oplist. Using a bind on pre-rehash/restart to trigger a procedure that saves the $oplist. Then when restarting/rehasing you can use this kind of logic ( if {![info exists oplist]} { ...load $oplist from external file here... } ). The ![info exists] part is used to keep it from affecting rehashing. The $oplist will still exist during rehash. _________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
devilsoulblack Halfop

Joined: 19 Nov 2003 Posts: 62 Location: Chile
|
Posted: Fri Sep 17, 2010 11:40 pm Post subject: |
|
|
thanks for shared _________________ ---------
Add [SOLVED] to the thread title if your issue has been.
Search - FAQ |
|
| Back to top |
|
 |
|