This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post . Click the X in the top right-corner of this box to dismiss this message.
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Football
Master
Posts: 205 Joined: Fri Dec 26, 2008 3:08 pm
Location: Quakenet, #Football
Post
by Football » Fri Jun 04, 2010 2:49 pm
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.
tueb
Halfop
Posts: 76 Joined: Thu Oct 04, 2007 6:09 am
Location: #quiz.de @ irc.gamesurge.net
Contact:
Post
by tueb » Sun Jun 06, 2010 5:43 am
i hope this helps:
Code: Select all
#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"
}
}
}
}
Football
Master
Posts: 205 Joined: Fri Dec 26, 2008 3:08 pm
Location: Quakenet, #Football
Post
by Football » Sun Jun 06, 2010 1:53 pm
[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.
Behemoth
Voice
Posts: 20 Joined: Mon May 19, 2008 7:23 am
Location: Mauritius
Contact:
Post
by Behemoth » Sat Jun 26, 2010 10:35 am
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
Last edited by
Behemoth on Tue Jul 20, 2010 11:03 am, edited 1 time in total.
Football
Master
Posts: 205 Joined: Fri Dec 26, 2008 3:08 pm
Location: Quakenet, #Football
Post
by Football » Wed Jul 14, 2010 12:52 pm
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.
speechles
Revered One
Posts: 1398 Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)
Post
by speechles » Wed Jul 14, 2010 2:36 pm
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: Select all
Change this:
variable oplist ""
To this:
if {![info exists oplist]} { set oplist "" }
Football
Master
Posts: 205 Joined: Fri Dec 26, 2008 3:08 pm
Location: Quakenet, #Football
Post
by Football » Thu Jul 15, 2010 8:08 am
speechles, it will work only on rehash not on restart right?
Thanks!
Idling at #Football, Quakenet.
speechles
Revered One
Posts: 1398 Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)
Post
by speechles » Thu Jul 15, 2010 5:41 pm
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.
devilsoulblack
Halfop
Posts: 62 Joined: Wed Nov 19, 2003 9:18 pm
Location: Chile
Contact:
Post
by devilsoulblack » Fri Sep 17, 2010 11:40 pm
thanks for shared
---------
Add [SOLVED] to the thread title if your issue has been.
Search -
FAQ