Home | Networks | Community | Need Help? 

 
 Quick search

 
 
 RegisterRegister   Log inLog in 

Looking for a voicing tcl script

 
Post new topic   Reply to topic    SearchIRC Forum Index -> IRC Help
Author Message
4x4man
none
none


Joined: 06 May 2004
Posts: 1

PostPosted: May 07, 2004 9:22pm    Post subject: Looking for a voicing tcl script Reply with quote

Im Looking For A Good Voicing TCL script If You Happen Can Help Plz Contect Me ASAP You Can Email Me @ chevy_4x4man@yahoo.com .....thanks
Back to top
uchat
Idler
Idler


Joined: 17 Mar 2004
Posts: 335

PostPosted: May 08, 2004 5:40am    Post subject: Reply with quote

If this TCL script is for an eggdrop then eggdrop already has this function built in. Give your voice users the v flag. If it's for a client you should state which one.
Back to top
Brent[Notloggedin]
Guest





PostPosted: May 21, 2004 2:15am    Post subject: TCL Reply with quote

Code:

####################################################################################
## AutoVoice v1.04 || Created by: dbz-gt  || Editors: N/A  || Made on 14-08-2002   #
####################################################################################
## Edited on 26-08-2002 ||
#######################################################################################
## AGAIN A SCRIPT OF DBZ-GT :D //\\ Do you need more, come on irc.Quakenet.org       ##
## and join #dbz-gt and ask me (dbz-gt, duh) for the other scripts that I have made. ##
#######################################################################################
##
## Copyright stuff:
## -----------------
## You may change the script like you want it, but please don't delete the copyright.
## I want to become 'important' ;). Anyway, you may edit the script like you wish and
## if you have some cool tips or stuff edit, you can always message me about them.
## E-mail: dbz_gt01@hotmail.com
## IRC: irc.Quakenet.org  // Channel: #dbz-gt // Nick: dbz-gt
##
## Instructions:
## -------------
## To read the instructions, you have to read Readme.txt
##
##
## !That's all!
#######################################################################################

##########
### BEGIN CONFIG
### EDIT THE NEXT LINES
### IF YOU DON'T EDIT THEM, MAYBE THE SCRIPT WILL NOT WORK
##########

### You can choose what the name of the file must be
### when you gonna use this script
set av_file "av.db"

### If you don't want that some channels use this system
### you can put them in the IGNORED variable :D
set ign_chans ""

### You can set here the default option that you want when
### the bot joins the channel.
### 0 = AutoVoice OFF
### 1 = AutoVoice ON
set default_av "1"

### Users that are in the ignore list will not get +v
### when they join the channel. It's better to set it on 1
### 0 = Ignore listed users will get +v
### 1 = Ignore listed users will NOT get +v
set users_ign "0"

##########
### END CONFIG
### DON'T EDIT THE LINES HERE BELOW, IF YOU DON'T KNOW WHAT
### YOU ARE DOING!
##########

### Binds
bind pub m|m .autovoice pub:autovoice
bind pub m|m .av pub:autovoice
bind join - * join:av_check
bind time - "* * * * *" file:save

