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

	<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-05-25T19:49:59-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Scarpa_SD]]></name></author>
		<updated>2009-05-25T19:49:59-04:00</updated>

		<published>2009-05-25T19:49:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88949#p88949</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88949#p88949"/>
		<title type="html"><![CDATA[Proxy check]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88949#p88949"><![CDATA[
Well that worked. Thanks so much speechles. I guess after I posted I started tinkering around with the script more instead of waiting for a response and messed something else up so when I did what you said it resulted in another error. After going back and reverting it to my original changes I removed the [] brackets from $status and it worked right. Plus now I know brackets only go around commands and not values.  <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=10682">Scarpa_SD</a> — Mon May 25, 2009 7:49 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2009-05-25T18:28:52-04:00</updated>

		<published>2009-05-25T18:28:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88948#p88948</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88948#p88948"/>
		<title type="html"><![CDATA[Proxy check]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88948#p88948"><![CDATA[
<blockquote class="uncited"><div>I tried<div class="codebox"><p>Code: </p><pre><code> if {([$status]) &amp;&amp; (![matchban *@$orighost])} { </code></pre></div><div class="codebox"><p>Code: </p><pre><code> if {[$status] &amp;&amp; (![matchban *@$orighost])} { </code></pre></div> </div></blockquote>......simply read what I've said, and slow down... We will go 1 step at a time, go back to your original version....<br><br><br>Now....<br><br><br>....Simply remove the [ ]'s around $status and it's dandy again...<br><br><br>Should get you somewhere near here:<div class="codebox"><p>Code: </p><pre><code>if {($status) &amp;&amp; (![matchban *@$orighost])} {</code></pre></div>Remember...Only when you are using the contents as a command do you ever want to use [bracket's]. I stated this in my post above if you read the end of the post.<br><br>Also worth nothing, the use of return would eliminate that nasty nest of if's your seem to be constructing. You simply return a value from the procedure and bail out.<div class="codebox"><p>Code: </p><pre><code>if {isban *@$orighost} {} </code></pre></div>You made a mistake here, remember to put [bracket's] around commands. isban i'm guessing is a procedure/command. What I also assume is this evaluation is meant as a trap if it matches. Instead, why not simply:<div class="codebox"><p>Code: </p><pre><code>if {[isban *@$orighost]} { return 0 } </code></pre></div>Bail out, and return a condition of negative? This should help you on you way to fixing you script now <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Mon May 25, 2009 6:28 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Scarpa_SD]]></name></author>
		<updated>2009-05-25T17:59:56-04:00</updated>

		<published>2009-05-25T17:59:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88947#p88947</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88947#p88947"/>
		<title type="html"><![CDATA[Proxy check]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88947#p88947"><![CDATA[
Yeah I can get it to work with <div class="codebox"><p>Code: </p><pre><code> if {$status} {  </code></pre></div> But I'm trying to make it not execute anything if the host of the user is already in the banlist.<div class="codebox"><p>Code: </p><pre><code>   if {($status) &amp;&amp; (![matchban *@$orighost])} { </code></pre></div> gives me this<blockquote class="uncited"><div> [15:08] Tcl error [proxycheck_check3]: invalid command name "<br>"</div></blockquote> I tried <div class="codebox"><p>Code: </p><pre><code> if {([$status]) &amp;&amp; (![matchban *@$orighost])} {  {  </code></pre></div><div class="codebox"><p>Code: </p><pre><code> if {[$status] &amp;&amp; (![matchban *@$orighost])} {  { </code></pre></div> ect and every other possibility I could think of. <br>Can I have a if then statement in an if statement like this?<div class="codebox"><p>Code: </p><pre><code> # second callback (catches RBL results)proc proxycheck_check3 { ip host status nick orighost channel rbl } {  global proxycheck_bantimeif {isban *@$orighost} {}      {           if {$status} {           putlog "proxycheck: got host $host = ip $ip from RBL $rbl ... banning"      newchanban $channel "*@$orighost" "proxychk" "proxycheck: $rbl" $proxycheck_bantime     }  }  #if we didn't get a host, they're not in RBL}[/quote]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10682">Scarpa_SD</a> — Mon May 25, 2009 5:59 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2009-05-25T18:34:07-04:00</updated>

		<published>2009-05-25T17:44:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88946#p88946</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88946#p88946"/>
		<title type="html"><![CDATA[Proxy check]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88946#p88946"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>if {$status} { </code></pre></div>Substituted, evaluated... not interpreted. This works. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><div class="codebox"><p>Code: </p><pre><code>if {([$status]) &amp;&amp; (![matchban *@$orighost])} { </code></pre></div>Substituted, interpreted, evaluated. This doesn't... <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><br><br>Why? For some reason you put [brackets] around $status as well as the command matchban. This will cause the interpreter to treat their contents as commands. This is fine for matchban, it is a command. But this will happen after substitution of $status with it's value (which in your case, is obviously 0). This is what generates your error (it's trying to invoke the command "0", which of course doesn't exist)... <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><br><br><strong class="text-strong">Simply remove the [ ]'s around $status and it's dandy again...</strong><br>Edit: bolded the above for added effect <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Mon May 25, 2009 5:44 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Scarpa_SD]]></name></author>
		<updated>2009-05-25T17:17:23-04:00</updated>

		<published>2009-05-25T17:17:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88945#p88945</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88945#p88945"/>
		<title type="html"><![CDATA[Proxy check]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88945#p88945"><![CDATA[
I was trying to edit this script <a href="http://jamesoff.net/site/wp-content/uploads/2008/02/proxychecktcl.bz2" class="postlink">http://jamesoff.net/site/wp-content/upl ... ecktcl.bz2</a> to do global bans instead of channel specific ones because a few drones were going into multiple channels and would get 1 line of spam in before the checks went through. I changed the original code that looked like this <div class="codebox"><p>Code: </p><pre><code> # second callback (catches RBL results)proc proxycheck_check3 { ip host status nick orighost channel rbl } {  global proxycheck_bantime  if {$status} {    putlog "proxycheck: got host $host = ip $ip from RBL $rbl ... banning"    newchanban $channel "*@$orighost" "proxychk" "proxycheck: $rbl" $proxycheck_bantime  }  #if we didn't get a host, they're not in RBL </code></pre></div> into this <div class="codebox"><p>Code: </p><pre><code> # second callback (catches RBL results)proc proxycheck_check3 { ip host status nick orighost channel rbl } {  global proxycheck_bantime  if {([$status]) &amp;&amp; (![matchban *@$orighost])} {    putcmdlog "proxycheck: got host $host = ip $ip from RBL $rbl ... banning"         newban "*@$orighost" "proxychk" "proxycheck: $channel $rbl" $proxycheck_bantime         puthelp "PRIVMSG $nick :This is an automated response. You've been banned for $proxycheck_bantime from $channel because your host $host is listed at $rbl"         puthelp "PRIVMSG $nick :You will need to fix whatever caused you to be listed and get removed from $rbl before you're able to rejoin $channel ."         puthelp "PRIVMSG #opschan :$nick was banned from $channel for being listed in $rbl."        }</code></pre></div>It worked before I tried to cut down the flood it sent by having it only message the ops channel and the user once instead of every time they tried to join a channel my bot has ops in. Now I get this error from the bot  [14:17] Tcl error [proxycheck_check3]: invalid command name "0"<br>If you guys have any ideas on how to fix this I'd be very appreciative.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10682">Scarpa_SD</a> — Mon May 25, 2009 5:17 pm</p><hr />
]]></content>
	</entry>
	</feed>
