<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/16560" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2009-01-23T17:54:28-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/16560</id>

		<entry>
		<author><name><![CDATA[calippo]]></name></author>
		<updated>2009-01-23T17:54:28-04:00</updated>

		<published>2009-01-23T17:54:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87091#p87091</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87091#p87091"/>
		<title type="html"><![CDATA[Help me please irco.voicecontrol.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87091#p87091"><![CDATA[
<blockquote class="uncited"><div>As I already explained, !voice &lt;target&gt; is a toggle command<br><br>If &lt;target&gt; is already voiced, then the command will devoice &lt;target&gt;<br>If &lt;target&gt; is not already voiced, then the command will voice &lt;target&gt;<br><br>Toggle in this context means something that is figuratively switched on/off. Hence, it is not a fault. It is intentional.</div></blockquote>tnx for your help  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10435">calippo</a> — Fri Jan 23, 2009 5:54 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arfer]]></name></author>
		<updated>2009-01-22T09:25:59-04:00</updated>

		<published>2009-01-22T09:25:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87067#p87067</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87067#p87067"/>
		<title type="html"><![CDATA[Help me please irco.voicecontrol.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87067#p87067"><![CDATA[
As I already explained, !voice &lt;target&gt; is a toggle command<br><br>If &lt;target&gt; is already voiced, then the command will devoice &lt;target&gt;<br>If &lt;target&gt; is not already voiced, then the command will voice &lt;target&gt;<br><br>Toggle in this context means something that is figuratively switched on/off. Hence, it is not a fault. It is intentional.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5705">arfer</a> — Thu Jan 22, 2009 9:25 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[calippo]]></name></author>
		<updated>2009-01-21T16:28:07-04:00</updated>

		<published>2009-01-21T16:28:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87058#p87058</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87058#p87058"/>
		<title type="html"><![CDATA[Help me please irco.voicecontrol.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87058#p87058"><![CDATA[
<blockquote class="uncited"><div>There wasn't any voice/devoice command in your original post and neither was it clear from the coding style if you wished to permit kick/ban without a reason.<br><br>Nonetheless, here is a revised script which will do what you ask. The !voice &lt;target&gt; command is a toggle. If the taget is already voiced they will be devoiced, conversely if they are not already voiced they will be voiced.<br><br>I'm beginning to think this is never ending.<br><div class="codebox"><p>Code: </p><pre><code># set here the space delimited string of channel(s) that the script is active inset vVoiceChans "#eggTCL"# set here the notice to send to users that are voiced in the above preconfigured channel(s)set vVoiceMessage "welcome to voice control script - you can use !ban, !kick, !unban, !topic, !mode, !voice"bind mode - *+v* pVoiceNoticebind pub - !kick pVoiceKickbind pub - !ban pVoiceBanbind pub - !unban pVoiceUnbanbind pub - !mode pVoiceModebind pub - !topic pVoiceTopicbind pub - !voice pVoiceVoiceset vVoiceVersion v2.0proc pVoiceNotice {nick uhost hand chan mc target} {    global vVoiceChans vVoiceMessage    if {[lsearch -exact [split [string tolower $vVoiceChans]] [string tolower $chan]] != -1} {        putserv "NOTICE $target :$vVoiceMessage"    }    return 0}proc pVoiceKick {nick uhost hand chan text} {    global vVoiceChans    if {[lsearch -exact [split [string tolower $vVoiceChans]] [string tolower $chan]] != -1} {        set txt [split [string trim $text]]        switch -- [llength $txt] {            0 {                putserv "NOTICE $nick :-error- correct syntax is !kick &lt;nick&gt; ?reason?"                return 0            }            1 {set target [lindex $txt 0]}            default {                set target [lindex $txt 0]                set reason [join [lrange $txt 1 end]]            }        }        if {([isvoice $nick $chan]) || ([isop $nick $chan])} {            if {[onchan $target $chan]} {                if {![validuser [nick2hand $target $chan]]} {                    if {[botisop $chan]} {                        if {[info exists reason]} {                            putserv "KICK $chan $target :$reason *- requested by $nick -*)"                        } else {putserv "KICK $chan $target :*- requested by $nick -*"}                    } else {putserv "NOTICE $nick :-error- I need to be op'd in $chan to do that"}                } else {putserv "NOTICE $nick :-error- $target has a valid bot user record for $chan"}            } else {putserv "NOTICE $nick :-error- $target is not on $chan"}        } else {putserv "NOTICE $nick :-error- you need to be at least a channel voice in $chan to kick users via this script"}    }    return 0}proc pVoiceBan {nick uhost hand chan text} {    global vVoiceChans    if {[lsearch -exact [split [string tolower $vVoiceChans]] [string tolower $chan]] != -1} {        set txt [split [string trim $text]]        switch -- [llength $txt] {            0 {                putserv "NOTICE $nick :-error- correct syntax is !ban &lt;nick&gt; ?reason?"                return 0            }            1 {                set target [lindex $txt 0]            }            default {                set target [lindex $txt 0]                set reason [join [lrange $txt 1 end]]            }        }        if {([isvoice $nick $chan]) || ([isop $nick $chan])} {            if {[onchan $target $chan]} {                if {![validuser [nick2hand $target $chan]]} {                    if {[botisop $chan]} {                        scan [getchanhost $target $chan] {%[^@]@%s} user host                        putserv "MODE $chan -o+b $target $host"                        if {[info exists reason]} {                            putserv "KICK $chan $target :$reason *- requested by $nick -*"                        } else {putserv "KICK $chan $target :*- requested by $nick -*"}                    } else {putserv "NOTICE $nick :-error- I need to be op'd in $chan to do that"}                } else {putserv "NOTICE $nick :-error- $target has a valid bot user record for $chan"}            } else {putserv "NOTICE $nick :-error- $target is not on $chan"}        } else {putserv "NOTICE $nick :-error- you need to be at least a channel voice in $chan to ban users via this script"}    }    return 0}proc pVoiceUnban {nick uhost handle chan text} {    global vVoiceChans    if {[lsearch -exact [split [string tolower $vVoiceChans]] [string tolower $chan]] != -1} {        set txt [split [string trim $text]]        if {[llength $txt] == 1} {            set host [lindex $txt 0]            if {([isvoice $nick $chan]) || ([isop $nick $chan])} {                if {[botisop $chan]} {                    putserv "MODE $chan -b $host"                } else {putserv "NOTICE $nick :-error- I need to be op'd in $chan to do that"}            } else {putserv "NOTICE $nick :-error- you need to be at least a channel voice in $chan to unban hosts via this script"}        } else {putserv "NOTICE $nick :-error- correct syntax is !unban &lt;host&gt;"}    }    return 0}proc pVoiceMode {nick uhost handle chan text} {    global vVoiceChans    if {[lsearch -exact [split [string tolower $vVoiceChans]] [string tolower $chan]] != -1} {        set txt [split [string trim $text]]        if {[llength $txt] == 1} {            set mode [lindex $txt 0]            if {([isvoice $nick $chan]) || ([isop $nick $chan])} {                if {[botisop $chan]} {                    switch -- [string tolower $mode] {                        on {putserv "MODE $chan +mi"}                        off {putserv "MODE $chan -mi"}                        default {putserv "NOTICE $nick :-error- single text argument can only be on or off"}                    }                } else {putserv "NOTICE $nick :-error- I need to be op'd in $chan to do that"}            } else {putserv "NOTICE $nick :-error- you need to be at least a channel voice in $chan to set modes via this script"}        } else {putserv "NOTICE $nick :-error- correct syntax is !mode &lt;on||off&gt;"}    }    return 0}proc pVoiceTopic {nick uhost handle chan text} {    global vVoiceChans    if {[lsearch -exact [split [string tolower $vVoiceChans]] [string tolower $chan]] != -1} {        set txt [split [string trim $text]]        if {[llength $txt] &gt;= 1} {            set topic [join [lrange $txt 0 end]]            if {([isvoice $nick $chan]) || ([isop $nick $chan])} {                if {[botisop $chan]} {                    putserv "TOPIC $chan :$topic *- requested by $nick -*"                } else {putserv "NOTICE $nick :-error- I need to be op'd in $chan to do that"}            } else {putserv "NOTICE $nick :-error- you need to be at least a channel voice in $chan to set a topic via this script"}        } else {putserv "NOTICE $nick :-error- correct syntax is !topic &lt;topic&gt;"}    }    return 0}proc pVoiceVoice {nick uhost handle chan text} {    global vVoiceChans    if {[lsearch -exact [split [string tolower $vVoiceChans]] [string tolower $chan]] != -1} {        set txt [split [string trim $text]]        if {[llength $txt] == 1} {            set target [lindex $txt 0]            if {([isvoice $nick $chan]) || ([isop $nick $chan])} {                if {[onchan $target $chan]} {                    if {[botisop $chan]} {                        switch -- [isvoice $target $chan] {                            0 {putserv "MODE $chan +v $target"}                            1 {putserv "MODE $chan -v $target"}                        }                    } else {putserv "NOTICE $nick :-error- I need to be op'd in $chan to do that"}                } else {putserv "NOTICE $nick :-error- $target is not on $chan"}            } else {putserv "NOTICE $nick :-error- you need to be at least a channel voice in $chan to voice/devoice users via this script"}        } else {putserv "NOTICE $nick :-error- correct syntax is !voice &lt;nick&gt;"}    }    return 0}# eof</code></pre></div>[/code]</div></blockquote>thanks for having solved my problem, I thank you so much. I found an error with the !voice when repeating the same command on the nick voice running the opposite then I set out as follows:<br>[/code]<br><br># set here the space delimited string of channel(s) that the script is active in<br>set vVoiceChans "#chan"<br><br><br>bind pub - !voice pVoiceVoice<br>bind pub - !devoice pdeVoiceVoice <br>bind pub - !kick pVoiceKick<br>bind pub - !ban pVoiceBan<br><br>set vVoiceVersion v2.0<br><br>proc pVoiceKick {nick uhost hand chan text} {<br>    global vVoiceChans<br>    if {[lsearch -exact [split [string tolower $vVoiceChans]] [string tolower $chan]] != -1} {<br>        set txt [split [string trim $text]]<br>        switch -- [llength $txt] {<br>            0 {<br>                putserv "NOTICE $nick :-error- correct syntax is !kick &lt;nick&gt; ?reason?"<br>                return 0<br>            }<br>            1 {set target [lindex $txt 0]}<br>            default {<br>                set target [lindex $txt 0]<br>                set reason [join [lrange $txt 1 end]]<br>            }<br>        }<br>        if {([isvoice $nick $chan]) || ([isop $nick $chan])} {<br>            if {[onchan $target $chan]} {<br>                if {![validuser [nick2hand $target $chan]]} {<br>                    if {[botisop $chan]} {<br>                        if {[info exists reason]} {<br>                            putserv "KICK $chan $target :$reason *- requested by $nick -*)"<br>                        } else {putserv "KICK $chan $target :*- requested by $nick -*"}<br>                    } else {putserv "NOTICE $nick :-error- I need to be op'd in $chan to do that"}<br>                } else {putserv "NOTICE $nick :-error- $target has a valid bot user record for $chan"}<br>            } else {putserv "NOTICE $nick :-error- $target is not on $chan"}<br>        } else {putserv "NOTICE $nick :-error- you need to be at least a channel voice in $chan to kick users via this script"}<br>    }<br>    return 0<br>}<br><br>proc pVoiceBan {nick uhost hand chan text} {<br>    global vVoiceChans<br>    if {[lsearch -exact [split [string tolower $vVoiceChans]] [string tolower $chan]] != -1} {<br>        set txt [split [string trim $text]]<br>        switch -- [llength $txt] {<br>            0 {<br>                putserv "NOTICE $nick :-error- correct syntax is !ban &lt;nick&gt; ?reason?"<br>                return 0<br>            }<br>            1 {<br>                set target [lindex $txt 0]<br>            }<br>            default {<br>                set target [lindex $txt 0]<br>                set reason [join [lrange $txt 1 end]]<br>            }<br>        }<br>        if {([isvoice $nick $chan]) || ([isop $nick $chan])} {<br>            if {[onchan $target $chan]} {<br>                if {![validuser [nick2hand $target $chan]]} {<br>                    if {[botisop $chan]} {<br>                        scan [getchanhost $target $chan] {%[^@]@%s} user host<br>                        putserv "MODE $chan -o+b $target $host"<br>                        if {[info exists reason]} {<br>                            putserv "KICK $chan $target :$reason *- requested by $nick -*"<br>                        } else {putserv "KICK $chan $target :*- requested by $nick -*"}<br>                    } else {putserv "NOTICE $nick :-error- I need to be op'd in $chan to do that"}<br>                } else {putserv "NOTICE $nick :-error- $target has a valid bot user record for $chan"}<br>            } else {putserv "NOTICE $nick :-error- $target is not on $chan"}<br>        } else {putserv "NOTICE $nick :-error- you need to be at least a channel voice in $chan to ban users via this script"}<br>    }<br>    return 0<br>}<br><br>proc pVoiceVoice {nick uhost handle chan text} {<br>    global vVoiceChans<br>    if {[lsearch -exact [split [string tolower $vVoiceChans]] [string tolower $chan]] != -1} {<br>        set txt [split [string trim $text]]<br>        if {[llength $txt] == 1} {<br>            set target [lindex $txt 0]<br>            if {([isvoice $nick $chan]) || ([isop $nick $chan])} {<br>                if {[onchan $target $chan]} {<br>                    if {[botisop $chan]} {<br>                        switch -- [isvoice $target $chan] {<br>                            0 {putserv "MODE $chan +v $target"}<br>                        }<br>                    } else {putserv "NOTICE $nick :-error- I need to be op'd in $chan to do that"}<br>                } else {putserv "NOTICE $nick :-error- $target is not on $chan"}<br>            } else {putserv "NOTICE $nick :-error- you need to be at least a channel voice in $chan to voice/devoice users via this script"}<br>        } else {putserv "NOTICE $nick :-error- correct syntax is !voice &lt;nick&gt;"}<br>    }<br>    return 0<br>}<br><br>proc pdeVoiceVoice {nick uhost handle chan text} {<br>    global vVoiceChans<br>    if {[lsearch -exact [split [string tolower $vVoiceChans]] [string tolower $chan]] != -1} {<br>        set txt [split [string trim $text]]<br>        if {[llength $txt] == 1} {<br>            set target [lindex $txt 0]<br>            if {([isvoice $nick $chan]) || ([isop $nick $chan])} {<br>                if {[onchan $target $chan]} {<br>                    if {[botisop $chan]} {<br>                        switch -- [isvoice $target $chan] {<br>                            1 {putserv "MODE $chan -v $target"}<br>                        }<br>                    } else {putserv "NOTICE $nick :-error- I need to be op'd in $chan to do that"}<br>                } else {putserv "NOTICE $nick :-error- $target is not on $chan"}<br>            } else {putserv "NOTICE $nick :-error- you need to be at least a channel voice in $chan to voice/devoice users via this script"}<br>        } else {putserv "NOTICE $nick :-error- correct syntax is !devoice &lt;nick&gt;"}<br>    }<br>    return 0<br>}<br><br># eof<br><br>I also happen the same conquest Autovoice list script like 'does not add the nick with characters such as [Nick] or {nick} the script is this:<br><div class="codebox"><p>Code: </p><pre><code># # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ## #                                                                         # ##                 avl (autovoicelist) - Script v1.0 by stylus740              # # #                                                                         # ## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ################################################################################# History:                                                                    ## 1.0Erstes Release                                                    ################################################################################### verwaltet eine Liste von Nicks, die im Channel autovoice erhalten### In welchen Channels soll das Script aktiv sein? # Die Definition erfolgt durch Setzen von +avl in der Partyline im Bot## .chanset #channel +avl# Definition des Datenfiles für berechtigte Userset avl_ni(datafile) "scripts/avl.dat"################################################################################ Mögliche Befehle in der Partyline:#### .chanset #chan +avlAktivierung des scripts in Channel #chan## .chanset #chan -avlDeaktivierung des scripts in Channel #chan## .avlhelpHilfen zur Bedienung## .addvoice nickUser zur Liste hinzufügen## .delvoice nickUser von Liste löschen## .listvoiceEinträge anzeigen################################################################################### Ab hier nur editieren, wenn man genau weiß, was man tut. Beginn des Codes ###setudef flag avl;# Zur Aktivierung der userdefined flagsset avl_ni(version) v1.0;# Variable für Version setztenbind dcc n|n addvoice add_users;# User hinzufügenbind dcc n|n delvoice del_users;# User hinzufügenbind dcc n|n listvoice list_users;# User anzeigenbind dcc n|n avlhelp help_users;# Hilfe anzeigenbind msg n|n addvoice m_add_users;# User hinzufügenbind msg n|n delvoice m_del_users;# User hinzufügenbind msg n|n listvoice m_list_users;# User anzeigenbind msg n|n avlhelp m_help_users;# Hilfe anzeigenbind join - * join:avl_checkbind nick - * nick:avl_checkproc help_users {handle idx args} {putlog "avl ermöglicht es Usern, die von einer berechtigten Person in einer Liste gespeichert sind"putlog "auto-voice durch den Bot erteilen zu lassen. (Nützlich in Support Channels, wo oft User nicht"putlog "registriert sind."putlog "Die Steuerung von avl erfolgt über die Partyline mit den folgenden Befehlen:"putlog " "putlog ".addvoice &lt;nick&gt; &lt;chan&gt;        Nick mit Channel hinzufügen oder ändern"putlog ".delvoice &lt;nick&gt; &lt;chan&gt;        Den angegebenen Nick löschen"putlog ".listvoice         Sämtliche berechtigten User-Einträge anzeigen"putlog ".avlhelp                     Diese Hilfemeldung anzeigen"}proc m_help_users {nick host hand args} {puthelp "PRIVMSG $nick :avl ermöglicht es Usern, die von einer berechtigten Person in einer Liste gespeichert sind"puthelp "PRIVMSG $nick :auto-voice durch den Bot erteilen zu lassen. (Nützlich in Support Channels, wo oft User nicht"puthelp "PRIVMSG $nick :registriert sind."puthelp "PRIVMSG $nick :Die Steuerung von avl erfolgt über ein Query mit dem Bot mit den folgenden Befehlen:"puthelp "PRIVMSG $nick : "puthelp "PRIVMSG $nick :/msg &lt;bot&gt; addvoice &lt;nick&gt; &lt;chan&gt;        Nick mit Channel hinzufügen oder ändern"puthelp "PRIVMSG $nick :/msg &lt;bot&gt; delvoice &lt;nick&gt; &lt;chan&gt;        Den angegebenen Nick löschen"puthelp "PRIVMSG $nick :/msg &lt;bot&gt; listvoice           Sämtliche berechtigten User-Einträge anzeigen"puthelp "PRIVMSG $nick :/msg &lt;bot&gt; avlhelp                 Diese Hilfemeldung anzeigen"}proc init_users {} {global avl_nick avl_ni   ;# Datenstrukturen public definierenif {[file exists $avl_ni(datafile)]} {   ;# Falls File vorhanden  putlog "Laden Userdaten aus $avl_ni(datafile)"   ;# Lademeldung  set in [open $avl_ni(datafile) r]   ;# Datenfile im read modus öffnen  while {![eof $in]} {   ;# solange kein EOF    set vline [gets $in]                           ;# Zeile holen    if {[eof $in]} {break}     ;# Falls EOF, Ende von while    set inick [lindex $vline 0]   ;# Nick extrahieren    set ichan [lrange $vline 1 end]   ;# Channel extrahieren    set ientry "$inick&amp;$ichan"   ;# Kombination Nick&amp;Chan bauen    set avl_nick($ientry) $ientry                  ;# Array Datenfeld belegen    }   ;# End while  close $in   ;# Datei schließen  }   ;# End If (dataexist)}   ;# End Procedureinit_usersproc list_users {handle idx args} {global avl_nick avl_ni   ;# Datenstrukturen public definierenif {[info exists avl_nick]} {   ;# Falls Felder definiert sind  putlog "Eingetragene Nick für avl:"   ;# Überschrift anzeigen  foreach search [array names avl_nick] {          ;# Für jeden Eintrag   if {$search != 0} {   ;# wenn kein leerer Eintrag     set acmd [split $search "&amp;"]   ;# Eintrag bei "&amp;" aufsplitten     set inick [lindex $acmd 0]   ;# erstes Argument ist Nick     set inick [form $inick]   ;# Nick formatieren     set ichan [lrange $acmd 1 end]   ;# Der gesamte Rest ist der Channel     set ichan [form $ichan]   ;# Chan formatieren     putlog "$inick       $ichan"      ;# Zeile anzeigen     }   ;# End if (search)    }   ;# End foreach  } else {   ;# Falls keine Struktur vorhanden    putlog "Keine Daten gespeichert"   ;# Fehler anzeigen  }   ;# End if}   ;# End Procedureproc add_users {handle idx args} { global avl_nick avl_ni   ;# Datenstrukturen public definieren set acmd [lindex $args 0]   ;# Befehlszeile extrahieren set inick [lindex $acmd 0]   ;# erstes Argument ist Nick set inick [form $inick]   ;# Nick formatieren set ichan [lrange $acmd 1 end]   ;# Der gesamte Rest ist der Channel set ichan [form $ichan]   ;# Chan formatieren set ientry "$inick&amp;$ichan"   ;# Kombination Nick&amp;Chan bauen set avl_nick($ientry) $ientry                     ;# Array Datenfeld (neu) belegen writefile   ;# Datei schreiben putlog "User $inick mit Chan $ichan in $avl_ni(datafile) hinzugefügt" if {[onchan $inick $ichan]} {   pushmode $ichan +v $inick ;# direkt +v setzen }}   ;# End Procedureproc del_users {handle idx args} { global avl_nick avl_ni   ;# Datenstrukturen public definieren set acmd [lindex $args 0]   ;# Befehlszeile extrahieren set inick [lindex $acmd 0]  ;# erstes Argument ist Nick set inick [form $inick]  ;# Nick formatieren set ichan [lrange $acmd 1 end]  ;# Der gesamte Rest ist der Channel set ichan [form $ichan]   ;# Chan formatieren set ientry "$inick&amp;$ichan"   ;# Eintrag nick&amp;chan montieren if {([info exists avl_nick($ientry)])} {          ;# wenn der Eintrag existiert    unset avl_nick($ientry) ;# Array Datenfeld freigeben   writefile   putlog "Eintrag $ientry aus $avl_ni(datafile) gelöscht"  ;# Löschmeldung   } else { ;# Falls Nick nicht vorhanden   putlog "Eintrag $ientry ist nicht gespeichert!";# Infomeldung   };# End if (info) if {[onchan $inick $ichan]} {   pushmode $ichan -v $inick ;# direkt -v setzen }};# End Procedureproc m_list_users {nick host hand args} {global avl_nick avl_ni   ;# Datenstrukturen public definierenif {[info exists avl_nick]} {   ;# Falls Felder definiert sind  puthelp "PRIVMSG $nick :Eingetragene Nick für avl:";# Überschrift anzeigen  foreach search [array names avl_nick] {          ;# Für jeden Eintrag   if {$search != 0} {   ;# wenn kein leerer Eintrag     set acmd [split $search "&amp;"]   ;# Eintrag bei "&amp;" aufsplitten     set inick [lindex $acmd 0]  ;# erstes Argument ist Nick     set inick [form $inick]   ;# Nick formatieren     set ichan [lrange $acmd 1 end]   ;# Der gesamte Rest ist der Channel     set ichan [form $ichan]   ;# Chan formatieren     puthelp "PRIVMSG $nick :$inick       $ichan" ;# Zeile anzeigen     }   ;# End if (search)    }   ;# End foreach  } else {   ;# Falls keine Struktur vorhanden    puthelp "PRIVMSG $nick :Keine Daten gespeichert";# Fehler anzeigen  }   ;# End if}   ;# End Procedureproc m_add_users {nick host hand args} { global avl_nick avl_ni   ;# Datenstrukturen public definieren set acmd [lindex $args 0]   ;# Befehlszeile extrahieren set inick [lindex $acmd 0]   ;# erstes Argument ist Nick set inick [form $inick]   ;# Nick formatieren set ichan [lrange $acmd 1 end]   ;# Der gesamte Rest ist der Channel set ichan [form $ichan]   ;# Chan formatieren set ientry "$inick&amp;$ichan"   ;# Kombination Nick&amp;Chan bauen set avl_nick($ientry) $ientry                     ;# Array Datenfeld (neu) belegen writefile   ;# Datei schreiben puthelp "PRIVMSG $nick :User $inick mit Chan $ichan in $avl_ni(datafile) hinzugefügt" if {[onchan $inick $ichan]} {   pushmode $ichan +v $inick ;# direkt +v setzen }}   ;# End Procedureproc m_del_users {nick host hand args} { global avl_nick avl_ni   ;# Datenstrukturen public definieren set acmd [lindex $args 0]   ;# Befehlszeile extrahieren set inick [lindex $acmd 0]  ;# erstes Argument ist Nick set inick [form $inick]  ;# Nick formatieren set ichan [lrange $acmd 1 end]  ;# Der gesamte Rest ist der Channel set ichan [form $ichan]   ;# Chan formatieren set ientry "$inick&amp;$ichan"   ;# Eintrag nick&amp;chan montieren if {([info exists avl_nick($ientry)])} {          ;# wenn der Eintrag existiert    unset avl_nick($ientry) ;# Array Datenfeld freigeben   writefile   puthelp "PRIVMSG $nick :Eintrag $ientry aus $avl_ni(datafile) gelöscht"  ;# Löschmeldung   } else { ;# Falls Nick nicht vorhanden   puthelp "PRIVMSG $nick :Eintrag $ientry ist nicht gespeichert!";# Infomeldung   };# End if (info) if {[onchan $inick $ichan]} {   pushmode $ichan +v $inick ;# direkt -v setzen }};# End Procedure### Bei einem Join wird dann Voice gegeben, wenn der Nick im Datenfile stehtproc join:avl_check {nick uhost handle chan} {  global botnick avl_nick  if {![avl:active $chan]} { return 0 } ;# falscher Channel: nix machen  set chan [string tolower $chan];# Channel in Kleinschreibung  if ([isop $botnick $chan]) {;# Wenn Bot im Channel Op hat    foreach search [array names avl_nick] {   ;# Liste aller Einträge durchlaufen      if {$search != 0} { ;# wenn kein leerer Eintrag        set ientry [string tolower $avl_nick($search)]   ;# Eintrag (nick&amp;#chan) extrahieren        set parts [split $ientry "&amp;"]        set inick [lindex $parts 0]      ;# Nick extrahieren        set ichan [lindex $parts 1]      ;# Chan extrahieren        if {($nick == $inick) &amp;&amp; ($chan == $ichan)} {          pushmode $chan +v $nick ;# +v setzen}        };# end if search    } ;# end for eache  } else {;# bot hat gar kein op    putlog "Habe kein op op und hole es mir neu" ;# Meldung "kein op"    putserv "chanserv op $chan $botnick"  }   ;# end if (botisop)};# end procedureproc nick:avl_check {nick uhost handle chan newnick} {  global botnick avl_nick  if {![avl:active $chan]} { return 0 } ;# falscher Channel: nix machen  set chan [string tolower $chan];# Channel in Kleinschreibung  if ([isop $botnick $chan]) {;# Wenn Bot im Channel Op hat    foreach search [array names avl_nick] {   ;# Liste aller Einträge durchlaufen      if {$search != 0} { ;# wenn kein leerer Eintrag        set ientry [string tolower $avl_nick($search)]   ;# Eintrag (nick&amp;#chan) extrahieren        set parts [split $ientry "&amp;"]        set inick [lindex $parts 0]      ;# Nick extrahieren        set ichan [lindex $parts 1]      ;# Chan extrahieren        if {($nick == $inick) &amp;&amp; ($chan == $ichan)} {          pushmode $chan +v $newnick ;# +v setzen}         };# end if search    };# end foreach  } else {;# bot hat gar kein op    putlog "Habe kein op op und hole es mir neu" ;# Meldung "kein op"    putserv "chanserv op $chan $botnick"  }   ;# end if (botisop)};# end procedureproc form {formtext} {;# Formatierung String  set t [string trimleft $formtext];# führende Leerzeichen entfernen  set t [string trimright $t];# folgende Leerzeichen entfernen  return $t;# formatierten String zurückliefern}proc writefile {} {  global avl_nick avl_ni  set out [open $avl_ni(datafile) w]   ;# Datenfile im w modus öffnen (überschreiben)  foreach search [array names avl_nick] {   ;# durchlaufen der Daten arrays    if {$search != 0} {   ;# wenn keine leere Zeile      set parts [split $search "&amp;"]   ;# Eintrag bei "&amp;" aufsplitten      set inick [lindex $parts 0]   ;# Nick extrahieren      set ichan [lindex $parts 1]   ;# Channel extrahieren      set output "$inick $ichan"   ;# Output montieren      puts $out $output   ;# Zeile schreiben     }         ;# End if (search)   };# End Foreach   close $out;# Datei schließen};# End procedureproc avl:active {chan} {  foreach setting [channel info $chan] {;# "channel info" ist ein TCL Befehl!    if {[regexp -- {^[\+-]} $setting]} {      if {$setting == "+avl"} { return 1 }    }  }  return 0}putlog "avl (autovoicelist) von stylus740 geladen. (Stand 12.02.05)"putlog "Eingabe von \.avlhelp bzw. \/msg $botnick avlhelp zeigt Bedienungshinweise an"</code></pre></div><div class="codebox"><p>Code: </p><pre><code></code></pre></div><div class="codebox"><p>Code: </p><pre><code></code></pre></div><div class="codebox"><p>Code: </p><pre><code></code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10435">calippo</a> — Wed Jan 21, 2009 4:28 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arfer]]></name></author>
		<updated>2009-01-21T11:40:19-04:00</updated>

		<published>2009-01-21T11:40:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87055#p87055</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87055#p87055"/>
		<title type="html"><![CDATA[Help me please irco.voicecontrol.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87055#p87055"><![CDATA[
There wasn't any voice/devoice command in your original post and neither was it clear from the coding style if you wished to permit kick/ban without a reason.<br><br>Nonetheless, here is a revised script which will do what you ask. The !voice &lt;target&gt; command is a toggle. If the taget is already voiced they will be devoiced, conversely if they are not already voiced they will be voiced.<br><br>I'm beginning to think this is never ending.<br><div class="codebox"><p>Code: </p><pre><code># set here the space delimited string of channel(s) that the script is active inset vVoiceChans "#eggTCL"# set here the notice to send to users that are voiced in the above preconfigured channel(s)set vVoiceMessage "welcome to voice control script - you can use !ban, !kick, !unban, !topic, !mode, !voice"bind mode - *+v* pVoiceNoticebind pub - !kick pVoiceKickbind pub - !ban pVoiceBanbind pub - !unban pVoiceUnbanbind pub - !mode pVoiceModebind pub - !topic pVoiceTopicbind pub - !voice pVoiceVoiceset vVoiceVersion v2.0proc pVoiceNotice {nick uhost hand chan mc target} {    global vVoiceChans vVoiceMessage    if {[lsearch -exact [split [string tolower $vVoiceChans]] [string tolower $chan]] != -1} {        putserv "NOTICE $target :$vVoiceMessage"    }    return 0}proc pVoiceKick {nick uhost hand chan text} {    global vVoiceChans    if {[lsearch -exact [split [string tolower $vVoiceChans]] [string tolower $chan]] != -1} {        set txt [split [string trim $text]]        switch -- [llength $txt] {            0 {                putserv "NOTICE $nick :-error- correct syntax is !kick &lt;nick&gt; ?reason?"                return 0            }            1 {set target [lindex $txt 0]}            default {                set target [lindex $txt 0]                set reason [join [lrange $txt 1 end]]            }        }        if {([isvoice $nick $chan]) || ([isop $nick $chan])} {            if {[onchan $target $chan]} {                if {![validuser [nick2hand $target $chan]]} {                    if {[botisop $chan]} {                        if {[info exists reason]} {                            putserv "KICK $chan $target :$reason *- requested by $nick -*)"                        } else {putserv "KICK $chan $target :*- requested by $nick -*"}                    } else {putserv "NOTICE $nick :-error- I need to be op'd in $chan to do that"}                } else {putserv "NOTICE $nick :-error- $target has a valid bot user record for $chan"}            } else {putserv "NOTICE $nick :-error- $target is not on $chan"}        } else {putserv "NOTICE $nick :-error- you need to be at least a channel voice in $chan to kick users via this script"}    }    return 0}proc pVoiceBan {nick uhost hand chan text} {    global vVoiceChans    if {[lsearch -exact [split [string tolower $vVoiceChans]] [string tolower $chan]] != -1} {        set txt [split [string trim $text]]        switch -- [llength $txt] {            0 {                putserv "NOTICE $nick :-error- correct syntax is !ban &lt;nick&gt; ?reason?"                return 0            }            1 {                set target [lindex $txt 0]            }            default {                set target [lindex $txt 0]                set reason [join [lrange $txt 1 end]]            }        }        if {([isvoice $nick $chan]) || ([isop $nick $chan])} {            if {[onchan $target $chan]} {                if {![validuser [nick2hand $target $chan]]} {                    if {[botisop $chan]} {                        scan [getchanhost $target $chan] {%[^@]@%s} user host                        putserv "MODE $chan -o+b $target $host"                        if {[info exists reason]} {                            putserv "KICK $chan $target :$reason *- requested by $nick -*"                        } else {putserv "KICK $chan $target :*- requested by $nick -*"}                    } else {putserv "NOTICE $nick :-error- I need to be op'd in $chan to do that"}                } else {putserv "NOTICE $nick :-error- $target has a valid bot user record for $chan"}            } else {putserv "NOTICE $nick :-error- $target is not on $chan"}        } else {putserv "NOTICE $nick :-error- you need to be at least a channel voice in $chan to ban users via this script"}    }    return 0}proc pVoiceUnban {nick uhost handle chan text} {    global vVoiceChans    if {[lsearch -exact [split [string tolower $vVoiceChans]] [string tolower $chan]] != -1} {        set txt [split [string trim $text]]        if {[llength $txt] == 1} {            set host [lindex $txt 0]            if {([isvoice $nick $chan]) || ([isop $nick $chan])} {                if {[botisop $chan]} {                    putserv "MODE $chan -b $host"                } else {putserv "NOTICE $nick :-error- I need to be op'd in $chan to do that"}            } else {putserv "NOTICE $nick :-error- you need to be at least a channel voice in $chan to unban hosts via this script"}        } else {putserv "NOTICE $nick :-error- correct syntax is !unban &lt;host&gt;"}    }    return 0}proc pVoiceMode {nick uhost handle chan text} {    global vVoiceChans    if {[lsearch -exact [split [string tolower $vVoiceChans]] [string tolower $chan]] != -1} {        set txt [split [string trim $text]]        if {[llength $txt] == 1} {            set mode [lindex $txt 0]            if {([isvoice $nick $chan]) || ([isop $nick $chan])} {                if {[botisop $chan]} {                    switch -- [string tolower $mode] {                        on {putserv "MODE $chan +mi"}                        off {putserv "MODE $chan -mi"}                        default {putserv "NOTICE $nick :-error- single text argument can only be on or off"}                    }                } else {putserv "NOTICE $nick :-error- I need to be op'd in $chan to do that"}            } else {putserv "NOTICE $nick :-error- you need to be at least a channel voice in $chan to set modes via this script"}        } else {putserv "NOTICE $nick :-error- correct syntax is !mode &lt;on||off&gt;"}    }    return 0}proc pVoiceTopic {nick uhost handle chan text} {    global vVoiceChans    if {[lsearch -exact [split [string tolower $vVoiceChans]] [string tolower $chan]] != -1} {        set txt [split [string trim $text]]        if {[llength $txt] &gt;= 1} {            set topic [join [lrange $txt 0 end]]            if {([isvoice $nick $chan]) || ([isop $nick $chan])} {                if {[botisop $chan]} {                    putserv "TOPIC $chan :$topic *- requested by $nick -*"                } else {putserv "NOTICE $nick :-error- I need to be op'd in $chan to do that"}            } else {putserv "NOTICE $nick :-error- you need to be at least a channel voice in $chan to set a topic via this script"}        } else {putserv "NOTICE $nick :-error- correct syntax is !topic &lt;topic&gt;"}    }    return 0}proc pVoiceVoice {nick uhost handle chan text} {    global vVoiceChans    if {[lsearch -exact [split [string tolower $vVoiceChans]] [string tolower $chan]] != -1} {        set txt [split [string trim $text]]        if {[llength $txt] == 1} {            set target [lindex $txt 0]            if {([isvoice $nick $chan]) || ([isop $nick $chan])} {                if {[onchan $target $chan]} {                    if {[botisop $chan]} {                        switch -- [isvoice $target $chan] {                            0 {putserv "MODE $chan +v $target"}                            1 {putserv "MODE $chan -v $target"}                        }                    } else {putserv "NOTICE $nick :-error- I need to be op'd in $chan to do that"}                } else {putserv "NOTICE $nick :-error- $target is not on $chan"}            } else {putserv "NOTICE $nick :-error- you need to be at least a channel voice in $chan to voice/devoice users via this script"}        } else {putserv "NOTICE $nick :-error- correct syntax is !voice &lt;nick&gt;"}    }    return 0}# eof</code></pre></div>[/code]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5705">arfer</a> — Wed Jan 21, 2009 11:40 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[calippo]]></name></author>
		<updated>2009-01-20T20:31:46-04:00</updated>

		<published>2009-01-20T20:31:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87037#p87037</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87037#p87037"/>
		<title type="html"><![CDATA[Help me please irco.voicecontrol.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87037#p87037"><![CDATA[
<blockquote class="uncited"><div>You fail to convert properly between lists and strings in several places, which, as per Papillon's post, gives rise to the errors you have already encountered.<br><br>The following URL serves as a good tutorial on the subject<br><br><a href="http://www.peterre.info/characters.html" class="postlink">http://www.peterre.info/characters.html</a><br><br><br>I have taken the trouble to correct the script and to rewrite into a more elegant code structure. I have tested the script on Eggdrop 1.6.19 compiled with Tcl8.4 and seems to work fine including with nicks that contain special characters (heh, I must have had nothing to do for a while there).<br><div class="codebox"><p>Code: </p><pre><code># set here the space delimited string of channel(s) that the script is active inset vVoiceChans "#eggTCL"# set here the notice to send to users that are voiced in the above preconfigured channel(s)set vVoiceMessage "welcome to voice control script - you can use !ban, !kick, !unban, !topic, !mode on/off"bind mode - *+v* pVoiceNoticebind pub - !kick pVoiceKickbind pub - !ban pVoiceBanbind pub - !unban pVoiceUnbanbind pub - !mode pVoiceModebind pub - !topic pVoiceTopicset vVoiceVersion "v1.0"proc pVoiceNotice {nick uhost hand chan mc target} {    global vVoiceChans vVoiceMessage    if {[lsearch -exact [split [string tolower $vVoiceChans]] [string tolower $chan]] != -1} {        putserv "NOTICE $target :$vVoiceMessage"    }    return 0}proc pVoiceKick {nick uhost hand chan text} {    global vVoiceChans    if {[lsearch -exact [split [string tolower $vVoiceChans]] [string tolower $chan]] != -1} {        set txt [split [string trim $text]]        if {[llength $txt] &gt;= 2} {            set target [lindex $txt 0]            set reason [join [lrange $txt 1 end]]            if {([isvoice $nick $chan]) || ([isop $nick $chan])} {                if {[onchan $target $chan]} {                    if {![validuser [nick2hand $target $chan]]} {                        if {[botisop $chan]} {                            putserv "KICK $chan $target :$reason (requested by $nick)"                        } else {putserv "NOTICE $nick :-error- I need to be op'd in $chan to do that"}                    } else {putserv "NOTICE $nick :-error- $target has a valid bot user record for $chan"}                } else {putserv "NOTICE $nick :-error- $target is not on $chan"}            } else {putserv "NOTICE $nick :-error- you need to be at least a channel voice in $chan to kick users via this script"}        } else {putserv "NOTICE $nick :-error- correct syntax is !kick &lt;nick&gt; &lt;reason&gt;"}    }    return 0}proc pVoiceBan {nick uhost hand chan text} {    global vVoiceChans    if {[lsearch -exact [split [string tolower $vVoiceChans]] [string tolower $chan]] != -1} {        set txt [split [string trim $text]]        if {[llength $txt] &gt;= 2} {            set target [lindex $txt 0]            set reason [join [lrange $txt 1 end]]            if {([isvoice $nick $chan]) || ([isop $nick $chan])} {                if {[onchan $target $chan]} {                    if {![validuser [nick2hand $target $chan]]} {                        if {[botisop $chan]} {                            scan [getchanhost $target $chan] {%[^@]@%s} user host                            putserv "MODE $chan -o+b $target $host"                            putserv "KICK $chan $target :$reason (requested by $nick)"                        } else {putserv "NOTICE $nick :-error- I need to be op'd in $chan to do that"}                    } else {putserv "NOTICE $nick :-error- $target has a valid bot user record for $chan"}                } else {putserv "NOTICE $nick :-error- $target is not on $chan"}            } else {putserv "NOTICE $nick :-error- you need to be at least a channel voice in $chan to ban users via this script"}        } else {putserv "NOTICE $nick :-error- correct syntax is !ban &lt;nick&gt; &lt;reason&gt;"}    }    return 0}proc pVoiceUnban {nick uhost handle chan text} {    global vVoiceChans    if {[lsearch -exact [split [string tolower $vVoiceChans]] [string tolower $chan]] != -1} {        set txt [split [string trim $text]]        if {[llength $txt] == 1} {            if {([isvoice $nick $chan]) || ([isop $nick $chan])} {                if {[botisop $chan]} {                    putserv "MODE $chan -b [join $txt]"                } else {putserv "NOTICE $nick :-error- I need to be op'd in $chan to do that"}            } else {putserv "NOTICE $nick :-error- you need to be at least a channel voice in $chan to unban hosts via this script"}        } else {putserv "NOTICE $nick :-error- correct syntax is !unban &lt;host&gt;"}    }    return 0}proc pVoiceMode {nick uhost handle chan text} {    global vVoiceChans    if {[lsearch -exact [split [string tolower $vVoiceChans]] [string tolower $chan]] != -1} {        set txt [split [string trim $text]]        if {[llength $txt] == 1} {            if {([isvoice $nick $chan]) || ([isop $nick $chan])} {                if {[botisop $chan]} {                    switch -- [string tolower [join $txt]] {                        on {putserv "MODE $chan +mi"}                        off {putserv "MODE $chan -mi"}                        default {putserv "NOTICE $nick :-error- single text argument can only be on or off"}                    }                } else {putserv "NOTICE $nick :-error- I need to be op'd in $chan to do that"}            } else {putserv "NOTICE $nick :-error- you need to be at least a channel voice in $chan to set modes via this script"}        } else {putserv "NOTICE $nick :-error- correct syntax is !mode &lt;on||off&gt;"}    }    return 0}proc pVoiceTopic {nick uhost handle chan text} {    global vVoiceChans    if {[lsearch -exact [split [string tolower $vVoiceChans]] [string tolower $chan]] != -1} {        set txt [split [string trim $text]]        if {[llength $txt] &gt;= 1} {            if {([isvoice $nick $chan]) || ([isop $nick $chan])} {                if {[botisop $chan]} {                    putserv "TOPIC $chan :[join $text] (requested by $nick)"                } else {putserv "NOTICE $nick :-error- I need to be op'd in $chan to do that"}            } else {putserv "NOTICE $nick :-error- you need to be at least a channel voice in $chan to set a topic via this script"}        } else {putserv "NOTICE $nick :-error- correct syntax is !topic &lt;topic&gt;"}    }    return 0}# eof</code></pre></div>[/url]</div></blockquote>thank you for your help but this scritp doesn't work with command: for exemple<br>!voice {nick} or !voice {nick] and i can't devoice with it<br>and if i want to kick or ban without reasons it doesn't work<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10435">calippo</a> — Tue Jan 20, 2009 8:31 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arfer]]></name></author>
		<updated>2009-01-19T19:22:56-04:00</updated>

		<published>2009-01-19T19:22:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87009#p87009</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87009#p87009"/>
		<title type="html"><![CDATA[Help me please irco.voicecontrol.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87009#p87009"><![CDATA[
You fail to convert properly between lists and strings in several places, which, as per Papillon's post, gives rise to the errors you have already encountered.<br><br>The following URL serves as a good tutorial on the subject<br><br><a href="http://www.peterre.info/characters.html" class="postlink">http://www.peterre.info/characters.html</a><br><br><br>I have taken the trouble to correct the script and to rewrite into a more elegant code structure. I have tested the script on Eggdrop 1.6.19 compiled with Tcl8.4 and seems to work fine including with nicks that contain special characters (heh, I must have had nothing to do for a while there).<br><div class="codebox"><p>Code: </p><pre><code># set here the space delimited string of channel(s) that the script is active inset vVoiceChans "#eggTCL"# set here the notice to send to users that are voiced in the above preconfigured channel(s)set vVoiceMessage "welcome to voice control script - you can use !ban, !kick, !unban, !topic, !mode on/off"bind mode - *+v* pVoiceNoticebind pub - !kick pVoiceKickbind pub - !ban pVoiceBanbind pub - !unban pVoiceUnbanbind pub - !mode pVoiceModebind pub - !topic pVoiceTopicset vVoiceVersion "v1.0"proc pVoiceNotice {nick uhost hand chan mc target} {    global vVoiceChans vVoiceMessage    if {[lsearch -exact [split [string tolower $vVoiceChans]] [string tolower $chan]] != -1} {        putserv "NOTICE $target :$vVoiceMessage"    }    return 0}proc pVoiceKick {nick uhost hand chan text} {    global vVoiceChans    if {[lsearch -exact [split [string tolower $vVoiceChans]] [string tolower $chan]] != -1} {        set txt [split [string trim $text]]        if {[llength $txt] &gt;= 2} {            set target [lindex $txt 0]            set reason [join [lrange $txt 1 end]]            if {([isvoice $nick $chan]) || ([isop $nick $chan])} {                if {[onchan $target $chan]} {                    if {![validuser [nick2hand $target $chan]]} {                        if {[botisop $chan]} {                            putserv "KICK $chan $target :$reason (requested by $nick)"                        } else {putserv "NOTICE $nick :-error- I need to be op'd in $chan to do that"}                    } else {putserv "NOTICE $nick :-error- $target has a valid bot user record for $chan"}                } else {putserv "NOTICE $nick :-error- $target is not on $chan"}            } else {putserv "NOTICE $nick :-error- you need to be at least a channel voice in $chan to kick users via this script"}        } else {putserv "NOTICE $nick :-error- correct syntax is !kick &lt;nick&gt; &lt;reason&gt;"}    }    return 0}proc pVoiceBan {nick uhost hand chan text} {    global vVoiceChans    if {[lsearch -exact [split [string tolower $vVoiceChans]] [string tolower $chan]] != -1} {        set txt [split [string trim $text]]        if {[llength $txt] &gt;= 2} {            set target [lindex $txt 0]            set reason [join [lrange $txt 1 end]]            if {([isvoice $nick $chan]) || ([isop $nick $chan])} {                if {[onchan $target $chan]} {                    if {![validuser [nick2hand $target $chan]]} {                        if {[botisop $chan]} {                            scan [getchanhost $target $chan] {%[^@]@%s} user host                            putserv "MODE $chan -o+b $target $host"                            putserv "KICK $chan $target :$reason (requested by $nick)"                        } else {putserv "NOTICE $nick :-error- I need to be op'd in $chan to do that"}                    } else {putserv "NOTICE $nick :-error- $target has a valid bot user record for $chan"}                } else {putserv "NOTICE $nick :-error- $target is not on $chan"}            } else {putserv "NOTICE $nick :-error- you need to be at least a channel voice in $chan to ban users via this script"}        } else {putserv "NOTICE $nick :-error- correct syntax is !ban &lt;nick&gt; &lt;reason&gt;"}    }    return 0}proc pVoiceUnban {nick uhost handle chan text} {    global vVoiceChans    if {[lsearch -exact [split [string tolower $vVoiceChans]] [string tolower $chan]] != -1} {        set txt [split [string trim $text]]        if {[llength $txt] == 1} {            if {([isvoice $nick $chan]) || ([isop $nick $chan])} {                if {[botisop $chan]} {                    putserv "MODE $chan -b [join $txt]"                } else {putserv "NOTICE $nick :-error- I need to be op'd in $chan to do that"}            } else {putserv "NOTICE $nick :-error- you need to be at least a channel voice in $chan to unban hosts via this script"}        } else {putserv "NOTICE $nick :-error- correct syntax is !unban &lt;host&gt;"}    }    return 0}proc pVoiceMode {nick uhost handle chan text} {    global vVoiceChans    if {[lsearch -exact [split [string tolower $vVoiceChans]] [string tolower $chan]] != -1} {        set txt [split [string trim $text]]        if {[llength $txt] == 1} {            if {([isvoice $nick $chan]) || ([isop $nick $chan])} {                if {[botisop $chan]} {                    switch -- [string tolower [join $txt]] {                        on {putserv "MODE $chan +mi"}                        off {putserv "MODE $chan -mi"}                        default {putserv "NOTICE $nick :-error- single text argument can only be on or off"}                    }                } else {putserv "NOTICE $nick :-error- I need to be op'd in $chan to do that"}            } else {putserv "NOTICE $nick :-error- you need to be at least a channel voice in $chan to set modes via this script"}        } else {putserv "NOTICE $nick :-error- correct syntax is !mode &lt;on||off&gt;"}    }    return 0}proc pVoiceTopic {nick uhost handle chan text} {    global vVoiceChans    if {[lsearch -exact [split [string tolower $vVoiceChans]] [string tolower $chan]] != -1} {        set txt [split [string trim $text]]        if {[llength $txt] &gt;= 1} {            if {([isvoice $nick $chan]) || ([isop $nick $chan])} {                if {[botisop $chan]} {                    putserv "TOPIC $chan :[join $text] (requested by $nick)"                } else {putserv "NOTICE $nick :-error- I need to be op'd in $chan to do that"}            } else {putserv "NOTICE $nick :-error- you need to be at least a channel voice in $chan to set a topic via this script"}        } else {putserv "NOTICE $nick :-error- correct syntax is !topic &lt;topic&gt;"}    }    return 0}# eof</code></pre></div>[/url]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5705">arfer</a> — Mon Jan 19, 2009 7:22 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[incith]]></name></author>
		<updated>2009-01-19T17:32:16-04:00</updated>

		<published>2009-01-19T17:32:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87008#p87008</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87008#p87008"/>
		<title type="html"><![CDATA[Help me please irco.voicecontrol.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87008#p87008"><![CDATA[
That'll teach me to post a few seconds after waking up. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6130">incith</a> — Mon Jan 19, 2009 5:32 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2009-01-19T17:23:11-04:00</updated>

		<published>2009-01-19T17:23:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87006#p87006</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87006#p87006"/>
		<title type="html"><![CDATA[Help me please irco.voicecontrol.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87006#p87006"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set who [lindex $arg 0]set why [lrange $arg 1 end] </code></pre></div>here you are using a list command on a string. try making the $arg into a list first using split.<div class="codebox"><p>Code: </p><pre><code>set who [lindex [split $arg] 0]set why [lrange [split $arg] 1 end]</code></pre></div>and eggdrop comes with its own kick command, you could try using that<blockquote class="uncited"><div>  putkick &lt;channel&gt; &lt;nick,nick,...&gt; [reason]<br>    Description: sends kicks to the server and tries to put as many nicks<br>      into one kick command as possible.<br>    Returns: nothing<br>    Module: irc</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Mon Jan 19, 2009 5:23 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[calippo]]></name></author>
		<updated>2009-01-19T16:50:55-04:00</updated>

		<published>2009-01-19T16:50:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87004#p87004</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87004#p87004"/>
		<title type="html"><![CDATA[Help me please irco.voicecontrol.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87004#p87004"><![CDATA[
<blockquote class="uncited"><div>Try {} instead of "", e.g.<div class="codebox"><p>Code: </p><pre><code>putserv "kick $chan $who :$why kick by $nick"</code></pre></div>..becomes..<div class="codebox"><p>Code: </p><pre><code>putserv {kick $chan $who :$why kick by $nick}</code></pre></div>If that doesn't work I guess some escaping will have to be done on the nick.</div></blockquote>nothing it dosen't work this is the error message is "not on the channel"<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10435">calippo</a> — Mon Jan 19, 2009 4:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[incith]]></name></author>
		<updated>2009-01-19T16:22:44-04:00</updated>

		<published>2009-01-19T16:22:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87002#p87002</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87002#p87002"/>
		<title type="html"><![CDATA[Help me please irco.voicecontrol.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87002#p87002"><![CDATA[
Try {} instead of "", e.g.<div class="codebox"><p>Code: </p><pre><code>putserv "kick $chan $who :$why kick by $nick"</code></pre></div>..becomes..<div class="codebox"><p>Code: </p><pre><code>putserv {kick $chan $who :$why kick by $nick}</code></pre></div>If that doesn't work I guess some escaping will have to be done on the nick.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6130">incith</a> — Mon Jan 19, 2009 4:22 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[calippo]]></name></author>
		<updated>2009-01-19T16:06:59-04:00</updated>

		<published>2009-01-19T16:06:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87000#p87000</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87000#p87000"/>
		<title type="html"><![CDATA[Help me please irco.voicecontrol.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87000#p87000"><![CDATA[
I need a help . This does not apply tcl voice kick and ban the nick brackets {} [] () and other symbols, how can I do? Thanks and see you soon marco<br><br># voice control v1.0 (14 April 2001) By irco &lt;<a href="mailto:irco@mail.com">irco@mail.com</a>&gt; EFnet #Q8Help <br># the voice control can make voice groub to control your channel <br># the can do to kick ban unban mode on/off and change to topic <br># Notes: I wrote this on eggdrop 1.3.x, don't complain if you load it up <br># on your prehistoric 1.1.5 and it blows up the computer. <br><br>bind mode - *+v* voicenotice <br>bind pub - !kick voicekick <br>bind pub - !ban voiceban <br>bind pub - !unban voiceunban <br>bind pub - !mode voicemode <br>bind pub - !topic voicetopic <br><br>set voicechans "#channel" <br><br># set the Voice notice msg <br><br>set voicemsg "welcome to the control #lamerchan you can use !ban, !kick, !unban, !topic, !mode on/off" <br><br># Don't edit anything below unless you know what you're doing <br><br>set ver "v1.0" <br><br>proc voicenotice {nick uhost hand chan mode victim} { if {[lsearch -exact $::voicechans $chan] == -1} { return 0 } <br>global voicemsg <br>putserv "notice $victim :$voicemsg" <br>return 0 <br>} <br>proc voicekick {nick uhost hand chan arg} { if {[lsearch -exact $::voicechans $chan] == -1} { return 0 } <br>global botnick <br>if {[isvoice $nick $chan]} { <br>set who [lindex $arg 0] <br>set why [lrange $arg 1 end] <br>if {$who == ""} { <br>putserv "notice $nick :Usage: !kick &lt;nick&gt; &lt;reason&gt;" <br>return 0 <br>} <br>if {![validuser [nick2hand $who $chan]]} { <br>if {![onchan $who $chan]} { <br>putserv "notice $nick :$who is not on the channel" <br>return 0 <br>} <br>putserv "kick $chan $who :$why kick by $nick" <br>} <br>} <br>} <br>proc voiceban {nick uhost hand chan arg} { <br>global botnick <br>if {[isvoice $nick $chan]} { <br>set who [lindex $arg 0] <br>set why [lrange $arg 1 end] <br>if {$who == ""} { <br>putserv "notice $nick :Usage: !ban &lt;nick&gt; &lt;reason&gt;" <br>return 0 <br>} <br>if {![validuser [nick2hand $who $chan]]} { <br>if {![onchan $who $chan]} { <br>putserv "notice $nick :$who is not on the channel" <br>return 0 <br>} <br>if {![onchan $who $chan]} { <br>putserv "notice $nick :$who is not on the channel" <br>return 0 <br>} <br>set host "*!*@[lindex [split [getchanhost $who $chan] "@"] end]" <br>putserv "MODE $chan -o+b $who $host" <br>putserv "KICK $chan $who :$why Ban By $nick" <br>return <br>} <br>} <br>} <br>proc voiceunban {nick uhost handle chan text} { if {[lsearch -exact $::voicechans $chan] == -1} { return 0 } <br>global botnick <br>if {$text == ""} { <br>putserv "notice $nick :Usage: !unban host" <br>return 0 <br>} <br>if {([isvoice $nick $chan]) &amp;&amp; ([isop $botnick $chan])} { <br>putserv "MODE $chan -b [lindex $text 0] :[lrange $text 1 end]" <br>return 0 <br>} <br>} <br>proc voicemode {nick uhost handle chan text} { if {[lsearch -exact $::voicechans $chan] == -1} { return 0 } <br>global botnick <br>if {([isvoice $nick $chan]) &amp;&amp; ([isop $botnick $chan])} { <br>if {$text == ""} { <br>putserv "notice $nick :Usage: !mode On/Off" <br>return 0 <br>} <br>if {[lindex $text 0] == "on"} { <br>putserv "MODE $chan +mi" <br>} elseif {[lindex $text 0] == "off"} { <br>putserv "MODE $chan -mi" <br>} <br>} <br>} <br>proc voicetopic {nick uhost handle chan text} { if {[lsearch -exact $::voicechans $chan] == -1} { return 0 } <br>global botnick <br>if {[isvoice $nick $chan]} { <br>if {[isop $botnick $chan] == "1"} { <br>if {$text == ""} { <br>putserv "notice $nick :Usage: !topic &lt;reason&gt;" <br>return 0 <br>} <br>putserv "TOPIC $chan :$text topic By $nick" <br>} <br>} <br>} <br>putlog "Voice control $ver By irco loaded ..."<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10435">calippo</a> — Mon Jan 19, 2009 4:06 pm</p><hr />
]]></content>
	</entry>
	</feed>