### When you use .autovoice on/off this command will help you
### with it. It checks if it isn't a ignored channel and if the auto-voice
### isn't already on/off
proc pub:autovoice {n u h c a} {
global av_all botnick ign_chans
set c [string tolower $c]; set s [string tolower [lindex $a 0]]; set ign_chans [string tolower $ign_chans]
 if {[lsearch $ign_chans $c] < "0"} {
  if {$s == "on" || $s == "off"} {
    if {[info exist av_all($c)]} {
       if {$av_all($c) == "on" && $s == "on"} {
          putserv "NOTICE $n :AutoVoice status \037already\037 on \002\"ON\"\002"
       } elseif {$av_all($c) == "off" && $s == "off"} {
          putserv "NOTICE $n :AutoVoice status \037already\037 on \002\"OFF\"\002"
       } else {
          set av_all($c) "$s"; set stmp [string toupper $s]
          putserv "NOTICE $n :AutoVoice status is now \002\"$stmp\"\002"
          if {![isop $botnick $c] && $s == "on"} { putserv "NOTICE $n :Oke done, put first I need \002+OP\002 for that"  }
       }
    } else { set av_all($c) "$s"; set stmp [string toupper $s]
       putserv "NOTICE $n :AutoVoice status is now \002\"$stmp\"\002"
       if {![isop $botnick $c] && $s == "on"} { putserv "NOTICE $n :Oke done, put first I need \002+OP\002 for that"  }
    }
  } else { putserv "NOTICE $n :Syntax: \037.autovoice on/off\037" }
 } else { putserv "NOTICE $n :This channel is ignored for using the auto-voice system. Please take contact with the owner of the bot." }
}

###  In this proc this script will check if the channel is allowed to use auto-voice
### and if it's allowed is the auto-voice on ON?
proc join:av_check {n u h c} {
global av_all botnick default_av ign_chans users_ign
set c [string tolower $c]; set ign_chans [string tolower $ign_chans]
   if {$botnick == $n} { if {$default_av == "1"} { set av_all($c) "on"; } }
   if ([isop $botnick $c]) {
      if {[info exist av_all($c)] && [lsearch $ign_chans $c] < "0" } {
      set host [maskhost *[getchanhost $n $c]]
          if {![isignore $host]} { if {$av_all($c) == "on"} { pushmode $c +v $n }
     } else { if {$users_ign == "0"} { if {$av_all($c) == "on"} { pushmode $c +v $n} } }
      }
   }
}

### Every minute this script saves his data in the file that you have put in $av_file
### Ofcourse it check if the file already exist and if it have already some other channels
### in it so they will not be removed
proc file:save {mi ho da mo ye} {
global av_file av_all
  if {[file exist $av_file]} {
    set fs [open $av_file r]
    while {![eof $fs]} {
      gets $fs line; set line "[join $line]"
      if {[llength $line] == 2} {
        set db_c [lindex $line 0]
             if {![info exist av_all($db_c)]} { set av_all($db_c) "[lrange $line 1 1]" }
      }
    }
    close $fs; set fs [open $av_file w+]; foreach db_c [array names av_all] { if {$av_all($db_c) != ""} { puts $fs "$db_c $av_all($db_c)" } }; close $fs
  } else { set fs [open $av_file w+]; foreach db_c [array names av_all] { if {$av_all($db_c) != ""} { puts $fs "$db_c $av_all($db_c)" } }; close $fs; putlog "Created new file for auto-voice system. The file \002$av_file\002 is created" }
  putcmdlog "Updated system. There are \002[llength [array names av_all]]\002 channels saved in the file \002$av_file\002."
}


### When this script will be started, this proc will work the first, it's read the file $av_file
### and checks the old data to set it in the arrays IF the file exists
proc file:read {} {
global av_file av_all
  if {[file exist $av_file]} {
    set fs [open $av_file r]
    while {![eof $fs]} {
      gets $fs line; set line "[join $line]"
      if {[llength $line] == 2} {
        set db_c [lindex $line 0]
             if {![info exist av_all($db_c)]} { set av_all($db_c) "[lrange $line 1 1]" }
      }
    }
    close $fs
  }
}

file:read
putlog "AutoVoice System is \002LOADED\002. (c) Version 1.04 created by \037dbz-gt\037"

Moderator's Note: Use code tags next time ;)
Back to top
Display posts from previous:   
Post new topic   Reply to topic    SearchIRC Forum Index -> IRC Help All times are GMT - 6 Hours
Page 1 of 1

 
 
Forum powered by phpBB
 
 © 2000 - 2008 EverythingIRC, Inc. All rights reserved. Please read our disclaimer