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.

auto deop/devoice

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
S
Sydneybabe
Op
Posts: 106
Joined: Fri Apr 27, 2007 3:31 am
Location: Philippines

auto deop/devoice

Post by Sydneybabe »

hi i have added this script on my bot and error appear:

Code: Select all

Tcl error [idle:ops]: expected boolean value but got "09" (looks like invalid octal number)
User avatar
Madalin
Master
Posts: 310
Joined: Fri Jun 24, 2005 11:36 am
Location: Constanta, Romania
Contact:

Post by Madalin »

Code: Select all

bind time - "00 * * * *" idle:ops
bind notc - "*" idle:ops:chanserv:why

proc idle:ops {m h d mo y} {
	global botnick chanserv idledeop

	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 }
			}
		}
	}
}
Try it like this it should check every hour at minute 00. I dont exactly know what did that guy wanted to do with that code. But i made it check automatic at every hour - minute 00

Everything else is the same
S
Sydneybabe
Op
Posts: 106
Joined: Fri Apr 27, 2007 3:31 am
Location: Philippines

Post by Sydneybabe »

on partyline i am encountering an error with this message:
Tcl error [idle:ops]: can't read "chanserv": no such variable
Last edited by Sydneybabe on Mon Aug 12, 2013 10:48 am, edited 1 time in total.
User avatar
Madalin
Master
Posts: 310
Joined: Fri Jun 24, 2005 11:36 am
Location: Constanta, Romania
Contact:

Post by Madalin »

That is not an error from the script above. And the error is obvious instead of $chan you have only $cha easy fix if i can say. So modify $cha to $chan and rehash. If you don`t succeed copy paste the script on http://paste.tclhelp.net and tell me the link and i will modify that for you
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

Madalin wrote:That is not an error from the script above.
Did you even look at your code?

Code: Select all

putserv "PRIVMSG $chanserv :WHY $chan $user" 
It is indeed an error from the script above. Should there possibly be a chanserv global variable at the top of your script?

Code: Select all

set chanserv "ChanServ"
User avatar
Madalin
Master
Posts: 310
Joined: Fri Jun 24, 2005 11:36 am
Location: Constanta, Romania
Contact:

Post by Madalin »

spechless "Last edited by Sydneybabe on Mon Aug 12, 2013 4:48 pm; edited 1 time in total".

I talked to him on IRC where he joined and asked me about the error. When he first posted here it was another error. Then he edited here. I already added that http://paste.tclhelp.net/?id=dnu (look at the time it was created). I talked to him about this script the problem is that he is using a modified script and not the original one and of course it doesn't work as he wants to.
Post Reply