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

	<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>2007-11-02T21:20:06-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Riddler]]></name></author>
		<updated>2007-11-02T21:20:06-04:00</updated>

		<published>2007-11-02T21:20:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=77408#p77408</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=77408#p77408"/>
		<title type="html"><![CDATA[A little question about &quot;string&quot; cmd]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=77408#p77408"><![CDATA[
Thanks nml375, the script works great <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=9010">Riddler</a> — Fri Nov 02, 2007 9:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-11-01T08:49:38-04:00</updated>

		<published>2007-11-01T08:49:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=77347#p77347</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=77347#p77347"/>
		<title type="html"><![CDATA[A little question about &quot;string&quot; cmd]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=77347#p77347"><![CDATA[
Your bot will automatically rejoin any channel it is supposed to monitor, should it leave the channel for any other reason then the channel being either set +inactive or removed from the channel-list.<br><br>Rather than using putserv "PART ...", considder using something like this:<div class="codebox"><p>Code: </p><pre><code>   channel set $spamdet(mc) +inactive   utimer $spamdet(gt) [list channel set $spamdet(mc) -inactive]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Thu Nov 01, 2007 8:49 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Riddler]]></name></author>
		<updated>2007-10-31T22:14:07-04:00</updated>

		<published>2007-10-31T22:14:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=77336#p77336</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=77336#p77336"/>
		<title type="html"><![CDATA[A little question about &quot;string&quot; cmd]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=77336#p77336"><![CDATA[
That's it nml375  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> , it's working  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_cool.gif" width="15" height="15" alt="8)" title="Cool"> <br>I`ve improve the code with some more facility's and run a cross a little issue with the utimer comand  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_confused.gif" width="15" height="15" alt=":?" title="Confused"> ...<br><br>The Problem:<br><blockquote class="uncited"><div>(02:44:<strong class="text-strong">58</strong>) * Parts: EGG (<a href="mailto:id@domain.name">id@domain.name</a>) (looking for clues...)<br>(02:44:<strong class="text-strong">58</strong>) * Joins: EGG (<a href="mailto:id@domain.name">id@domain.name</a>)<br>(...)<br>(02:49:<strong class="text-strong">58</strong>) * Parts: EGG (<a href="mailto:id@domain.name">id@domain.name</a>) (looking for clues...)<br>(02:49:<strong class="text-strong">58</strong>) * Joins: EGG (<a href="mailto:id@domain.name">id@domain.name</a>)<br>(...)<br>and so on...</div></blockquote>The thing is that the bot is not following the $spamdet(gt) ( time to stay gone from the channel ) .... the actual part/join is within that second  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_eek.gif" width="15" height="15" alt=":shock:" title="Shocked"> <br><br>The extended code: <br><div class="codebox"><p>Code: </p><pre><code>### CONFIG ### # main channelset spamdet(mc) "#main_channel" # alert channelset spamdet(ac) "#alert_channel"# cycle time [minutes]set spamdet(ct) "5"# gone time form the maine channel [seconds]set spamdet(gt) "40"# part messageset spamdet(pm) "looking for clues..."# except from beeing bannedset spamdet(except) {  "*!*@hostname.users.undernet.org"  "*!*@username.users.undernet.org" } ### CODE #### bind ctcp -|- * s:do:ctcp global spamdettimer $spamdet(ct) s:cycleproc s:cycle {} { global botnick spamdet   putserv "PART $spamdet(mc) :$spamdet(pm)"   utimer $spamdet(gt) [list putserv "JOIN $spamdet(mc)"]   timer $spamdet(ct) s:cycle}proc s:do:ctcp { nick uhost handle target key args } { global botnick spamdet  foreach host $spamdet(except) {    if {[string match $host "$nick!$uhost"]} {return 0}  }  if {![string equal -nocase $key "action"] &amp;&amp; !([string equal -nocase $key "dcc"] &amp;&amp; [string equal -nocase [lindex $args 0] "chat"])} {     set sms [lindex $args 0]     putserv "PRIVMSG $spamdet(ac) :\002!ATENTIE!\002: Posibil SPAM prin\002 CTCP \002de la\0032 $nick \003\[$uhost\]: $key $sms "     putserv "PRIVMSG $spamdet(mc) :.d 14 *!*@[lindex [split $uhost @] 1] Drones/BOT's are banned."  }}foreach checkutimer [utimers] {  if {[string match *cycle* [lindex $checkutimer 1]]} {  killutimer [lindex $checkutimer 2]  }}putlog "Loaded spamdet.tcl"</code></pre></div>What could be the problem ?!  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_idea.gif" width="15" height="15" alt=":idea:" title="Idea"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9010">Riddler</a> — Wed Oct 31, 2007 10:14 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-10-31T20:27:26-04:00</updated>

		<published>2007-10-31T20:27:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=77333#p77333</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=77333#p77333"/>
		<title type="html"><![CDATA[A little question about &quot;string&quot; cmd]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=77333#p77333"><![CDATA[
Considder converting spamdet(except) to a list and use a foreach loop to match each list-item against the hostmask, rather than using a "string match" on the whole content.<br><br>If the list of hosts is stored in "hostlist", you could use something like this:<div class="codebox"><p>Code: </p><pre><code>foreach host $hostlist { if {[string match $host "$nick!$uhost"]} {return 0}}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Wed Oct 31, 2007 8:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Riddler]]></name></author>
		<updated>2007-10-31T20:17:37-04:00</updated>

		<published>2007-10-31T20:17:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=77331#p77331</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=77331#p77331"/>
		<title type="html"><![CDATA[A little question about &quot;string&quot; cmd]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=77331#p77331"><![CDATA[
ok, still not working  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_exclaim.gif" width="15" height="15" alt=":!:" title="Exclamation"> <br><br>Error: <br><blockquote class="uncited"><div>(02:08:03) &lt;@EGG&gt; !ATENTIE!: Posibil SPAM prin CTCP de la Nickname [<a href="mailto:ident@hostname.users.undernet.org">ident@hostname.users.undernet.org</a>]: DCC CHAT chat 1380788232 1024 </div></blockquote>This message is not suppose to show, beacuse I`ve added the hostmask in to a except string <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><br><br>Code<br><div class="codebox"><p>Code: </p><pre><code>### CONFIG ###set spamdet(chat) "#channel"set spamdet(except) { "*!*@hostname.users.undernet.org" "*!*@username.users.undernet.org"}### CODE ####setudef flag spamdetectivebind ctcp -|- * s:do:ctcpproc s:do:ctcp { nick uhost handle target key args } { global botnick spamdet   set sms [lindex $args 0]     if {[string match *$uhost* $spamdet(except)]} { return 0 }      if {![string equal -nocase $key "action"] &amp;&amp; !([string equal -nocase $key "dcc"] &amp;&amp; [string equal -nocase [lindex $args 0] "chat"])} {        putserv "PRIVMSG $spamdet(chat) :\002!ATENTIE!\002: Posibil SPAM prin\002 CTCP \002de la\0032 $nick \003\[$uhost\]: $key $sms "      }}putlog "Loaded spamdet.tcl"</code></pre></div>Some more help ?!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9010">Riddler</a> — Wed Oct 31, 2007 8:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2007-10-31T19:18:50-04:00</updated>

		<published>2007-10-31T19:18:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=77324#p77324</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=77324#p77324"/>
		<title type="html"><![CDATA[A little question about &quot;string&quot; cmd]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=77324#p77324"><![CDATA[
<ol style="list-style-type:decimal"><li>"key" will never contain a white space</li><li>the == operand doesn't support wildcards, you must use string match to do so.</li><li>consider using string equal -nocase to begin with, when comparing string ignoring the case.</li><li>if the key is "dcc" the keyword "chat" will be in [lindex $args 0].</li><li>You can put them all into one if statement, if you use them in a statement like:<div class="codebox"><p>Code: </p><pre><code>![string equal -nocase $key "action"] &amp;&amp; !([string equal -nocase $key "dcc"] &amp;&amp; [string equal -nocase [lindex $args 0] "chat"])</code></pre></div>which should be true, in case you want them to be banned.</li></ol>PS: you might want to rename "args" to "arg", because "args" might screw the lindex or require it to be doubled. I am currently not that familiar with the ctcp bind, but I suppose it might be that way.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Wed Oct 31, 2007 7:18 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Riddler]]></name></author>
		<updated>2007-10-31T19:14:36-04:00</updated>

		<published>2007-10-31T19:14:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=77323#p77323</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=77323#p77323"/>
		<title type="html"><![CDATA[A little question about &quot;string&quot; cmd]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=77323#p77323"><![CDATA[
looks like nobody knows  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_exclaim.gif" width="15" height="15" alt=":!:" title="Exclamation">  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_eek.gif" width="15" height="15" alt=":shock:" title="Shocked"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9010">Riddler</a> — Wed Oct 31, 2007 7:14 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Riddler]]></name></author>
		<updated>2007-10-31T00:34:36-04:00</updated>

		<published>2007-10-31T00:34:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=77296#p77296</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=77296#p77296"/>
		<title type="html"><![CDATA[A little question about &quot;string&quot; cmd]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=77296#p77296"><![CDATA[
Hello guy's, <br><br>I have a little problem with a string ... How do I set a "except" on a DCC CHAT string so that I wont get banned (when I`m trying to connect  through partyline with the bot )  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"> ?<br><br>I wanna except form banning only the ctcp key's "ACTION" and "DCC CHAT" .... for the rest, I want them banned  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_exclaim.gif" width="15" height="15" alt=":!:" title="Exclamation"> <br><br> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_arrow.gif" width="15" height="15" alt=":arrow:" title="Arrow"> The Code<br><div class="codebox"><p>Code: </p><pre><code>bind ctcp -|- * s:do:ctcpproc s:do:ctcp { nick uhost handle target key args } { global botnick work_chan   if {[string tolower $key]=="action"} {return 0}   if {[string tolower $key]=="dcc*chat"} {return 0}     putserv "PRIVMSG $work_chan :.2days *!*@[lindex [split $uhost @] 1] Drones/BOT's are banned."}</code></pre></div>Any little help pls, thanks !<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9010">Riddler</a> — Wed Oct 31, 2007 12:34 am</p><hr />
]]></content>
	</entry>
	</feed>
