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

	<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>2012-05-24T00:35:43-04:00</updated>

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

		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2012-05-24T00:35:43-04:00</updated>

		<published>2012-05-24T00:35:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99454#p99454</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99454#p99454"/>
		<title type="html"><![CDATA[why tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99454#p99454"><![CDATA[
Here's a new version:<div class="codebox"><p>Code: </p><pre><code>namespace eval csWhy {setudef str csWhyListsetudef flag cswhybind mode * "% +o" [namespace current]::checkWhybind notc * * [namespace current]::checkReplybind part * * [namespace current]::removebind sign * * [namespace current]::removebind nick * * [namespace current]::nickbind kick * * [namespace current]::kickbind join * * [namespace current]::botJoin# purgeproc purge {chan user {newNick ""}} {set csWhyList [channel get $chan csWhyList]set pos [lsearch $csWhyList $user]if {$pos != -1} {if {![llength $newNick]} {set csWhyList [lreplace $csWhyList $pos $pos]} else {set csWhyList [lreplace $csWhyList $pos $pos $newNick]}channel set $chan csWhyList $csWhyList}return $pos   }   # cleanupproc cleanup {chan user} {if {[isbotnick $user]} {channel set $chan csWhyList {}} else {purge $chan $user}}   # joinproc botJoin {nick uhost hand chan} {if {[isbotnick $nick]} {channel set $chan csWhyList {}}    }   # kickproc kick {nick uhost handle chan vict reason} {if {![channel get $chan cswhy]} returnif {![wasop $chan $nick]} returncleanup $chan $nick}# part &amp; signproc remove {nick uhost handle chan {text ""}} {if {![channel get $chan cswhy]} returncleanup $chan $nick}# nickproc nick {nick uhost handle chan newNick} {if {[isbotnick $nick] || ![channel get $chan cswhy]} returnif {![isop $chan $nick]} returnputhelp "ChanServ WHY $chan $newNick"purge $chan $nick $newNick}   # someone got OP'ed on the channelproc checkWhy {nick uhost hand chan mode target} {if {[isbotnick $target]} returnif {![channel get $chan cswhy]} returnset csWhyList [channel get $chan csWhyList]lappend csWhyList $targetchannel set $chan csWhyList $csWhyListputhelp "ChanServ WHY $chan $target"   }# reply of WHY command from ChanServproc checkReply {nick uhost hand text {dest ""}} {if {[string equal -length 1 # $dest]} returnif {![string equal $nick "ChanServ"]} returnset text [split $text]if {[lsearch $text "Identification"] == -1} returnset chan [string trim [lindex $text 5] {.}]if {![channel get $chan cswhy]} returnset user [lindex $text 0]if {[purge $chan $user] != -1} {puthelp "NOTICE @$chan :$text"}}}putlog "cswhy.tcl loaded.." </code></pre></div>I joined Dalnet in order to check this out but needed AOP on a channel to issue the WHy command so I had to fake a few things in order to test this out, and from my results it's working fine.<blockquote class="uncited"><div>* bot sets mode: +o caesar<br>&lt;@bot&gt; ChanServ WHY #chan caesar<br>-bot:@#chan- @ caesar has FOUNDER access to #chan. Reason: Identification to services with the channel password. Channel Frozen: NO<br><br>* caesar is now known as user<br>&lt;@bot&gt; ChanServ WHY #chan user</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Thu May 24, 2012 12:35 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Amr]]></name></author>
		<updated>2012-05-23T15:40:49-04:00</updated>

		<published>2012-05-23T15:40:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99453#p99453</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99453#p99453"/>
		<title type="html"><![CDATA[why tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99453#p99453"><![CDATA[
caesar; any news?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9309">Amr</a> — Wed May 23, 2012 3:40 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Amr]]></name></author>
		<updated>2012-05-19T04:34:15-04:00</updated>

		<published>2012-05-19T04:34:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99435#p99435</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99435#p99435"/>
		<title type="html"><![CDATA[why tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99435#p99435"><![CDATA[
I got the result only via telnet , not over ops notice.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9309">Amr</a> — Sat May 19, 2012 4:34 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2012-05-18T04:20:46-04:00</updated>

		<published>2012-05-18T04:20:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99432#p99432</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99432#p99432"/>
		<title type="html"><![CDATA[why tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99432#p99432"><![CDATA[
The code in my previous comment makes it *ignore* any other notices if is not one regarding an issued WHY command, thus no more errors like that of a invalid channel.<br><br>To be honest I don't quite understand you. You said it's working, then it isn't and then you change your mind again. Decide already, is it working or not? I ran some tests and was working fine at me, yet at you it didn't. Don't know what exactly you've done there as it should work without any issues.<br><br>I'll get later on a bot on Dalnet servers and test this again, although the result shouldn't differ, meaning it's working as should.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Fri May 18, 2012 4:20 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Amr]]></name></author>
		<updated>2012-05-17T08:09:40-04:00</updated>

		<published>2012-05-17T08:09:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99427#p99427</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99427#p99427"/>
		<title type="html"><![CDATA[why tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99427#p99427"><![CDATA[
now I see the chanserv's reply on the telnet only.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9309">Amr</a> — Thu May 17, 2012 8:09 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2012-05-17T00:20:52-04:00</updated>

		<published>2012-05-17T00:20:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99424#p99424</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99424#p99424"/>
		<title type="html"><![CDATA[why tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99424#p99424"><![CDATA[
That's weird. The channel #chan is set correctly yet you don't see the op notice? Anyway, add:<div class="codebox"><p>Code: </p><pre><code>if {![channel get $chan cswhy]} returnif {[lsearch $text "Identification"] == -1} return</code></pre></div>before:<div class="codebox"><p>Code: </p><pre><code>set csWhyList [channel get $chan csWhyList]</code></pre></div>and remove the debug line and it should be working fine.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Thu May 17, 2012 12:20 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Amr]]></name></author>
		<updated>2012-05-16T13:59:06-04:00</updated>

		<published>2012-05-16T13:59:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99423#p99423</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99423#p99423"/>
		<title type="html"><![CDATA[why tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99423#p99423"><![CDATA[
here we go<br>[19:55:49] cswhy.tcl debug - chan is: #chan<br>[19:55:49] -ChanServ (<a href="mailto:service@dal.net">service@dal.net</a>)- nick has FOUNDER access to #chan.  Reason: Identification to the founder's nickname, nick. Channel Frozen: NO<br><br>And I got this on telnet on channel which the script is disabled in.<br><br>[19:56:18] cswhy.tcl debug - chan is: xeo<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9309">Amr</a> — Wed May 16, 2012 1:59 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2012-05-16T13:32:56-04:00</updated>

		<published>2012-05-16T13:32:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99422#p99422</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99422#p99422"/>
		<title type="html"><![CDATA[why tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99422#p99422"><![CDATA[
Since the channel variable is set correctly:<blockquote class="uncited"><div>% set text "nick has FOUNDER access to #chan. Reason: Identification to the founder's nickname, nick. Channel Frozen: NO"<br>nick has FOUNDER access to #chan. Reason: Identification to the founder's nickname, nick. Channel Frozen: NO<br>% string trim [lindex [split $text] 5] {.}<br>#chan</div></blockquote>I don't get it why it says #chan is not valid. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"><br><br>Let's do a little debug of the chan variable by adding:<div class="codebox"><p>Code: </p><pre><code>putlog "cswhy.tcl debug - chan is: $chan"</code></pre></div>after:<div class="codebox"><p>Code: </p><pre><code>set chan [string trim [lindex $text 5] {.}] </code></pre></div>and report back what you get in telnet.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Wed May 16, 2012 1:32 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Amr]]></name></author>
		<updated>2012-05-16T10:48:49-04:00</updated>

		<published>2012-05-16T10:48:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99421#p99421</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99421#p99421"/>
		<title type="html"><![CDATA[why tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99421#p99421"><![CDATA[
exactly , I see the chanserv's reply on the telnet only.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9309">Amr</a> — Wed May 16, 2012 10:48 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2012-05-16T09:44:07-04:00</updated>

		<published>2012-05-16T09:44:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99420#p99420</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99420#p99420"/>
		<title type="html"><![CDATA[why tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99420#p99420"><![CDATA[
Wait, what?! <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"> <br><br>So, you see the reply (notice) from ChanServ and the bot itself repeats the same line in the telnet, or you see only ChanServ's reply?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Wed May 16, 2012 9:44 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Amr]]></name></author>
		<updated>2012-05-16T05:38:57-04:00</updated>

		<published>2012-05-16T05:38:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99418#p99418</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99418#p99418"/>
		<title type="html"><![CDATA[why tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99418#p99418"><![CDATA[
I got no errors now , but it replies the result to the telnet not to the @#chan O.o<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9309">Amr</a> — Wed May 16, 2012 5:38 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2012-05-16T00:18:53-04:00</updated>

		<published>2012-05-16T00:18:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99417#p99417</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99417#p99417"/>
		<title type="html"><![CDATA[why tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99417#p99417"><![CDATA[
Is #chan a valid channel? Add the following<div class="codebox"><p>Code: </p><pre><code>if {![validchan $chan]} return</code></pre></div>before:<div class="codebox"><p>Code: </p><pre><code>set csWhyList [channel get $chan csWhyList]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Wed May 16, 2012 12:18 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Amr]]></name></author>
		<updated>2012-05-15T09:21:00-04:00</updated>

		<published>2012-05-15T09:21:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99416#p99416</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99416#p99416"/>
		<title type="html"><![CDATA[why tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99416#p99416"><![CDATA[
I tried it again but it gives the same error.<br><br>[11:16:38] Tcl error [::csWhy::checkReply]: no such channel record<br>[11:16:38] -ChanServ (<a href="mailto:service@dal.net">service@dal.net</a>)- nick has FOUNDER access to #chan. Reason: Identification to the founder's nickname, nick. Channel Frozen: NO<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9309">Amr</a> — Tue May 15, 2012 9:21 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2012-05-15T01:13:37-04:00</updated>

		<published>2012-05-15T01:13:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99415#p99415</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99415#p99415"/>
		<title type="html"><![CDATA[why tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99415#p99415"><![CDATA[
That's weird. I just tested this and works as should. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Tue May 15, 2012 1:13 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Amr]]></name></author>
		<updated>2012-05-14T05:17:28-04:00</updated>

		<published>2012-05-14T05:17:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99413#p99413</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99413#p99413"/>
		<title type="html"><![CDATA[why tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99413#p99413"><![CDATA[
[11:16:38] Tcl error [::csWhy::checkReply]: no such channel record<br>[11:16:38] -ChanServ (<a href="mailto:service@dal.net">service@dal.net</a>)- nick has FOUNDER access to #chan.  Reason: Identification to the founder's nickname, nick. Channel Frozen: NO<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9309">Amr</a> — Mon May 14, 2012 5:17 am</p><hr />
]]></content>
	</entry>
	</feed>
