| View previous topic :: View next topic |
| Author |
Message |
Sydneybabe Op
Joined: 27 Apr 2007 Posts: 106 Location: Philippines
|
Posted: Wed Aug 07, 2013 3:12 pm Post subject: auto deop/devoice |
|
|
hi i have added this script on my bot and error appear:
| Code: | | Tcl error [idle:ops]: expected boolean value but got "09" (looks like invalid octal number) |
|
|
| Back to top |
|
 |
Madalin Master

Joined: 24 Jun 2005 Posts: 310 Location: Constanta, Romania
|
Posted: Wed Aug 07, 2013 4:40 pm Post subject: |
|
|
| Code: | 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 _________________ https://github.com/MadaliNTCL - To chat with me: https://tawk.to/MadaliNTCL |
|
| Back to top |
|
 |
Sydneybabe Op
Joined: 27 Apr 2007 Posts: 106 Location: Philippines
|
Posted: Mon Aug 12, 2013 10:40 am Post subject: |
|
|
on partyline i am encountering an error with this message:
| Quote: | | 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 |
|
| Back to top |
|
 |
Madalin Master

Joined: 24 Jun 2005 Posts: 310 Location: Constanta, Romania
|
Posted: Mon Aug 12, 2013 10:43 am Post subject: |
|
|
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 _________________ https://github.com/MadaliNTCL - To chat with me: https://tawk.to/MadaliNTCL |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Mon Aug 12, 2013 12:34 pm Post subject: |
|
|
| Madalin wrote: | | That is not an error from the script above. |
Did you even look at your code?
| Code: | | 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: | | set chanserv "ChanServ" |
_________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
Madalin Master

Joined: 24 Jun 2005 Posts: 310 Location: Constanta, Romania
|
Posted: Mon Aug 12, 2013 12:42 pm Post subject: |
|
|
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. _________________ https://github.com/MadaliNTCL - To chat with me: https://tawk.to/MadaliNTCL |
|
| Back to top |
|
 |
|