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

	<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>2005-02-05T12:21:17-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-02-05T12:21:17-04:00</updated>

		<published>2005-02-05T12:21:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46286#p46286</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46286#p46286"/>
		<title type="html"><![CDATA[Problem on switch of strings]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46286#p46286"><![CDATA[
or <strong class="text-strong">.tcl set errorInfo</strong><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sat Feb 05, 2005 12:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2005-02-05T11:59:33-04:00</updated>

		<published>2005-02-05T11:59:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46285#p46285</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46285#p46285"/>
		<title type="html"><![CDATA[Problem on switch of strings]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46285#p46285"><![CDATA[
<blockquote class="uncited"><div>type <div class="codebox"><p>Code: </p><pre><code>.tcl errorInfo</code></pre></div> after you get that error on the bot for more specific information.</div></blockquote>try <br><div class="codebox"><p>Code: </p><pre><code>.set errorInfo</code></pre></div>instead cause errorInfo is a variable not a command<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Sat Feb 05, 2005 11:59 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[HecKel]]></name></author>
		<updated>2005-02-05T11:21:07-04:00</updated>

		<published>2005-02-05T11:21:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46282#p46282</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46282#p46282"/>
		<title type="html"><![CDATA[Problem on switch of strings]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46282#p46282"><![CDATA[
this is the full code, the same error, the same results....<br><div class="codebox"><p>Code: </p><pre><code>proc add_new {n u h c args} {  set found 0  set args [split [lindex $args 0]]  set cmd [lindex $args 0]    set user [lindex $args 1]  set c [string tolower $c]  set chans [string tolower $::chans]  if {[lsearch -exact $chans $c] != -1} {makelog $n ".addnew"global newflagsset h "$n!*@*"set exflags $newflagsif { [matchattr [finduser $h] "X" $c] } {switch -- $cmd {"friend" {if{$user == ""} {puthelp "NOTICE $n :Command: .addnew friend &lt;nick&gt;"} else {set found 1set newop $userset newhost "$newop!*@*"set utype "friend"set exflags "-jmnptxAGX+fo|-mnACGNVX+foF"}}"little" {if {[[matchattr [finduser $h] "V" $c] || [matchattr [finduser $h] "A" $c]]} {if{$user == ""} {puthelp "NOTICE $n :Command: .addnew little &lt;nick&gt;"} else {set found 2set newop $userset newhost "$newop!*@*"set utype "little"set exflags "-jmnptxAGX+fo|-mnACGNVX+foCX"set acclevel 5}} { puthelp "NOTICE $n :You can't do this command"}}"medium" {if { [matchattr [finduser $h] "A" $c] } {if{$user == ""} {puthelp "NOTICE $n :Command: .addnew medium &lt;nick&gt;"} else {set found 2set newop $userset newhost "$newop!*@*"set utype "medium"set exflags "-jmnptxAGX+fo|-mnACGNVX+foVX"set acclevel 10}} { puthelp "NOTICE $n :You can't do this command"}}"admin" {if {[matchattr [finduser $h] "G" $c]} {if{$user == ""} {puthelp "NOTICE $n :Command: .addnew admin &lt;nick&gt;"} else {set found 2set newop $userset newhost "$newop!*@*"set utype "admin"set exflags "-jmnptxAGX+fo|-nACGNVX+fmoANVX"set acclevel 12}} { puthelp "NOTICE $n :You can't do this command"}}"gadmin" {if {[matchattr [finduser $h] "G" $c]} {if{$user == ""} {puthelp "NOTICE $n :Command: .addnew admin &lt;nick&gt;"} else {set found 1set newop $userset newhost "$newop!*@*"set utype "gadmin"set exflags "+fhjmnoptxAGX|+flmnoAGNVX"putserv "NOTICE $n :REMEMBER: I can't add user to access list!"}} { puthelp "NOTICE $n :You can't do this command"}}default { puthelp "NOTICE $n :Command: \002.addnew &lt;friend|little|medium|admin|gadmin&gt;"}}} { puthelp "NOTICE $n :You can't do this command"}if {$found &gt; 0} {if {[validuser $newop] == 1} {if {[lsearch [getuser $newop hosts] $newhost] == "-1"} {putserv "NOTICE $n :$newop isn't on bd, adding..."if{$found == 2} {putserv "CHANSERV ACCESS $c ADD $newop $acclevel"}chattr $newop $exflags $csetuser $newop hosts $newhostreturn 1} {putserv "NOTICE $n :$newop is on bd, changing flags..."if{$found == 2} {putserv "CHANSERV ACCESS $c ADD $newop $acclevel"}chattr $newop $exflags $creturn 1 }}  if {[finduser $newhost] != "*"} { putserv "NOTICE $n :$newop\[$newhost\] is [finduser $newhost]"if{$found == 2} {putserv "CHANSERV ACCESS $c ADD $newop $acclevel"}chattr [finduser $newhost] $exflags $creturn 1} {if{$found == 2} {putserv "CHANSERV ACCESS $c ADD $newop $acclevel"}adduser $newop $newhostchattr [finduser $newhost] $exflags $creturn 1}if {[chattr $newop $exflags $c] == "*"} {putserv "NOTICE $n :Error adding flags to $newop."return 1}save}  }}</code></pre></div>tnks, Heckel<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5906">HecKel</a> — Sat Feb 05, 2005 11:21 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-02-05T10:42:32-04:00</updated>

		<published>2005-02-05T10:42:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46281#p46281</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46281#p46281"/>
		<title type="html"><![CDATA[Re: Problem on switch of strings]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46281#p46281"><![CDATA[
try<div class="codebox"><p>Code: </p><pre><code>proc add_new {n u h c arg} {  set arg [split $arg]  set cmd [lindex $arg 0]  switch -- $cmd {"friend" {adduser [lindex $arg 1] "[lindex $arg 1]!*@*"chattr "[finduser [lindex $arg 1]!*@*]" "+f" $c}"op" {adduser [lindex $arg 1] "[lindex $args 1]!*@*"chattr "[finduser [lindex $arg 1]!*@*]" "+o" $c}"voice" {adduser [lindex $arg 1] "[lindex $arg 1]!*@*"chattr "[finduser [lindex $args 1]!*@*]" "+v" $c}(...) }</code></pre></div>all quotes seem correct here, the error might be from another switch in the proc.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sat Feb 05, 2005 10:42 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[greenbear]]></name></author>
		<updated>2005-02-05T10:42:10-04:00</updated>

		<published>2005-02-05T10:42:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46280#p46280</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46280#p46280"/>
		<title type="html"><![CDATA[Problem on switch of strings]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46280#p46280"><![CDATA[
You have a misplaced quotation mark, change<div class="codebox"><p>Code: </p><pre><code>[finduser "[lindex $args 1]!*@*"]</code></pre></div>to<div class="codebox"><p>Code: </p><pre><code>[finduser "[lindex $args 1]!*@*]"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=24">greenbear</a> — Sat Feb 05, 2005 10:42 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[^DooM^]]></name></author>
		<updated>2005-02-05T10:33:51-04:00</updated>

		<published>2005-02-05T10:33:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46278#p46278</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46278#p46278"/>
		<title type="html"><![CDATA[Problem on switch of strings]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46278#p46278"><![CDATA[
type <div class="codebox"><p>Code: </p><pre><code>.tcl errorInfo</code></pre></div> after you get that error on the bot for more specific information.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3723">^DooM^</a> — Sat Feb 05, 2005 10:33 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[HecKel]]></name></author>
		<updated>2005-02-05T10:11:53-04:00</updated>

		<published>2005-02-05T10:11:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46277#p46277</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46277#p46277"/>
		<title type="html"><![CDATA[Problem on switch of strings]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46277#p46277"><![CDATA[
I have a code similar this one:<br><div class="codebox"><p>Code: </p><pre><code>proc add_new {n u h c args} {  set args [lindex $args 0]  set args [split $args " "]    switch [lindex $args 0] {"friend" {adduser [lindex $args 1] "[lindex $args 1]!*@*"chattr [finduser "[lindex $args 1]!*@*"] "+f" $c}"op" {adduser [lindex $args 1] "[lindex $args 1]!*@*"chattr [finduser "[lindex $args 1]!*@*"] "+o" $c}"voice" {adduser [lindex $args 1] "[lindex $args 1]!*@*"chattr [finduser "[lindex $args 1]!*@*"] "+v" $c}(...)  }</code></pre></div>I already try to view the [lindex $args 0] by notice and the value is correct, but nothing happens on the switch..., btw, the egg return this error<blockquote class="uncited"><div>[02:32] Tcl error [add_new]: extra characters after close-quote</div></blockquote>tnks, HecKel<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5906">HecKel</a> — Sat Feb 05, 2005 10:11 am</p><hr />
]]></content>
	</entry>
	</feed>
