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

	<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-10-16T09:31:23-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2003-10-16T09:31:23-04:00</updated>

		<published>2003-10-16T09:31:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=28586#p28586</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=28586#p28586"/>
		<title type="html"><![CDATA[string is alpha ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=28586#p28586"><![CDATA[
k tnx found out how to work with it yep taken me a while hehe but now i know<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Thu Oct 16, 2003 9:31 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-10-08T19:21:09-04:00</updated>

		<published>2003-10-08T19:21:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=28175#p28175</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=28175#p28175"/>
		<title type="html"><![CDATA[string is alpha ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=28175#p28175"><![CDATA[
setuser/getuser - check tcl-commands.doc for details (clue: XTRA)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Wed Oct 08, 2003 7:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2003-10-08T16:44:23-04:00</updated>

		<published>2003-10-08T16:44:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=28173#p28173</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=28173#p28173"/>
		<title type="html"><![CDATA[string is alpha ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=28173#p28173"><![CDATA[
hmm k ok i got it how can i is there a way i can set a unixtime to a user but so that it won't change ...? like an identifyer so i can call upon it when i need it or need to compare i know there is a last seen unixtime but is there a way to set second unixtime like that ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Wed Oct 08, 2003 4:44 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-10-08T13:18:38-04:00</updated>

		<published>2003-10-08T13:18:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=28163#p28163</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=28163#p28163"/>
		<title type="html"><![CDATA[string is alpha ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=28163#p28163"><![CDATA[
unixtime is the number of seconds since 00:00:00 01/01/1970. To find out if a timestamp is older than a given number of seconds, just add the number of seconds to the timestamp and compare it to the current time (or subtract them from the current time) <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=2878">user</a> — Wed Oct 08, 2003 1:18 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2003-10-08T13:12:24-04:00</updated>

		<published>2003-10-08T13:12:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=28162#p28162</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=28162#p28162"/>
		<title type="html"><![CDATA[string is alpha ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=28162#p28162"><![CDATA[
you know unixtime write it looks funny with a date you could get a normal date but how do you see if something is like 1 or 2 or 3 days old from a unixtime .. ? like euhm if something is 3 days old .. if you time stamp something with unix time you could see if something is older then .. 2 3 or even 5 days or somehing like that it should be real small script but verry usefull and i don't understand the unixtime format, not need it write now .. but i will in near futur .. so if you could make stutch a script that be great hehe don't have to ofcourse<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Wed Oct 08, 2003 1:12 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2003-10-08T13:03:13-04:00</updated>

		<published>2003-10-08T13:03:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=28161#p28161</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=28161#p28161"/>
		<title type="html"><![CDATA[string is alpha ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=28161#p28161"><![CDATA[
lol Tnx for the script, ill keep it in mind <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=3151">Ofloo</a> — Wed Oct 08, 2003 1:03 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-10-08T05:37:18-04:00</updated>

		<published>2003-10-08T05:37:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=28151#p28151</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=28151#p28151"/>
		<title type="html"><![CDATA[string is alpha ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=28151#p28151"><![CDATA[
It is actualy quite simple.<br><br>It is made up of two functions<br><br>Ip2Int<br><br>I have to confess, if you use that in a public script, you need to tag a header on<br><blockquote class="uncited"><div>#######################################<br># Source: iplib.tcl<br># oreillynet.com<br># Author: Michael Norton 04/19/2000</div></blockquote>The original function (available <a href="http://www.oreillynet.com/network/2000/04/21/multicast/iplib.html" class="postlink">HERE</a>) was designed to convert a dotted IP address (xxx.xxx.xxx.xxx) into the HEX equivilant.<br><br>I hate bianry math, so I aint got a clue on conversion, however, I do know how to work from HEX.<br><br>I simply converted it to return a 32bit unsigned int of an IP address.<br><br>This is the same number used when sending your IP and port information in a DCC chat or send message to a client. Instead of the IP, it is a 32bit int representation.<br><br>The second proc is where the real checking is done.<br><br>First it checks if the input is a valid dotted IP, only made of digits.<br><br>It then converts the IP, using my first function.<br><br>Because IP addresses translate to 23bit numbers in sequence, you can easily check if the numbers are between certain ranges.<br><br>2130706433 is the representation of 127.0.0.1<br><br>167772160 is the representation of 10.0.0.0 and 184549375 is 10.255.255.255<br><br>So anything between the two numbers is a private IP. The other two sets of numbers relate to the other two private IP ranges.<br><br>It isn't actualy that hard, provided you understand a little bit about how IPs operate. I know hardly anything, however, what I did come accross allowed me to apply it here (I actualy learnt somthing from this).<br><br>As for doing small snippets. Try me!<br><br>I don't have the time to spend on anything over 30 lines line (lucky if I make it that far), however, smaller library/helper functions I love.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Wed Oct 08, 2003 5:37 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2003-10-07T14:53:52-04:00</updated>

		<published>2003-10-07T14:53:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=28133#p28133</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=28133#p28133"/>
		<title type="html"><![CDATA[string is alpha ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=28133#p28133"><![CDATA[
omg what the hell ! ? this looks great , do you get bored often :p when you do i know plenty stuff to do lmao just kidding tnx verry mutch <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=3151">Ofloo</a> — Tue Oct 07, 2003 2:53 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2003-10-07T14:10:23-04:00</updated>

		<published>2003-10-07T14:10:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=28124#p28124</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=28124#p28124"/>
		<title type="html"><![CDATA[string is alpha ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=28124#p28124"><![CDATA[
damn! thats too hard to get <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Tue Oct 07, 2003 2:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-10-07T11:44:16-04:00</updated>

		<published>2003-10-07T11:44:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=28111#p28111</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=28111#p28111"/>
		<title type="html"><![CDATA[string is alpha ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=28111#p28111"><![CDATA[
So what, I got bored<br><div class="codebox"><p>Code: </p><pre><code>proc Ip2Int { ipDotAddr } {    foreach ipByte [split $ipDotAddr {.}] {        append hexAddr [format {%02x} $ipByte]    }    return [format {%u} "0x$hexAddr"]}proc IsPrivateIp {in} {  if {![regexp ^\[0-9\]+\.\[0-9\]+\.\[0-9\]+\.\[0-9\]+$ $ip]} { error "Invalid IP input" }  set ip [Ip2Int $in]  if {($ip == 2130706433) || \      (($ip &gt;= 167772160) &amp;&amp; ($ip &lt;= 184549375)) || \      (($ip &gt;= 2886729728) &amp;&amp; ($ip &lt;= 2887778303)) || \      (($ip &gt;= 3232235520) &amp;&amp; ($ip &lt;= 3232301055))} {    return 1  } else { return 0 }}</code></pre></div>Use the "IsPrivateIp" function, and it will return 1 if it is a private / LAN IP, or 0 if public.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Tue Oct 07, 2003 11:44 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2003-10-07T11:39:19-04:00</updated>

		<published>2003-10-07T11:39:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=28109#p28109</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=28109#p28109"/>
		<title type="html"><![CDATA[string is alpha ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=28109#p28109"><![CDATA[
if you don't mind could you xplain what you did ? or ..?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Tue Oct 07, 2003 11:39 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2003-10-07T09:14:05-04:00</updated>

		<published>2003-10-07T09:14:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=28094#p28094</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=28094#p28094"/>
		<title type="html"><![CDATA[string is alpha ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=28094#p28094"><![CDATA[
ok tnx this solves the alphas <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"> but still got check if its lan ip or local host and so on <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"> and if its a real ip of course hehe<br><br>but tnx its realy great syntax hehe<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Tue Oct 07, 2003 9:14 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[BarkerJr]]></name></author>
		<updated>2003-10-07T00:35:32-04:00</updated>

		<published>2003-10-07T00:35:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=28074#p28074</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=28074#p28074"/>
		<title type="html"><![CDATA[string is alpha ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=28074#p28074"><![CDATA[
Not really sure, but if you're trying to verify that it's an IP, I'd go with regexp.  Something like:<br>if {[regexp ^\[0-9\]+\.\[0-9\]+\.\[0-9\]+\.\[0-9\]+$ $ip]} {<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2933">BarkerJr</a> — Tue Oct 07, 2003 12:35 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2003-10-06T09:40:07-04:00</updated>

		<published>2003-10-06T09:40:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=28027#p28027</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=28027#p28027"/>
		<title type="html"><![CDATA[string is alpha ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=28027#p28027"><![CDATA[
check ip for alpha<br><br><div class="codebox"><p>Code: </p><pre><code>set ip [lindex $arg 0]if {[string is alpha $ip] == 1} {  ...}</code></pre></div>if i enter ip like this 192.168.0.1 this would result non alpha string, 192.168.0.1a will result non alpha string 192.168.0a.1 same thing non alpha string 192.168a.0.1 same thing non alpha string <br><br>but if i move the a forward 192.168.a0.1 it will see the alpha <br><br>why is that 192.168.0.1q is non alpha string it contains apha chars ??<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Mon Oct 06, 2003 9:40 am</p><hr />
]]></content>
	</entry>
	</feed>
