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

	<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>2008-10-22T10:16:09-04:00</updated>

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

		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2008-10-22T10:16:09-04:00</updated>

		<published>2008-10-22T10:16:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85596#p85596</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85596#p85596"/>
		<title type="html"><![CDATA[Extra Characters on StrictHost Script [Help]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85596#p85596"><![CDATA[
No worries, been out of town for a while myself...<br>What you ask for, pretty much mimics the behaviour of the maskhost function. Only added/kept the nick =&gt; hostmask feature..<br>Give it a try..<div class="codebox"><p>Code: </p><pre><code>proc stricthost {target chan} { if {![string match "*@*" $target]} {  return [maskhost "[string trimleft $target "!"]![getchanhost $target $chan]"] } return [maskhost $target]}proc Ban { nick host hand chan text } { set t_list [split $text] pushmode $chan +b [stricthost [lindex $t_list 0]] putkick $chan [lindex $t_list 0]  [join [lrange $t_list 1 end]]}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Wed Oct 22, 2008 10:16 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Branden]]></name></author>
		<updated>2008-10-11T14:52:50-04:00</updated>

		<published>2008-10-11T14:52:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85507#p85507</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85507#p85507"/>
		<title type="html"><![CDATA[Extra Characters on StrictHost Script [Help]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85507#p85507"><![CDATA[
Sorry for my delayed response, the script indeed does work.<br>But.<br>It is banning; *!*IDENT@Vhost<br><br>Example: *!*<a href="mailto:Branden@NetAdmin.CyberByteCafe.Co.CC">Branden@NetAdmin.CyberByteCafe.Co.CC</a><br><br>I want it to ban; *!*@*.rest.of.vhost<br><br>Example: *!*@*.CyberByteCafe.Co.CC<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9196">Branden</a> — Sat Oct 11, 2008 2:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2008-09-30T10:05:38-04:00</updated>

		<published>2008-09-30T10:05:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85349#p85349</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85349#p85349"/>
		<title type="html"><![CDATA[Extra Characters on StrictHost Script [Help]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85349#p85349"><![CDATA[
Ahh, my bad. Thought I was checking "Scripting Help" rather than "Script Request"  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_redface.gif" width="15" height="15" alt=":oops:" title="Embarassed"><br><br>Anyway, an attempt at rewriting the code in a somewhat proper way.. I have not made any major efforts to solve some ambiguity in the code, such as wether to kick when the target is a banmask rather than a nick, or whether to test if the nick is actually present in the channel.. I cannot guarantee this will produce exactly the same behaviour as the former code, but based on my understanding of the script, the edited version should behave somewhat similar with "logical" arguments.<div class="codebox"><p>Code: </p><pre><code>proc stricthost {target chan} { if {![string match "*@*" $target]} {  set host "[getchanhost $target $chan]"  if {[string index $target 0] == "!"} {   return [maskhost "[string range $target 1 end]!$host"]  }  if {[string index $host 0] == "~"} {   return "*!*[string range $host 1 end]"  }  return "*!*$host" } return $target}proc Ban { nick host hand chan text } { set t_list [split $text] pushmode $chan +b [stricthost [lindex $t_list 0]] putkick $chan [lindex $t_list 0]  [join [lrange $t_list 1 end]]}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Tue Sep 30, 2008 10:05 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Branden]]></name></author>
		<updated>2008-09-28T15:21:45-04:00</updated>

		<published>2008-09-28T15:21:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85323#p85323</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85323#p85323"/>
		<title type="html"><![CDATA[Extra Characters on StrictHost Script [Help]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85323#p85323"><![CDATA[
To be honest, I didn't code this...<br><br>Could you please help me code it correctly?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9196">Branden</a> — Sun Sep 28, 2008 3:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2008-09-28T13:48:23-04:00</updated>

		<published>2008-09-28T13:48:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85321#p85321</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85321#p85321"/>
		<title type="html"><![CDATA[Extra Characters on StrictHost Script [Help]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85321#p85321"><![CDATA[
There are a few things in your code that makes little sense to me:<div class="codebox"><p>Code: </p><pre><code>            if {[string index $addhost 0] == "~"} {set addhost "*[string range $addhost 1 end]"}            set addhost "*$addhost" </code></pre></div>Why have the conditional if you're only going to overwrite the addhost variable anyway.. I doubt this is the cause for the "odd behaviour".<br><div class="codebox"><p>Code: </p><pre><code>   set Why [lrange $text 2 100]</code></pre></div>$text is not a list, so don't use list operations on it. Split it first like you did on the row before...<br><div class="codebox"><p>Code: </p><pre><code>        set addhost "$host[getchanhost $host $chan]"</code></pre></div>Shouldn't this be "$host![getchanhost $host $chan]", or simply [getchanhost $host $chan]?<br>At the same time, neither way makes sense with the "strict" operation further on where you prefix this with a "*", essentially making the mask "*nickuser@host" or "*nick!user@host". Seems you want $addhost to hold nick!user@host if $strict is 0, and user@host otherwize.. I'd suggest you look into this part of the code, as it may very well be the culprit of your problems...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sun Sep 28, 2008 1:48 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Branden]]></name></author>
		<updated>2008-09-28T12:02:44-04:00</updated>

		<published>2008-09-28T12:02:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85318#p85318</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85318#p85318"/>
		<title type="html"><![CDATA[Extra Characters on StrictHost Script [Help]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85318#p85318"><![CDATA[
The script below adds an extra character at the beginning of the ident!<br><br><br><div class="codebox"><p>Code: </p><pre><code>proc stricthost {host chan} {     set strict 0     if {[string index $host 0] == "!"} {         set host [string range $host 1 end]         set strict 1     }     if {![string match "*@*" $host]} {         set addhost "$host[getchanhost $host $chan]"         if {$strict == 0} {             set addhost [maskhost "*$addhost"]         } else {             if {[string index $addhost 0] == "~"} {set addhost "*[string range $addhost 1 end]"}             set addhost "*$addhost"         }         set host $addhost     }     return $host } proc Ban { nick host hand chan text } {set Who [lindex [split $text] 0]set Why [lrange $text 2 100]set thehost [stricthost $Who $chan] putquick "MODE $chan +b $thehost"putquick "KICK $chan $Who $Why"}</code></pre></div><br>The REAL host is: *!*t0xs7s@*.east.verizon.net<br>And, what the bot is banning is: *!*<strong class="text-strong">s</strong>t0xs7s@*.east.verizon.net[/code]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9196">Branden</a> — Sun Sep 28, 2008 12:02 pm</p><hr />
]]></content>
	</entry>
	</feed>
