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

	<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>2010-04-09T18:47:03-04:00</updated>

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

		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2010-04-09T18:47:03-04:00</updated>

		<published>2010-04-09T18:47:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=92781#p92781</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=92781#p92781"/>
		<title type="html"><![CDATA[using mashost/getchanhost]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=92781#p92781"><![CDATA[
The manpages for regexp, regsub and re_syntax (regular expression syntax) would be a good start.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Fri Apr 09, 2010 6:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Luminous]]></name></author>
		<updated>2010-04-09T18:19:52-04:00</updated>

		<published>2010-04-09T18:19:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=92780#p92780</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=92780#p92780"/>
		<title type="html"><![CDATA[using mashost/getchanhost]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=92780#p92780"><![CDATA[
Ah.. I didn't see that *. mssing, lol. Thanks so much for your help, you've been so patient with my newbiness. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> Looks like I really need to study up on regexp/regsub next... are there any pages you would recommend?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11101">Luminous</a> — Fri Apr 09, 2010 6:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2010-04-09T17:33:48-04:00</updated>

		<published>2010-04-09T17:33:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=92779#p92779</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=92779#p92779"/>
		<title type="html"><![CDATA[using mashost/getchanhost]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=92779#p92779"><![CDATA[
Then you are not using the code I posted. I did notice another typo in my earlier post, missing a *. in one of the hostmasks... Update posted now...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Fri Apr 09, 2010 5:33 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Luminous]]></name></author>
		<updated>2010-04-09T17:25:54-04:00</updated>

		<published>2010-04-09T17:25:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=92778#p92778</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=92778#p92778"/>
		<title type="html"><![CDATA[using mashost/getchanhost]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=92778#p92778"><![CDATA[
Oh.. no, I hadn't seen your pastebin until now. :\ Okay, I see what you were saying now... <br><br>That is still giving me the same mask type though... @*.something.something.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11101">Luminous</a> — Fri Apr 09, 2010 5:25 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2010-04-09T16:55:27-04:00</updated>

		<published>2010-04-09T16:55:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=92777#p92777</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=92777#p92777"/>
		<title type="html"><![CDATA[using mashost/getchanhost]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=92777#p92777"><![CDATA[
Now you've got unbalanced brackets... Did you check my last post on the pastebin?<br><br>Let me separate the various components:<div class="codebox"><p>Code: </p><pre><code>set expression {@.*(\.[[:alnum:]]+\.[[:alnum:]]{2,4})$}set string $hostset option1 -nocaseset option2 --set var1 aset var2 bif {[regexp $option1 $option2 $expression $string $var1 $var2]} {...#the same as this, which is exactly what I posted on the pastebin:if {[regexp -nocase -- {@.*(\.[[:alnum:]]+\.[[:alnum:]]{2,4})$} $host a b]} {}</code></pre></div>Obviously, you don't need to put each parameter in a variable, I simply did this to illustrate which part of the command is what... As I've already mentioned, in my later posts I only spoke of the regular expression (pattern), not the whole regexp command. The pattern should NOT include the variable $host, in fact, since it's enclosed with braces {}, there will in fact be no variable substitution (or command substitution for that matter), which further emphasize that you should not add $host to the pattern. As I said, within the pattern the $-sign is used to indicate the end of line, nothing else.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Fri Apr 09, 2010 4:55 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Luminous]]></name></author>
		<updated>2010-04-09T10:17:54-04:00</updated>

		<published>2010-04-09T10:17:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=92769#p92769</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=92769#p92769"/>
		<title type="html"><![CDATA[using mashost/getchanhost]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=92769#p92769"><![CDATA[
I don't understand what to do with $host then... <a href="http://paste.tclhelp.net/?id=6gb" class="postlink">http://paste.tclhelp.net/?id=6gb</a> Adding it anywhere doesn't seem to work...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11101">Luminous</a> — Fri Apr 09, 2010 10:17 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2010-04-09T07:56:03-04:00</updated>

		<published>2010-04-09T07:56:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=92765#p92765</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=92765#p92765"/>
		<title type="html"><![CDATA[using mashost/getchanhost]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=92765#p92765"><![CDATA[
No, that dollar-sign is a part of the regular expression, and represents the end of line. In your code, you've removed it, making the pattern match anything containing two to four digits after a dot, anywhere in the string - not the end of it. The $host should not be a part of the pattern, but a separate parameter to regexp.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Fri Apr 09, 2010 7:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Luminous]]></name></author>
		<updated>2010-04-09T00:07:00-04:00</updated>

		<published>2010-04-09T00:07:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=92757#p92757</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=92757#p92757"/>
		<title type="html"><![CDATA[using mashost/getchanhost]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=92757#p92757"><![CDATA[
I assume there should be a "$host" where $ is... this seems to work so far for normal hosts so far. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> Wanted to run the script by you and make sure all looked good. There were a few bracket issues I had to work out, hehe: <a href="http://paste.tclhelp.net/?id=6fv" class="postlink">http://paste.tclhelp.net/?id=6fv</a><br><br>Edit: perhaps I did that wrong because it still adds the "scrambled" hosts the same way as it before; retrieving two slots. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11101">Luminous</a> — Fri Apr 09, 2010 12:07 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2010-04-08T16:44:42-04:00</updated>

		<published>2010-04-08T16:44:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=92753#p92753</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=92753#p92753"/>
		<title type="html"><![CDATA[using mashost/getchanhost]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=92753#p92753"><![CDATA[
Well, that's because it matches {@[[:alnum:]]+\.[[:alnum:]]+(\..+)}<br><br>I'd believe the best way to find a positive match for a real domain, is to look for a valid tld (2-4 alnum characters). Probably something along these lines:<br>{@.*(\.[[:alnum:]]+\.[[:alnum:]]{2,4})$}<br><br>If it matches, it's a "real" hostname, if it does not, it's a "scrambled" one. In the latter, split on . and get the last list item [lindex [split $host .] end]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Thu Apr 08, 2010 4:44 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Luminous]]></name></author>
		<updated>2010-04-08T16:38:28-04:00</updated>

		<published>2010-04-08T16:38:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=92752#p92752</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=92752#p92752"/>
		<title type="html"><![CDATA[using mashost/getchanhost]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=92752#p92752"><![CDATA[
Ah... thanks. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>I will fix that.... in the meantime, I have noticed an issue with the regexp...<br><br>[!!Me] !voice Rancho <br>   ~!~ mode/#mychan [+v Rancho] by Mybot<br><br>Address of Rancho is: webchat@d1cf996.23e86861.3682fb09.18377e3cX<br><br>Now, when I .match Rancho, I get this:<br><br>HANDLE         PASS NOTES FLAGS           LAST<br> Rancho   no       0 g               never (nowhere)<br> HOSTS: *Rancho*!*@*.3682fb09.18377e3cX<br>] --- Found 1 match.<br><br>That @*.3682fb09.18377e3cX part is a problem, because the 3682fb09 part will change... I need it to be @*.18377e3cX, just the last part, when the address looks like that.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11101">Luminous</a> — Thu Apr 08, 2010 4:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2010-04-08T12:16:18-04:00</updated>

		<published>2010-04-08T12:16:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=92746#p92746</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=92746#p92746"/>
		<title type="html"><![CDATA[using mashost/getchanhost]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=92746#p92746"><![CDATA[
I noticed some improper/poor list operations in the code in the pastebin as well, posted an update with corrections and comments..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Thu Apr 08, 2010 12:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Luminous]]></name></author>
		<updated>2010-04-07T19:10:13-04:00</updated>

		<published>2010-04-07T19:10:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=92738#p92738</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=92738#p92738"/>
		<title type="html"><![CDATA[using mashost/getchanhost]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=92738#p92738"><![CDATA[
Update: so far, so good. I got to test it on an @*.domain.net type of address earlier. So that part definitely works. <br><br>Now that I got this working, my !devoice proc is now valid and I can hopefully get this mode +q simulation trigger to work... I will likely need help with that though, having trouble with the details...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11101">Luminous</a> — Wed Apr 07, 2010 7:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Luminous]]></name></author>
		<updated>2010-04-07T16:07:43-04:00</updated>

		<published>2010-04-07T16:07:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=92729#p92729</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=92729#p92729"/>
		<title type="html"><![CDATA[using mashost/getchanhost]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=92729#p92729"><![CDATA[
Aha, lol. Thank you very much. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> I'll test it here in a bit, hope it works.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11101">Luminous</a> — Wed Apr 07, 2010 4:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2010-04-07T15:21:21-04:00</updated>

		<published>2010-04-07T15:21:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=92728#p92728</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=92728#p92728"/>
		<title type="html"><![CDATA[using mashost/getchanhost]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=92728#p92728"><![CDATA[
Ahh, seems a space got lost in cyberspace...<br>Add a space between -- and {[...  I'll update my post in a sec or two (fix also posted on the pastebin you linked)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Wed Apr 07, 2010 3:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Luminous]]></name></author>
		<updated>2010-04-07T14:40:22-04:00</updated>

		<published>2010-04-07T14:40:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=92727#p92727</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=92727#p92727"/>
		<title type="html"><![CDATA[using mashost/getchanhost]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=92727#p92727"><![CDATA[
All right, that all makes pretty good sense, thanks. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> Here's my updated code. paste.tclhelp.net does complain about that regsub: <a href="http://paste.tclhelp.net/?id=6f7" class="postlink">http://paste.tclhelp.net/?id=6f7</a><br><br>Something else I can try there, I hope?<br><br>Will that first regexp actually do what I want? I need one adduser proc that will make a mask like: *nick*!*@*29655c0fX for addresses like someone@3d344119.1377149a.189efabc.29655c0fX and then one that does a more traditional *nick*!*@*.domain.com for others' addresses that do not have just that one last scrambled IP block.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11101">Luminous</a> — Wed Apr 07, 2010 2:40 pm</p><hr />
]]></content>
	</entry>
	</feed>
