mIRC Home    About    Download    Register    News    Help

Print Thread
#52384 03/10/03 01:09 PM
Joined: Oct 2003
Posts: 1
J
Joakim Offline OP
Mostly harmless
OP Offline
Mostly harmless
J
Joined: Oct 2003
Posts: 1
It should be a $country identifier in the next version. Then I can use it when for example someone joins a channel or something.

#52385 03/10/03 01:31 PM
Joined: Jun 2003
Posts: 384
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Jun 2003
Posts: 384
Hm. The only country-specific info you get from IRC is from the user's host address. This $country identifier wouldn't work in the event that the person has an IP address that doesn't resolve to a host name or if they have a .com or .net address, which is very common.

#52386 03/10/03 01:33 PM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
This is easy enough to script, and isn't totally reliable anyway. (Where is .com/.net/.org/.tv/.etc ?) smile

#52387 03/10/03 01:35 PM
Joined: Feb 2003
Posts: 810
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
Well, it could just return $null if it's an IP, "commercial" if it's *.com, "network" if it's *.net. This is what the scripts I've seen before do, I think it's fine, isn't it?

Iori: "This is easy enough to script, ..."
Agreed, but many built-in features are as well. This one would require a big list with countries' names etc. I know this can be considered laziness, but it's fine, why not?

Last edited by cold; 03/10/03 01:39 PM.

* cold edits his posts 24/7
#52388 03/10/03 01:47 PM
Joined: Jun 2003
Posts: 384
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Jun 2003
Posts: 384
But the whole purpose of the identifier is to obtain the country, not the network type...

#52389 03/10/03 01:51 PM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
next you'll be asking for $phonenumber and $houseaddress smirk


new username: tidy_trax
#52390 03/10/03 01:52 PM
Joined: Feb 2003
Posts: 810
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
Edit: senselessness and grammar tweaking

It's just an "unrelated" addition I've been used to see. Even returning $null as well for all these possibilities would be fine. *.com, *.net, *.org, *.tv etc. aren't common in many countries other than USA, so it's really reliable.

Last edited by cold; 03/10/03 01:57 PM.

* cold edits his posts 24/7
#52391 03/10/03 06:04 PM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Yeah, you could return "commercial" But the identifier is $country... when did Commercial become a nation?

#52392 03/10/03 06:10 PM
Joined: Feb 2003
Posts: 810
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
Again, an unrelated and dispensable addition, if it's not clear yet..


* cold edits his posts 24/7
#52393 03/10/03 06:40 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Rather than return null, I'd prefer "Commercial", "Network", "Organization", etc.


-KingTomato
#52394 03/10/03 07:20 PM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Ok, and what does it return if it's an IP? What about on networks that mask hosts? Where (for example in Unreal) it is .IP if it is a masked IP, others have a 'random' hex number, etc. It just seems utterly useless to me. I mean first off, it isn't practical. What happens if a new TLD is created? Say NewNation is officially recognized, and given .nn as the TLD. mIRC will of course have to return $null since it does not know of this TLD. The solution is to teach mIRC about this. That means mIRC is going to need something like a tlds.ini so that users can add new entries if new tlds are created.

So basically, that means we're building a 1 line script into mIRC (since it will have to have the tlds.ini that a script to do it would have anyway). So we have just added:

alias country {
return $readini(tlds.ini,tlds,$gettok($address($1,1),$numtok($address($1,1),46),46))
}

Is that really so hard it is worth doing internally?

#52395 04/10/03 03:40 AM
Joined: Feb 2003
Posts: 810
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
Well it being easy to script or not is definitely not the point. This doesn't determine anything when talking about built-in features, take $ord() as one of many examples.
About it not being applicable, these situations you mentioned are some fine examples, but they're not all. People just won't use it if it's not needed, yet other people will need it for their uses (not only IRC-related ones, BTW).
An scripted identifier would be easier than what you posted, but anyway, I can see this suggestion being used by many people without the need to be connected to each other or figure it out with their basic scripting.
So, although I don't see a real *need* for this simple feature, it's still a fair suggestion IMO.


* cold edits his posts 24/7
#52396 04/10/03 04:14 AM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
There are only two types of script I've ever seen use anything like this, the first:
"* Join/#chan: codemastr (country: United States) type of scripts.
The second:
!country .it

