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

	<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>2003-06-02T07:09:55-04:00</updated>

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

		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-06-02T07:09:55-04:00</updated>

		<published>2003-06-02T07:09:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=21089#p21089</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=21089#p21089"/>
		<title type="html"><![CDATA[badjoin]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=21089#p21089"><![CDATA[
Now I need to figure out a way I can match other hostmask with the $mask, some masks like *!*bla@* or *!*@*.something.com .. etc..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Mon Jun 02, 2003 7:09 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-06-02T07:02:44-04:00</updated>

		<published>2003-06-02T07:02:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=21087#p21087</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=21087#p21087"/>
		<title type="html"><![CDATA[badjoin]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=21087#p21087"><![CDATA[
Humm.. now it's working. I'll read up and see where I've screwed it up. Thanks. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Mon Jun 02, 2003 7:02 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2003-06-02T06:50:12-04:00</updated>

		<published>2003-06-02T06:50:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=21085#p21085</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=21085#p21085"/>
		<title type="html"><![CDATA[badjoin]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=21085#p21085"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>proc my:bad:join {nick uhost handle channel} {   if {![file exists $::badfile]} {     putlog "Error: $::badfile dose not exist."     return 0   }   if {![botisop $channel]} {     return   }   set mask "*!*@[lindex [split $uhost @] 1]"   if {$nick == $::botnick} {     foreach luser [chanlist $channel] {       if {$luser == $::botnick} {         continue       }       set file [open "$::badfile" r]       while {![eof $file]} {         set line [gets $file]         if {![string match "$uhost" "$line"]} {           newchanban $channel $mask BadJoin "$::badreas" $::badtime         }       }       catch {close $file}     }     return   }   set file [open "$::badfile" r]   while {![eof $file]} {     gets $file line    if {$line == ""} {       continue     }     putlog "$mask vs. $line"    if {[string match $mask* $line]} {       set found 1; break     }    }   if {![info exists found]} {    # newchanban $channel $mask BadJoin "$::badreas" $::badtime     putserv "PRIVMSG $channel :banning $nick with $mask"  }  catch {close $file} } </code></pre></div>I modified it a littlebit <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"> it works now<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Mon Jun 02, 2003 6:50 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-06-02T06:29:46-04:00</updated>

		<published>2003-06-02T06:29:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=21082#p21082</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=21082#p21082"/>
		<title type="html"><![CDATA[badjoin]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=21082#p21082"><![CDATA[
Nope. Same result..<br>on dcc:<br>(13:27:12) ::: &lt;bot&gt; [13:27] *!*@I.Have.Killed.The.Devil.So.God.Made.Me.An.Angel.org vs. *!*@I.Have.Killed.The.Devil.So.God.Made.Me.An.Angel.org<br><br>on channel:<br>(13:27:13) ::: &lt;@bot&gt; banning caesar with *!*@I.Have.Killed.The.Devil.So.God.Made.Me.An.Angel.org<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Mon Jun 02, 2003 6:29 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2003-06-02T06:25:38-04:00</updated>

		<published>2003-06-02T06:25:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=21080#p21080</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=21080#p21080"/>
		<title type="html"><![CDATA[badjoin]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=21080#p21080"><![CDATA[
well, just a single space at the end of *!*@I.Have.Killed.The.Devil.So.God.Made.Me.An.Angel.org will make it return 0, just add another vildcard to the match, like this:<div class="codebox"><p>Code: </p><pre><code>if {[string match -nocase "$mask*" $line]} {</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Mon Jun 02, 2003 6:25 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-06-02T06:12:12-04:00</updated>

		<published>2003-06-02T06:12:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=21076#p21076</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=21076#p21076"/>
		<title type="html"><![CDATA[badjoin]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=21076#p21076"><![CDATA[
1. Thanks for the loop vs. foreach tip. Removed it.<br>2. Added the -nocase and no result. Same story..<br>3. Removed it. Added the first one just to see the $mask vs. $line result.<br><br>Now it's:<div class="codebox"><p>Code: </p><pre><code>if {[string match -nocase "$mask" "$line"]} {</code></pre></div>I see it comparing: *!*@I.Have.Killed.The.Devil.So.God.Made.Me.An.Angel.org vs. *!*@I.Have.Killed.The.Devil.So.God.Made.Me.An.Angel.org and should return but it dosen't..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Mon Jun 02, 2003 6:12 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2003-06-02T05:13:56-04:00</updated>

		<published>2003-06-02T05:13:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=21070#p21070</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=21070#p21070"/>
		<title type="html"><![CDATA[badjoin]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=21070#p21070"><![CDATA[
well.. as a start.. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>1.gets only return one line at the time, so you don't need the foreach loop inside the while loop<br><br>2.You might want to add the -nocase options to the string match/equal checks(you only need the string match)<br><br>3.no need to set the mask twice in the while-loop <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Mon Jun 02, 2003 5:13 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-06-02T03:31:07-04:00</updated>

		<published>2003-06-02T03:31:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=21064#p21064</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=21064#p21064"/>
		<title type="html"><![CDATA[badjoin]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=21064#p21064"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>proc my:bad:join {nick uhost handle channel} {  if {![file exists $::badfile]} {    putlog "Error: $::badfile dose not exist."    return 0  }  if {![botisop $channel]} {    return  }  if {$nick == $::botnick} {    foreach luser [chanlist $channel] {      if {$luser == $::botnick} {        continue      }      set file [open "$::badfile" r]      while {![eof $file]} {        set line [gets $file]        if {![string match "$uhost" "$line"]} {          set mask "*!*@[lindex [split $uhost @] 1]"          newchanban $channel $mask BadJoin "$::badreas" $::badtime        }      }      catch {close $file}    }    return  }  set file [open "$::badfile" r]  while {![eof $file]} {    set lines [gets $file]    foreach line $lines {      if {$line == ""} {        continue      }      set mask "*!*@[lindex [split $uhost @] 1]"      putlog "$mask vs. $line"      if {[string match "$mask" "$line"] || [string equal "$mask" "$line"]} {        return      }      set mask "*!*@[lindex [split $uhost @] 1]"      # newchanban $channel $mask BadJoin "$::badreas" $::badtime      putserv "PRIVMSG $channel :banning $nick with $mask"    }  }  catch {close $file}}</code></pre></div>When I have in list this masks *!*@somehting.com *!*@bla.com  *!*@I.Have.Killed.The.Devil.So.God.Made.Me.An.Angel.org he "bans" me no matter if I have the *!*@I.Have.Killed.The.Devil.So.God.Made.Me.An.Angel.org hostmask. But if *!*@I.Have.Killed.The.Devil.So.God.Made.Me.An.Angel.org is the first mask in the list he dosen't ban me anymore. Any sugestions on what may be wrong in here?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Mon Jun 02, 2003 3:31 am</p><hr />
]]></content>
	</entry>
	</feed>
