This is a whois tracker and IP locator in one. You can have it tell you the locationof their IP or not ( toggleable ). You must have the +W usermode and be an IRCop.
Will show in your Status Window and @Whois as
[00:06] [/whois] MrMorden [IP.Is.Here] did a /whois on you.
If the IP locator is on it will shows as the below in both places mentioned above.
[00:07] [/whois] MrMorden [IP.Is.Here] did a /whois on you.
menu Status {
Whois Ip Info
. $iif(%WhoisIPInfo,Off,On) : $iif(!%WhoisIPInfo,set %WhoisIPInfo on, unset %WhoisIPInfo)
}
on ^*:snotice:*whois*: { if ($6 === /whois) { .enable #snoticewhois | whois $2 $2 | haltdef } }
#snoticewhois off
raw *:*: {
$iif(!$window(@Whois),window -znk0 @Whois)
if ($numeric == 378) { set %snoticewhoisIP $7 | haltdef }
if ($istok(310 311 312 313 317 318 319 320 330 335 379,$numeric,32)) { haltdef }
else {
echo 7 -s $timestamp $+([,/whois,]) $2 $+([,%snoticewhoisIP,]) did a /whois on you.
if (%WhoisIPInfo) { if (!$sock(IPwhois)) { whoisip %snoticewhoisIP } }
aline -p @Whois $asctime $+([,/whois,]) $2 $+([,%snoticewhoisIP,]) did a /whois on you.
haltdef
.timer -d 1 1 unset %snoticewhoisIP | .timer -d 1 1 .disable #snoticewhois
}
}
#snoticewhois end
alias whoisip { set %ipnumber $1 | sockopen IPwhois www.melissadata.com 80 }
on *:sockopen:IPwhois: {
sockwrite -n $sockname GET $+(/lookups/iplocation.asp?ipaddress=,%ipnumber) HTTP/1.1
sockwrite -n $sockname Host: www.melissadata.com
sockwrite -n $sockname Connection: close
sockwrite -n $sockname Authorization: Basic
sockwrite -n $sockname $crlf
}
on *:sockread:IPwhois: {
sockread %iptemp
if (align='left'><b> isin %iptemp) { inc %tt 1 | set %ipinfo $+ %tt $remove($nohtml(%iptemp),$chr(9)) }
}
on *:sockclose:IPwhois: {
echo 7 -s $timestamp $&
[IP]: $removecs(%ipinfo1,$(IP Address)) $&
[City]: $removecs(%ipinfo2,City) $&
[State/Region]: $removecs(%ipinfo3,$(State or Region)) $&
[Country]: $removecs(%ipinfo4,Country) $&
[ISP]: $removecs(%ipinfo5,ISP)
aline -p @Whois $asctime $&
[IP]: $removecs(%ipinfo1,$(IP Address)) $&
[City]: $removecs(%ipinfo2,City) $&
[State/Region]: $removecs(%ipinfo3,$(State or Region)) $&
[Country]: $removecs(%ipinfo4,Country) $&
[ISP]: $removecs(%ipinfo5,ISP)
unset %ip* %tt
}
alias nohtml {
var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x, )
return %x
}
Dean: "i will remind that, when u do one of urs "it could be" in someone snippets"
While he does do that, he certainly does not call other snippets "crap." Yes, you did show another method, so I have no quarrels there.
But stop being so short-fused, there is no need for so much hate for a mirc scripting community.
I don't care if you're a good scripter or not, just don't be so rude.
really nice job Scakk 10/10 +like
Don't worrie about people like that. People like them are nothing more then self absorbed egotistical morons.
To the rest of us reading their comments just remember their comments.."Are a tale told by an idiot, full of sound and fury, signifying nothing.
again really good job on this sippet.
Scakk, the above post by Dean has just concluded for the coward who lowered your snippet, not to mention he claimed your snippet as a "crap" to begin with. This coward has a high level of self-insecurity and ego. He thinks everyone who opposes his comments is a personal enemy to him (that we're an imaginary gang who attempts to overthrow him), and that he'll evaluate his or her work for being a fraud. Worse yet, he thinks everyone, OTHER than himself, who codes in MSL and offers suggestions is acting as a show-off or expert.
This is not technically his fault but his problematic, failed upbringing.
Now, he may reply and say in his feisty defense, "I wasn't the one followed by calling you a rude name" and be a ticking bomb for you to defuse.
You just have to learn to let go and ignore a cowardly troll like him.
The "someone" who rated your snippet a one is a coward, and those with cowardice aren't likely to make themselves reachable for a proper explanation and will usually remain in denial.
This happens to me a number of times for my own snippets, where I've had gotten high ratings, then out of the blue, someone else came along and lowered them out of spite because of his or her personal issues toward me.
It's a bad taste that "someone" has taken Hawkee's rating system as a way for an irresponsible self-gratification.
I can make assumptions as to who it was and possibly be right or wrong. I just hoped the person who rated it a 1 had the courage to actually admit to doing so, else they are just rating it out of spite and therefore make me wonder if thet truelly understand the code itself.
By the way I would liek to thank napa and Jethro for their ratings and +likes.
What you've demonstrated here is very similarily typical to napa, sunslayer and I have been doing with sockets before you've submitted your first-ever post regarding sockets at Hawkee.
so you're saying that i copied his ideas? so probably, no one on world, just thought before, in do a socket like this, just napa and sunslayer, by the way, you just 4 days "old" here than me, i made many sockets, and watch many things here on hawkee, i just never posted before
i've learned alot, and read many tutorials before start on sockets, but i dont think, that we just do bad comments in someone snippet, if we dont know do it better than him, as Scakk did
im not interested in what u do or dont Jethro_, dont try to show to others that you're better than other ppl
Regardless of what's a better method or not, scakk wants his socket coding style kept as reserved as intended when he's made it.
i will remind that, when u do one of urs "it could be" in someone snippets
Dean, as I have said time and again, you're imagining things. No one's claimed he or she's an elite or expert. You're putting "names" in people's mouths. You need to get rid of such absurd mentality of yours.
Regardless of what's a better method or not, scakk wants his socket coding style kept as reserved as intended when he's made it. We should accommodate that and improve it with our courteous suggestions and whatnot. We do not belittle someone's work and throw it away and then replace it with our examples...unless the script by itself is a total disaster.
Did you first start at socket like you do now? I think not. You must have learned from others' methods and taken their approaches as you preferred format when making a socket script, along with some of your ideas. What you've demonstrated here is very similarly typical to napa, sunslayer and I have been doing with sockets before you've submitted your first-ever post regarding sockets at Hawkee.
P.S. I use sockclose event from time to time; are you gonna tell me I shouldn't just because you think so?
I am no expert at mIRC scripting, I just see things a different way than most do it seems as I do things an odd way. I figure as long as it works and does what you want it to then all is well. If there are better ways to do things then by all means show me , or others , so people can learn and grow in their scripting.
I use the sockclose event as that is how I learned sockets and I am to lazy to alter it now :P
when Scakk commented on my snippets, i thought he was an expert
cause he commented many things about it
this is a edit for the socket part
where no need the on sockclose event, and will return the same thing
alias whoisip { sockopen IPwhois www.melissadata.com 80 | sockmark ipwhois $$1 }
on *:sockopen:IPwhois: {
var %x sockwrite -n $sockname
%x GET $+(/lookups/iplocation.asp?ipaddress=,$sock(ipwhois).mark) HTTP/1.1
%x Host: $sock(ipwhois).addr
%x Connection: close
%x Authorization: Basic
%x $crlf
}
on *:sockread:IPwhois: {
sockread %iptemp
if $regex(%iptemp,/<td class='columresult'>(.+)<\/td><td align='left'><b>(.+)<\/b><\/td><\/tr>/g) {
echo -a $timestamp $+([,$regml(1),],:) $remove($regml(2), ,$chr(9))
$iif($window(@whois), aline -p @whois $timestamp $+([,$regml(1),],:) $remove($regml(2), ,$chr(9)))
}
}
Dean, please don't be disrespectful to our fellow members here at Hawkee. Be nice when offering your input. You don't call someone's work a "crap," at least not in an ignorant sense of yours. This is what I meant by catching you "starting a fire" at someone's thread. You're in the wrong first.
Scakk, nice work and don't let anyone tell you otherwise. :-) We're here to learn and encourage each other to be better.