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

	<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>2020-09-16T13:15:03-04:00</updated>

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

		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2020-09-16T13:15:03-04:00</updated>

		<published>2020-09-16T13:15:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108991#p108991</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108991#p108991"/>
		<title type="html"><![CDATA[chanset via pub command]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108991#p108991"><![CDATA[
thank you CrazyCat and Caesar much apreciated works fine now<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Wed Sep 16, 2020 1:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2020-09-16T13:06:48-04:00</updated>

		<published>2020-09-16T13:06:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108990#p108990</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108990#p108990"/>
		<title type="html"><![CDATA[chanset via pub command]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108990#p108990"><![CDATA[
cleared all tcls and left only the chanset one  and seems to work now<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Wed Sep 16, 2020 1:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2020-09-16T12:51:48-04:00</updated>

		<published>2020-09-16T12:51:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108989#p108989</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108989#p108989"/>
		<title type="html"><![CDATA[chanset via pub command]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108989#p108989"><![CDATA[
So you have an error, but not in that proc, because there is no lreplace in it.<br>You'd better give us your full script, or find which of your script did this error.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Wed Sep 16, 2020 12:51 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2020-09-16T12:45:24-04:00</updated>

		<published>2020-09-16T12:45:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108988#p108988</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108988#p108988"/>
		<title type="html"><![CDATA[chanset via pub command]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108988#p108988"><![CDATA[
list doesn't contain element 2<br>while executing<br>"lreplace $items 2 2"<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Wed Sep 16, 2020 12:45 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2020-09-16T12:42:55-04:00</updated>

		<published>2020-09-16T12:42:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108987#p108987</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108987#p108987"/>
		<title type="html"><![CDATA[chanset via pub command]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108987#p108987"><![CDATA[
And what did you get in party-line ?<br>I can't help you without these infos<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Wed Sep 16, 2020 12:42 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2020-09-16T12:35:49-04:00</updated>

		<published>2020-09-16T12:35:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108986#p108986</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108986#p108986"/>
		<title type="html"><![CDATA[chanset via pub command]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108986#p108986"><![CDATA[
tried your last posted code and didnt output any error CrazyCat<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Wed Sep 16, 2020 12:35 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2020-09-16T11:04:03-04:00</updated>

		<published>2020-09-16T11:04:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108985#p108985</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108985#p108985"/>
		<title type="html"><![CDATA[chanset via pub command]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108985#p108985"><![CDATA[
I think you don't know how to debug a script...<br><br>Try this code, and copy us the command you type in chan and what happens in party-line<br><div class="codebox"><p>Code: </p><pre><code>proc pub:chanset {nick host hand chan text} {   set value [lassign $text mode]   putlog "getting mode: *$mode* and value: *$value*"   if {![info exists value] || $value eq ""} {      putlog "value seems to not be set"      catch {channel set $chan $mode} error   } else {      putlog "ok, value is set"      catch {channel set $chan $mode $value} error   }   putlog "error is *$error*"   if {$error == ""} {      putnow "NOTICE $nick :Successfully set $text"   } else {      putnow "NOTICE $nick :Error setting $text: [lindex $error 0]..."   }}</code></pre></div>Using <strong class="text-strong">.console +d</strong> is a good way to see errors. And if an error appear, type <strong class="text-strong">.set errorInfo</strong> to have more detals<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Wed Sep 16, 2020 11:04 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2020-09-16T10:44:33-04:00</updated>

		<published>2020-09-16T10:44:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108984#p108984</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108984#p108984"/>
		<title type="html"><![CDATA[chanset via pub command]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108984#p108984"><![CDATA[
ive added this caesar but it didnt output anything<br><br> putserv "privmsg $chan :trying to set $mode to $value"<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Wed Sep 16, 2020 10:44 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2020-09-16T00:54:24-04:00</updated>

		<published>2020-09-16T00:54:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108983#p108983</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108983#p108983"/>
		<title type="html"><![CDATA[chanset via pub command]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108983#p108983"><![CDATA[
Did you add a <em class="text-italics">putlog</em> line to see what mode and value would be set and what error do you get? Something like:<div class="codebox"><p>Code: </p><pre><code>putlog "trying to set $mode to $value"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Wed Sep 16, 2020 12:54 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2020-09-15T19:16:38-04:00</updated>

		<published>2020-09-15T19:16:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108982#p108982</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108982#p108982"/>
		<title type="html"><![CDATA[chanset via pub command]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108982#p108982"><![CDATA[
tnx for that crazycat tried that didnt seem to work properly tho same result of just setting parts of the settings<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Tue Sep 15, 2020 7:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2020-09-15T18:17:01-04:00</updated>

		<published>2020-09-15T18:17:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108981#p108981</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108981#p108981"/>
		<title type="html"><![CDATA[chanset via pub command]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108981#p108981"><![CDATA[
No, he means (if I'm not wrong):<div class="codebox"><p>Code: </p><pre><code>proc pub:chanset {nick host hand chan text} {   set value [lassign $text mode]   if {![info exists value] || $value eq ""} {      catch {channel set $chan $mode} error   } else {      catch {channel set $chan $mode $value} error   }   if {$error == ""} {      putnow "NOTICE $nick :Successfully set $text"   } else {      putnow "NOTICE $nick :Error setting $text: [lindex $error 0]..."   }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Tue Sep 15, 2020 6:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2020-09-15T15:01:50-04:00</updated>

		<published>2020-09-15T15:01:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108980#p108980</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108980#p108980"/>
		<title type="html"><![CDATA[chanset via pub command]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108980#p108980"><![CDATA[
you mean like this caesar:<br><div class="codebox"><p>Code: </p><pre><code>proc pub:chanset {nick host hand chan text} {set text [lindex [split $text] 0]set value [lassign $text mode] if {![info exists value]} {  catch {channel set $chan $set} error } {  catch {channel set $chan $set $value} error } if {$error == ""} {  putnow "NOTICE $nick :Successfully set $text" } {  putnow "NOTICE $nick :Error setting $text: [lindex $error 0]..." }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Tue Sep 15, 2020 3:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2020-09-15T04:23:51-04:00</updated>

		<published>2020-09-15T04:23:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108979#p108979</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108979#p108979"/>
		<title type="html"><![CDATA[chanset via pub command]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108979#p108979"><![CDATA[
You shouldn't use <em class="text-italics">set</em>, <em class="text-italics">arg</em> or <em class="text-italics">args</em> cos they have special meanings in TCL.<br><br>Here's a nice trick with <em class="text-italics">lassign</em>:<div class="codebox"><p>Code: </p><pre><code>% set text "ap:repeatl 2:10 60 k:kb 2"ap:repeatl 2:10 60 k:kb 2% set value [lassign $text mode]2:10 60 k:kb 2% puts $modeap:repeatl% puts $value2:10 60 k:kb 2</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Tue Sep 15, 2020 4:23 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2020-09-14T13:55:09-04:00</updated>

		<published>2020-09-14T13:55:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108978#p108978</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108978#p108978"/>
		<title type="html"><![CDATA[chanset via pub command]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108978#p108978"><![CDATA[
excellent tnx CrazyCat<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Mon Sep 14, 2020 1:55 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2020-09-14T12:18:38-04:00</updated>

		<published>2020-09-14T12:18:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108977#p108977</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108977#p108977"/>
		<title type="html"><![CDATA[chanset via pub command]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108977#p108977"><![CDATA[
The split command cut $args in 5 pieces (split is on " ") and set the first to $set (bad idea of variable name) and the second to $value (bad idea too). The script wasn't thought for complex values.<br><br>You can use <strong class="text-strong">scan</strong> and a regexp to set $set and $value, or do it in 2 times whith:<div class="codebox"><p>Code: </p><pre><code>set set [lindex [split $arg] 0]set value [join [lrange [split $arg] 1 end]]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Mon Sep 14, 2020 12:18 pm</p><hr />
]]></content>
	</entry>
	</feed>
