<?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/16571" />

	<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-24T05:54:08-04:00</updated>

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

		<entry>
		<author><name><![CDATA[calippo]]></name></author>
		<updated>2009-01-24T05:54:08-04:00</updated>

		<published>2009-01-24T05:54:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87094#p87094</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87094#p87094"/>
		<title type="html"><![CDATA[autovoicelist problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87094#p87094"><![CDATA[
<blockquote class="uncited"><div>This script has a nasty habit of using the special token 'args' within procedure headers invoked by binds. But, they use the part below to work around it.<div class="codebox"><p>Code: </p><pre><code>set acmd [lindex $args 0]set inick [lindex $acmd 0]set ichan [lrange $acmd 1 end]</code></pre></div>They use an intermediate variable 'acmd' to return the 'args' list back into a string. Which if they had used anything other than 'args' for their variable name wouldn't have been needed. You also notice the list command on a string on the two lines below that. This is also a big problem. They must be changed to this for every single occurence you find.<div class="codebox"><p>Code: </p><pre><code>set inick [lindex [split $acmd] 0]set ichan [join [lrange [split $acmd] 1 end]]</code></pre></div><div class="codebox"><p>Code: </p><pre><code>    set vline [gets $in]                                  if {[eof $in]} {break}                           set inick [lindex $vline 0]                      set ichan [lrange $vline 1 end] </code></pre></div>The major problem for you above looks like the script is using list commands on the string 'vline' when reading the file, this will break the script before it even gets started. Just change it to look like it does below.<div class="codebox"><p>Code: </p><pre><code>    set vline [gets $in]                                  if {[eof $in]} {break}                           set inick [lindex [split $vline] 0]                      set ichan [join [lrange [split $vline] 1 end]] </code></pre></div></div></blockquote>Tnx now working    <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=10435">calippo</a> — Sat Jan 24, 2009 5:54 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2009-01-23T18:01:21-04:00</updated>

		<published>2009-01-23T18:01:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87092#p87092</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87092#p87092"/>
		<title type="html"><![CDATA[autovoicelist problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87092#p87092"><![CDATA[
This script has a nasty habit of using the special token 'args' within procedure headers invoked by binds. But, they use the part below to work around it.<div class="codebox"><p>Code: </p><pre><code>set acmd [lindex $args 0]set inick [lindex $acmd 0]set ichan [lrange $acmd 1 end]</code></pre></div>They use an intermediate variable 'acmd' to return the 'args' list back into a string. Which if they had used anything other than 'args' for their variable name wouldn't have been needed. You also notice the list command on a string on the two lines below that. This is also a big problem. They must be changed to this for every single occurence you find.<div class="codebox"><p>Code: </p><pre><code>set inick [lindex [split $acmd] 0]set ichan [join [lrange [split $acmd] 1 end]]</code></pre></div><div class="codebox"><p>Code: </p><pre><code>    set vline [gets $in]                                  if {[eof $in]} {break}                           set inick [lindex $vline 0]                      set ichan [lrange $vline 1 end] </code></pre></div>The major problem for you above looks like the script is using list commands on the string 'vline' when reading the file, this will break the script before it even gets started. Just change it to look like it does below.<div class="codebox"><p>Code: </p><pre><code>    set vline [gets $in]                                  if {[eof $in]} {break}                           set inick [lindex [split $vline] 0]                      set ichan [join [lrange [split $vline] 1 end]] </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Fri Jan 23, 2009 6:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[calippo]]></name></author>
		<updated>2009-01-23T17:52:47-04:00</updated>

		<published>2009-01-23T17:52:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87090#p87090</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87090#p87090"/>
		<title type="html"><![CDATA[autovoicelist problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87090#p87090"><![CDATA[
hi guys i have a problem with this script I can not let him accept the nick braces ...{nick} thank u so muck<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   if {[file exists $avl_ni(datafile)]} {     putlog "Laden Userdaten aus $avl_ni(datafile)"     set in [open $avl_ni(datafile) r]     while {![eof $in]} {       set vline [gets $in]                               if {[eof $in]} {break}         set inick [lindex $vline 0]       set ichan [lrange $vline 1 end]      set ientry "$inick&amp;$ichan"       set avl_nick($ientry) $ientry                      }     close $in     }  }  init_usersproc list_users {handle idx args} {global avl_nick avl_ni   if {[info exists avl_nick]} {    putlog "Eingetragene Nick für avl:"     foreach search [array names avl_nick] {             if {$search != 0} {        set acmd [split $search "&amp;"]        set inick [lindex $acmd 0]        set inick [form $inick]        set ichan [lrange $acmd 1 end]        set ichan [form $ichan]        putlog "$inick$ichan"           }       }     } else {       putlog "Keine Daten gespeichert"     }   }   proc add_users {handle idx args} { global avl_nick avl_ni    set acmd [lindex $args 0]    set inick [lindex $acmd 0]    set inick [form $inick]   set ichan [lrange $acmd 1 end]    set ichan [form $ichan]  set ientry "$inick&amp;$ichan"    set avl_nick($ientry) $ientry                      writefile    putlog "User $inick mit Chan $ichan in $avl_ni(datafile) hinzugefügt" if {[onchan $inick $ichan]} {   pushmode $ichan +v $inick  }}   proc del_users {handle idx args} { global avl_nick avl_ni    set acmd [lindex $args 0]    set inick [lindex $acmd 0]   set inick [form $inick]   set ichan [lrange $acmd 1 end]   set ichan [form $ichan]    set ientry "$inick&amp;$ichan"    if {([info exists avl_nick($ientry)])} {             unset avl_nick($ientry)    writefile   putlog "Eintrag $ientry aus $avl_ni(datafile) gelöscht"     } else {    putlog "Eintrag $ientry ist nicht gespeichert!"   } if {[onchan $inick $ichan]}    pushmode $ichan -v $inick  }}proc m_list_users {nick host hand args} {global avl_nick avl_ni   if {[info exists avl_nick]} {     puthelp "PRIVMSG $nick :Eingetragene Nick für avl:"  foreach search [array names avl_nick] {             if {$search != 0} {        set acmd [split $search "&amp;"]        set inick [lindex $acmd 0]       set inick [form $inick]        set ichan [lrange $acmd 1 end]        set ichan [form $ichan]        puthelp "PRIVMSG $nick :$inick       $ichan"      }       }     } else {       puthelp "PRIVMSG $nick :Keine Daten gespeichert"  }   }   proc m_add_users {nick host hand args} { global avl_nick avl_ni    set acmd [lindex $args 0]    set inick [lindex $acmd 0]    set inick [form $inick]    set ichan [lrange $acmd 1 end]    set ichan [form $ichan]    set ientry "$inick&amp;$ichan"    set avl_nick($ientry) $ientry                      writefile    puthelp "PRIVMSG $nick :User $inick mit Chan $ichan in $avl_ni(datafile) hinzugefügt" if {[onchan $inick $ichan]} {   pushmode $ichan +v $inick  }}   proc m_del_users {nick host hand args} { global avl_nick avl_ni    set acmd [lindex $args 0]    set inick [lindex $acmd 0]   set inick [form $inick]   set ichan [lrange $acmd 1 end]   set ichan [form $ichan]    set ientry "$inick&amp;$ichan"    if {([info exists avl_nick($ientry)])} {             unset avl_nick($ientry)    writefile   puthelp "PRIVMSG $nick :Eintrag $ientry aus $avl_ni(datafile) gelöscht"     } else {    puthelp "PRIVMSG $nick :Eintrag $ientry ist nicht gespeichert!"   } if {[onchan $inick $ichan]} {   pushmode $ichan +v $inick  }}### 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 }   set chan [string tolower $chan]  if ([isop $botnick $chan]) {    foreach search [array names avl_nick] {         if {$search != 0} {         set ientry [string tolower $avl_nick($search)]           set parts [split $ientry "&amp;"]        set inick [lindex $parts 0]              set ichan [lindex $parts 1]              if {($nick == $inick) &amp;&amp; ($chan == $ichan)} {          pushmode $chan +v $nick }        }    }   } else {    putlog "Habe kein op op und hole es mir neu"         putserv "chanserv op $chan $botnick"  }   }proc nick:avl_check {nick uhost handle chan newnick} {  global botnick avl_nick  if {![avl:active $chan]} { return 0 }   set chan [string tolower $chan]  if ([isop $botnick $chan]) {    foreach search [array names avl_nick] {         if {$search != 0} {         set ientry [string tolower $avl_nick($search)]           set parts [split $ientry "&amp;"]        set inick [lindex $parts 0]              set ichan [lindex $parts 1]              if {($nick == $inick) &amp;&amp; ($chan == $ichan)} {          pushmode $chan +v $newnick }         }    }  } else {    putlog "Habe kein op op und hole es mir neu"      }    )}proc form {formtext} {  set t [string trimleft $formtext]  set t [string trimright $t]  return $t}proc writefile {} {  global avl_nick avl_ni  set out [open $avl_ni(datafile) w]     foreach search [array names avl_nick] {       if {$search != 0} {         set parts [split $search "&amp;"]         set inick [lindex $parts 0]         set ichan [lindex $parts 1]         set output "$inick $ichan"         puts $out $output        }            }   close $out}proc avl:active {chan} {  foreach setting [channel info $chan] {    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><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10435">calippo</a> — Fri Jan 23, 2009 5:52 pm</p><hr />
]]></content>
	</entry>
	</feed>
