| View previous topic :: View next topic |
| Author |
Message |
Snorly Voice
Joined: 17 Apr 2006 Posts: 25
|
Posted: Thu Apr 20, 2006 12:52 pm Post subject: !haxip |
|
|
Hello i want a script that resolved haxip to ip
example
* <nick> !haxip d5fa:166b
* <eggdrop> d5fa:166b <- is -> 213.250.22.107
tnx  |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Fri Apr 21, 2006 12:15 am Post subject: |
|
|
lol, what's haxip?
hexadecimal IP? where do you get it from? _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
Snorly Voice
Joined: 17 Apr 2006 Posts: 25
|
Posted: Fri Apr 21, 2006 11:22 am Post subject: |
|
|
u know webchat is using it ... :>
[17:21:49] * Joins: SnorWEB (d5fa166b@webchat.xs4all.nl)
-
SnorWEB is d5fa166b@webchat.xs4all.nl * [d5fa166b] CGI:IRC User
ident is hax ip :> |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Fri Apr 21, 2006 11:43 am Post subject: |
|
|
D5FA166Bh = 3589936747d
Hexadecimal to decimal, and then what? _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Fri Apr 21, 2006 2:01 pm Post subject: |
|
|
I'd "split" the 4byte hex string with string range into 4 substrings and use format to print them like that:
| Code: | | puthelp "PRIVMSG $chan :$text = [format {%d.%d.%d.%d} 0x[string range $text 0 1] 0x[string range $text 2 3] 0x[string range $text 4 5] 0x[string range $text 6 7]]" |
if the 5th character shall be a :, skip it and continue with "5 6" als indicies.
This should work because  | Quote: | [-RO^Bot-] [19:57:06] tcl: evaluate (.tcl): format %d 0x10
[-RO^Bot-] Tcl: 16 |
Edit: changed from set to puthelp example. _________________ De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens... |
|
| Back to top |
|
 |
|