$ord, which you brought up, does not have merely two purposes, it can be used in a wide range of applications. Things that come to mind right now, any game scripts. "$nick is in $ord(%place) place!." Kick scripts, "You are the $ord(%kickcount) person I kicked." Virtually any counter that is displayed can make use of $ord. This is not true of $country, it exists only to serve a very specific purpose. I can't see any purposes other than the two I mentioned.

Now, if the new plan is "if even one person needs it, add it" well then don't be suprised when other common scripts are asked to be made built-in. Things I can see right now that I'm sure someone could equally make an argument for:
/thank [-sm [+ohv]] [msg]
Sends a "thank you" message on the given action, e.g.:
/thank -m +o Hey $nick thanks for the +o!
/thank -s Hey $nick thanks for $file!
/thank -m +v Hey $nick thanks for the +v!
etc.

$urldecode(text)/$urlencode(text), e.g.:
//echo -a $urldecode(http://www.something.com/%20test)
//sockwrite httpsock Location: $urlencode(the file***.ext)
etc.

$htmldecode(text)/$htmlencode(text), e.g.:
//echo -a $htmldecode(&)
//echo -a $htmlencode(&)

Those are just some examples. Would each of those be useful to some people? Of course. The thing is, their usefulness is confined to a very small set of scripts. What it comes down to is, should 99% of scripts be made slower in order to make 1% of the scripts easier to make? I don't think so. Like I said, $country has two applications that I can think of. There are literally thousands of scripts available, I think we mIRC should focus on providing features that will be useful to the masses, not to one guy.

#52397 04/10/03 04:22 AM
Joined: Feb 2003
Posts: 810
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
There are more, you just didn't see them as you said. Checking addresses other than IRC hostnames is one of them. You just can't say you know all its usages.
About the "new plan" stuff, I don't need to comment it. I was very clear when I said many people. smile

Well, no need to continue arguing, it just wouldn't stop.


* cold edits his posts 24/7
#52398 04/10/03 04:30 AM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Quote:
There are more, you just didn't see them as you said. Checking addresses other than IRC hostnames is one of them.

Yeah that's called a nonparticular hypothetical use. I'm talking about real applications. Give me an example when you'd want to do that. A "type in a host and I'll tell you the country" script? Well thats the same thing as !country, it's just got a few more bells and whistles.

Quote:
You just can't say you know all its usages.

I never said I know all the uses, I said the uses I could think of, however you haven't provided any other uses, so all you've done is support what I've said.

Quote:
I was very clear when I said many people.

Yeah, you were very clear, but just because you are clear doesn't mean you are right. I can very clearly state that the earth is flat. That, however, doesn't make it so. Again I say, provide proof. Show me existing scripts where people wrote their own $country and are using it for things differently than I said. I doubt you could find any such scripts.

If I'm wrong, that's fine, but prove me wrong, don't simply say "I think you're wrong and I'm not going to show you how." If I'm wrong, show me how and why I'm wrong with some real evidence.

#52399 04/10/03 04:43 AM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Thank you for not reading my message at all and instead replying with statements that have nothing to do with what I've said.

Why should we end it btw? Because you don't want to take the time to substantiate your claims? If you can't provide facts, don't pretend to have them. It's not my fault if you make a claim that you can't back up with facts.

#52400 04/10/03 04:45 AM
Joined: Feb 2003
Posts: 810
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
So now I should prove that I've seen many people using a country identifier? LOL grin

You see bells and whistles in a !country thing or the example I did, then is it automatically not something valuable for anyone? Well, I see bells and whistles in your $ord() example, but I won't ask you to "prove" me that it's worth it - I already know it has its place, the same place a $country identifier would have, IMO.

End of discussion.


* cold edits his posts 24/7
#52401 05/10/03 10:34 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Wouldnt it be $country pulled that data from what country you set windows (if your using it) up to be in, rather than trying to chop up some ip addy, ok so 75% of pc's on earth not in the USA are likely set to be there anyway, well pooha, I have to admit i cant think of a usefull aplication for $country either! Just thought id mention that i thought he ment the setup country on the pc, rather than his isp

#52402 05/10/03 10:58 AM
Joined: Feb 2003
Posts: 810
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
It's not only his isp, it's any hostname entered.


* cold edits his posts 24/7

Link Copied to Clipboard