Autoop script for mode +x users

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!

Autoop script for mode +x users

Postby Lukemob » Sat May 24, 2008 11:34 am

Author: Lukemob
What it does: Script give an op to users who join and are authed and have set mode +x.
Usage: !aop on/off/status

Code: Select all
setudef flag authop

bind pub n "!aop" pub:aop
bind join - * join:aop

proc pub:aop {nick host hand chan arg} {
   if {[lindex $arg 0] == ""} {
      putserv "notice $nick :Usage: !aop on|off|status"
   } else {
      if {[lindex $arg 0] == "status"} {
         if {[channel get $chan authop] == "1"} {
          putserv "notice $nick :Auto op status is enabled."
       } else {
          putserv "notice $nick :Auto op status is disabled."
       }
      } elseif {[lindex $arg 0] == "on"} {
         if {[channel get $chan authop] != "1"} {
            channel set $chan +authop
            putserv "notice $nick :Auto op status has been enabled."
         } else {
            putserv "notice $nick :Autop op status is already enabled."
         }
      } elseif {[lindex $arg 0] == "off"} {
         if {[channel get $chan authop] != "0"} {
            channel set $chan -authop
            putserv "notice $nick :Autop op status has been disabled."
         } else {
            putserv "notice $nick :Auto op status is already disabled."
         }
      }
   }
}
proc join:aop {nick host hand chan} {
   if {[string match *.users.quakenet.org* $host]} {
      if {[channel get $chan authop] == "1"} {
         putserv "mode $chan +o $nick"
      }
   }
}


Hope this helps.
tHx.!
Last edited by Lukemob on Sun May 25, 2008 5:28 pm, edited 2 times in total.
Lukemob
 

Re: Autoop script for authed users (another version)

Postby jonlar » Sat May 24, 2008 2:20 pm

bad type, should be one of: act, away, bcst, bot, chat, chjn, chof, chon, chpt, ctcp, ctcr, dcc, disc, evnt, filt, flud, join, kick, link, load, lost, mode, msg, msgm, need, nick, nkch, notc, note, part, pub, pubm, raw, rcvd, rejn, sent, sign, splt, time, topc, tout, unld, wall
while executing
"bind join:aop {nick host hand chan} {
if {[string match *.users.quakenet.org* $host]} {
if {[channel get $chan aop] == "1"} {
putser..."
jonlar
 

Re: Autoop script for authed users (another version)

Postby Lukemob » Sat May 24, 2008 6:03 pm

Oh I'm sorry, its fixed now. Just was bind, had to be proc. Try it again, should work.

Thanks
Lukemob
 

Re: Autoop script for authed users (another version)

Postby jonlar » Mon May 26, 2008 11:18 am

Well. maybe u should test your Scripts yourself. Its still quit buggy

!aop on
Autop op status is already enabled.


It just tells that aop is on but its not ;)
jonlar
 

Re: Autoop script for mode +x users

Postby Lukemob » Tue May 27, 2008 4:20 pm

Anyway, I've tried it and fixed all the bugs. It's 100% working now.

Have fun
Lukemob
 


Return to TCL Scripting Release

Who is online

Users browsing this forum: No registered users and 0 guests

cron