CopyVoice.info.dawg0100644000076400010010000000112407505260513015050 0ustar AdministratorNoneInformation: This script voices everyone voiced in one channel on another channel. Changes log for CopyVoice.tcl: Version 1.3 * Released to the public from the |DAWG| scripting team web site. * You now must have +o in the remote channel to copy voices. * Code cleanups. Version 1.2 * Released to the public from the |DAWG| scripting team web site. * pushmode is now used to help prevent flooding. * Code cleanups. * Added bold prefixes in DCC chat. Version 1.1 * Released to the public from the |DAWG| scripting team web site. * Fixed a close-bracket error. CopyVoice1.3.tcl0100644000076400010010000001051707505252620014206 0ustar AdministratorNone################################## ### CopyVoice.tcl ### ### Version 1.3 ### ### By Wcc ### ### wcc@techmonkeys.org ### ### http://www.dawgtcl.com:81/ ### ### EFnet #|DAWG|Tcl ### ################################## ############################################################################ ### Copyright © 2000 - 2002 |DAWG| Scripting Group. All rights reserved. ### ############################################################################ ########################################################################### ## This script voices everyone voiced in one channel on another channel. ## ########################################################################### ############## ## COMMANDS ## ######################################################################### ## PUB ## !copyvoice ## ######### Copys the voiced users from the first channel to the second. ## ######################################################################### ## DCC ## .copyvoice ## ######### Copys the voiced users from the first channel to the second. ## ######################################################################### ########################################################## ## Just load the script, edit the settings, and rehash. ## ########################################################## ################################### # Enable use of bold in DCC chat? # ################################### set copyvoice_setting(bold) 1 ############################################# # Prefix "COPYVOICE:" in DCC chat messages? # ############################################# set copyvoice_setting(COPYVOICE:) 1 #################### # Code begins here # #################### if {![string match 1.6.* $version]} { putlog "\002COPYVOICE:\002 \002WARNING:\002 This script is intended to run on eggdrop 1.6.x or later." } if {[info tclversion] < 8.2} { putlog "\002COPYVOICE:\002 \002WARNING:\002 This script is intended to run on Tcl Version 8.2 or later." } bind pub - !copyvoice copyvoice_pub bind dcc - copyvoice copyvoice_dcc proc copyvoice_dopre {} { if {!$::copyvoice_setting(COPYVOICE:)} { return "" } if {!$::copyvoice_setting(bold)} { return "COPYVOICE: " } return "\002COPYVOICE:\002 " } proc copyvoice_pub {nick uhost hand chan text} { set text [split $text] if {[lindex $text 1] == ""} { putserv "NOTICE $nick :Usage: !copyvoice " ; return } if {![validchan [lindex $text 0]] || ![botonchan [lindex $text 0]]} { putserv "NOTICE $nick :[join [lrange $text 0 0]] is not a valid channel." ; return } if {![validchan [lindex $text 1]] || ![botonchan [lindex $text 1]]} { putserv "NOTICE $nick :[join [lrange $text 1 1]] is not a valid channel." ; return } if {![matchattr $hand o|o [lindex $text 1]]} { putserv "NOTICE $nick :You do not have op access to [join [lrange $text 1 1]]." ; return } if {![botisop [lindex $text 1]]} { putserv "NOTICE $nick :I do not have ops on [join [lrange $text 1 1]]." ; return } set v 0 foreach u [chanlist [lindex $text 0]] { if {![isvoice $u [lindex $text 0]] || [isvoice $u [lindex $text 1]]} { continue } pushmode [lindex $text 1] +v $u incr v } putserv "NOTICE $nick :$v voices copied." } proc copyvoice_dcc {hand idx text} { set text [split $text] if {[lindex [split $text] 1] == ""} { putdcc $idx "[copyvoice_dopre]Usage: !copyvoice " ; return } if {![validchan [lindex $text 0]] || ![botonchan [lindex $text 0]]} { putdcc $idx "[copyvoice_dopre][join [lrange $text 0 0]] is not a valid channel." ; return } if {![validchan [lindex $text 1]] || ![botonchan [lindex $text 1]]} { putdcc $idx "[copyvoice_dopre][join [lrange $text 1 1]] is not a valid channel." ; return } if {![matchattr $hand o|o [lindex $text 1]]} { putdcc $idx "[copyvoice_dopre]You do not have op access to [join [lrange $text 1 1]]." ; return } if {![botisop [lindex $text 1]]} { putdcc $idx "[copyvoice_dopre]I do not have ops on [join [lrange $text 1 1]]." ; return } set v 0 foreach u [chanlist [lindex $text 0]] { if {![isvoice $u [lindex $text 0]] || [isvoice $u [lindex $text 1]]} { continue } pushmode [lindex $text 1] +v $u incr v } putdcc $idx "[copyvoice_dopre]$v voices copied." } putlog "\002COPYVOICE:\002 CopyVoice.tcl Version 1.3 by Wcc is loaded."