Script that auto op's authed users on Quakenet

Release your script here.
State:
- Author
- What it does
- Perhaps a little guide.
- Also, if the snippet is of any use to the community, it has a chance of getting posted on the main page, so don't hesitate to submit/ask!

Script that auto op's authed users on Quakenet

Postby Cristian » Thu May 22, 2008 6:36 pm

well jonlar requested this Auto op script, so I could'nt find a better place to put it.

What does this script do?
The script gives operator status to every authed user on quakenet, when enabled, if they aren't authed, they recieve voice status.

commands. !aop|!aop on|!aop off

Please report bug and errors.

Code: Select all
setudef flag aop

namespace eval aop {

   namespace eval variable {
      variable rawid 678
   }
   bind time -|- "* * * * *" [namespace current]::scantime

   proc scantime {minute hour day month year} {
      bind RAW -|- {354} [namespace current]::raw354
      foreach channel [channels] {
         if {[channel get $channel aop]} {
            if {[botisop $channel]} {
               putserv "WHO $channel n%cnahuft,$::aop::variable::rawid"
            }
         }
      }
   }

   proc raw354 {s r a} {
      global aop
      set rawid "[lindex [split $a] 1]"
      set chan "[string tolower [lindex [split $a] 2]]"
      set ident "[string tolower [lindex [split $a] 3]]"
      set host "[string tolower [lindex [split $a] 4]]"
      set nick "[string tolower [lindex [split $a] 5]]"
      set flags "[lindex [split $a] 6]"

      set v "*+*"
      set o "*@*"
      if {[string equal -nocase $rawid $::aop::variable::rawid]} {
         if {[botisop $chan]} {
            if {![string match [lindex [split $a] 7] 0] > 0} {
               set auth "[string tolower [lindex [split $a] 7]]"
               if {[channel get $chan aop] == 1} {
                  if {[string match "$o" "$flags"] == 0} {
                     pushmode $chan +o $nick
                  }
               }
            } else {
               pushmode $chan +v $nick
            }
         }
      }
   }

   bind PUB o !aop [namespace current]::public

   proc public {nick uhost hand chan arg} {
      set s [lindex $arg 0]
      switch $s {
         on {
            if {[channel get $chan aop]} {
               putserv "NOTICE $nick :Auto op is already \002on\002 for $chan"
            } else {
               channel set $chan +aop
               putserv "NOTICE $nick :Auto op is now \002on\002 for $chan"
            }
         }
         off {
            channel set $chan -aop
            putserv "NOTICE $nick :Auto op is now \002off\002 for $chan"
         }
         default {
            if {[channel get $chan aop]} {
               putserv "NOTICE $nick :Auto op is \002on\002 for $chan"
            } else {
               putserv "NOTICE $nick :Auto op is \002off\002 for $chan"
            }
         }
      }
   }
}
Cristian
proof of advance
proof of advance
 
Posts: 282
Joined: Sun Nov 04, 2007 3:02 pm
Location: Denmark
Authnick: Sumsar

Re: Script that auto op's authed users on Quakenet

Postby jonlar » Fri May 30, 2008 12:58 pm

Waiting.... ;)
jonlar
 

Re: Script that auto op's authed users on Quakenet

Postby Lukemob » Sat May 31, 2008 10:20 pm

Many don't like waiting! That's also a reason why people learn to script by self. ;-)
Lukemob
 

Re: Script that auto op's authed users on Quakenet

Postby jonlar » Tue Jun 03, 2008 12:11 pm

Well i´ve tried. But, to be honest, i dont find the Time. I work the whole day, mostly 15 Hours. After that i like to relax a bit. In the Wintertime, up on November - till January, i will find the time to try it ;) But till then i need help. Sorry.
jonlar
 

Re: Script that auto op's authed users on Quakenet

Postby Lukemob » Tue Jun 03, 2008 2:23 pm

No problem, we're making the scripts for all the users, not only for you. So, it's up to you, if you use it, or not... ;-)
Lukemob
 

Re: Script that auto op's authed users on Quakenet

Postby Cristian » Wed Jun 04, 2008 10:10 pm

I'm will gladly help, when I got the time to do it, cause my job and hobby's is time consuming as well.
So real time help is not always possible, but thats why a forum has been created. ;)
Cristian
proof of advance
proof of advance
 
Posts: 282
Joined: Sun Nov 04, 2007 3:02 pm
Location: Denmark
Authnick: Sumsar

Re: Script that auto op's authed users on Quakenet

Postby jonlar » Thu Jun 05, 2008 4:20 pm

Well, dont know if its an error. But some ppl in my chan dodnt get voice. It happends just a few times and i really dont know why.
jonlar
 

Re: Script that auto op's authed users on Quakenet

Postby Lukemob » Sat Jun 07, 2008 7:38 pm

Are you sure there is not another script loaded that could find with this one?
Lukemob
 

Re: Script that auto op's authed users on Quakenet

Postby jonlar » Sun Jun 08, 2008 12:05 pm

Hmm, will check it
jonlar
 

Re: Script that auto op's authed users on Quakenet

Postby Lukemob » Sun Jun 08, 2008 12:54 pm

If that will be alright, then use the one what works on your eggy. Easy & fast solution ;-)
Lukemob
 


Return to TCL Scripting Release

Who is online

Users browsing this forum: No registered users and 1 guest

cron