ASCII Table
mIRC Pastebin
Raw Numerics
User Map
User Browser
Channel Browser
IRC Junkie - IRC News (French) Scripting Website
Team Clan X Scripting Group Site mIRC Scripts Dot Com
 09 September @ 04:58am. #mirc.net @ undernet. Welcome, Guest | Sign in   
   Forums       Screenshots       Scripts       Addons       Snippets       Misc       DLLs       Tutorials       Community    
   Submit form       Download mIRC       Servers.ini       IRC News       Newbie Tutorial       Challenges       Tools    
 › snippet / $urlget()

823 downloads, 1 today


  
  Project details» View Comments » Post a comment
  Description    Independent review    Updates    Statistics    Screenshots  
» $urlget() [3.42KiB] by myggan.      
Average:      (4.5/5)
Documentation:
      (5/5)
The author has included a nicely laid out documentation that specifies the following things:
 
- Contact information.
- Installation notes.
- Explanation of syntax.
- Example usage of the snippet.
 
Everything is written in proper English, and well laid out, a good example of how any snippet's documentation should look like.
Functionality:
     (4/5)
This snippet $urlget() allows you to retrieve various parts of an url, by means of specifying a certain bitmask. The user can choose out of 8 different numbers, each of which show a different aspect of the url, like the host name, the port, the password and username (if specified), the relative path etc.
 
If no port was specified, then the snippet will try to derive it out of a pre-set list with a lot of common ports. For example http being 80, ftp being 21 etc.
 
Furthermore, since the number to be specified is a bitmask, it means you can combine multiple numbers together by adding them up. For example, if you want to see the username (2) and the password (4) you would specify 6.
 
The coding is clean, advanced, well written and structured in an easy to read way. The author names his regexes so that they wouldn't interfere with the $regml list in other scripts that the user might have loaded.
 
The only thing that was unnecessary was to include a /halt command at the end of the snippet, since there is no code following it. /return is always preferred anyway, though this does not affect the functionality of the snippet in any way.
 
I gave this snippet a functionality rating of 4, not because of the code, which is excellent, but taking into account its overall usefulness.
Design:
Not rated
This is a text based snippet, for which a design rating would not be appropriate.
Overall:
A nicely coded snippet, and although I can't think of much usages for it at this time, I'm sure some people will find it useful. Good job, myggan.
Reviewed by FiberOPtics.

  Comments 
18 Aug 2010 @ 08:43pm
postlatest outstanding,splendid,fine original, wholesale classic colorful coach handbags,chanel handbags,coach outlet,88reply reply
cheapcoachhandbags
latest outstanding,splendid,fine  original, wholesale classic colorful coach handbags,chanel handbags,coach outlet,88
 
coach outlet
 
coach handbags
 
cheap chanel handbags
 
cheap coach handbags
 
chanel handbags
 
chanel bags
 
nike shoes
 
clothing outlet
 
shox shoes
 
ed hardy t-shirts
 
coach outlet
 
coach handbags
 
chanel handbags
 
cheap coach handbags
 
cheap coach handbags
 
chanel bags
 
puma shoes
 
ed hardy clothing
 
timberland boots
 
A&F t-shirts
 
thanks very good newest latest
 
 
 

10 Jun 2010 @ 06:17am
post$urlget()reply reply
mark45678
Good Linux hosting option package offered by  ucvhost  which not only provides the best in terms of hosting packages but also believes in truly being there for the customer, 24x7. cheap vps  Moreover , they offer unlimited bandwidth as well as nearly 1GB storage along with database maintenance, email facility along with storage,availability of sub domain and many other important features for a very low price. hosting thanks
 
 
 

03 Sep 2006 @ 08:17am
post$urlget()reply reply
Altaren
I actually had an idea like this a while back, but didn't really do too much with it. It was when I was toying around with writing my own /download. Since I parsed the URL for the port and supplied "80" if none was found, then basically had it use the /filename.ext as the filename to save as if one wasn't supplied, and of course the main host for obvious reasons, and the path to the file for the use of GET.
 
This probably would have been useful back when I was writing that. Oh well, nice snippet regardless.
 
 
 

23 Jan 2006 @ 08:12pm
post$urlget()reply reply
myggan

The trailing /halt may seem unneeded and weird, but it is used to halt further processing if insufficient/invalid parameters was supplied (The last elseif clause makes it return, thus not halting). I could just have put a /halt in each of the error checking if's, but this is shorter code since that would require {} curly brackets in the if's with either newlines or pipes.
 
Whether to halt or not, I think it's proper to halt it in the case of invalid parameters, since the rest of the script may rely on the results of this identifier, thus making debugging easier.

int heartbeat = 90; bool alive = true; char you[] = "";
void pound(char null[]) { heartbeat--; if (!heartbeat) alive = false; }
int main() { while (alive) pound(you); return 0; }
 
join #Scripting and give me pleasure.
 
 

23 Jan 2006 @ 09:16pm
postRe: $urlget() [reply to myggan]reply reply
FiberOPtics
Most people don't know that halt in a script will not only stop the current script, but any higher level code that contained the code that issued the /halt. Therefore, I always opt to only return the alias with /return, thus not affecting the user's other code, which /halt inevitably does. If your snippet is used as part of some more complicated system, the user might be scratching his head why exactly his script isn't working as intended, because all code is halted, not only your alias.
 
Anyway, it's not so important, it's your snippet so you code it the way you want, the use of /halt didn't affect the rating as stated.
 
I hope you saw some of the good things I mentioned as well, not just this minor detail ;)

Just like that, he dissapeared. My guess is you'll never hear from him again.
 
 

 
23 Jan 2006 @ 09:39pm
postRe: $urlget() [reply to FiberOPtics]reply reply
myggan

heh, I do see your point. However my goal is to replicate mIRC's behaviour (mIRC also halts on invalid inputs), and an errormsg is presented so the user will know exactly what has gone wrong. Most people know (or should know) that mIRC will halt everything when you supply a built-in identifier with insufficient parameters, and since this will present an identical echo, I don't think it will be confusing at all.
 
Yeah the review was very positive, thanks a bunch :)

int heartbeat = 90; bool alive = true; char you[] = "";
void pound(char null[]) { heartbeat--; if (!heartbeat) alive = false; }
int main() { while (alive) pound(you); return 0; }
 
join #Scripting and give me pleasure.
 
 


You must be registered and logged in to be able to post comments.

Contacts & Credits  /  Contributers  /  Terms and Conditions  /  Our Logos  /  Statistics  /  Report Abuse  /  Our History  /  Advertise
Link to us:

Copyright © mIRC Scripting Network 1999-2010.
If you have found a bug, please send a pmsg to wiggle or tye (pmsg).
Page compiled in 0.147s.
48 visitors online (1 registered / 47 guests).
Using GZIP Compression.
You just ate 8.48 kb of our traffic.