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
Sydneybabe
Op


Joined: 27 Apr 2007
Posts: 106
Location: Philippines

PostPosted: Wed Aug 07, 2013 3:12 pm    Post subject: auto deop/devoice Reply with quote

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
View user's profile Send private message
Madalin
Master


Joined: 24 Jun 2005
Posts: 310
Location: Constanta, Romania

PostPosted: Wed Aug 07, 2013 4:40 pm    Post subject: Reply with quote

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


Joined: 27 Apr 2007
Posts: 106
Location: Philippines

PostPosted: Mon Aug 12, 2013 10:40 am    Post subject: Reply with quote

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
View user's profile Send private message
Madalin
Master


Joined: 24 Jun 2005
Posts: 310
Location: Constanta, Romania

PostPosted: Mon Aug 12, 2013 10:43 am    Post subject: Reply with quote

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


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Mon Aug 12, 2013 12:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
Madalin
Master


Joined: 24 Jun 2005
Posts: 310
Location: Constanta, Romania

PostPosted: Mon Aug 12, 2013 12:42 pm    Post subject: Reply with quote

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