Actually knoeki, speed aside, WorldDMT's suggestion of using $exists() or $isfile() is recommended, because you want to make sure the file the script references to is there. If not, you may get an error. That's why people make checks to prevent errors from happening.
That's what the $findfile() is for.. again.. I must have had *some* reason to use that over $file() (or $isfile() or $exists() for that matter), but I really don't know why I didn't use it. May or may not have to do with the fact that I ripped this from a larger script I wrote.
could have done that, I'm sure I had a reason not to do so.
Quote
and you can replace == $null by adding "!" before the identifer
Not my style, sorry.
Quote
and remove the "()" around the condition it will make the code slower
I really doubt it matters much, and if it does, then stop using the dusty old 486 in your mums basement as your PC (:
I prefer my code to be readable over "fast", especially when there's no real significant speed gain... 1ms more or less is not going to kill you with something trivial as this.
I was also debating the use of 'isowner'; an undocumented if-condition akin to 'isop' but for mode -q on some nets. Though honestly, I don't know what networks use mode -q.
isowner doesn't work 9 out of 10 times anyways, or so I've heard.
True, and a good point. I was actually considering pasting just the alias with usage directions, but thought I'd paste the full script instead.
The rewrite of my bot makes releasing of scripts I write for it easier, so I might release more in the future.
But a whois script like this tends to easily create floods if people join at the same time...especially for a busy channel. I suppose it's ok for a small one.
Yes, but if some random botnet happens to find your channel, it's not going to be OK ;_)
Knoeki i dont think it was your script in general that crashed my mirc, its because i rn 64 bit win 7 and dialogs/picwin mess up alot. And in some cases totally unuasble.