Kirby commented on a Page, Kirby's PasteBin Uploader/Downloader  -  May 20, 2009

[size=28]@ WorldDMT[/size]

I see that you are trying to give me helpful suggestions, but I do not agree with some of your suggestions.

line 148 "if ($did == 3) && ($regex($did(3),/[^\w-]/ig)) { did -ra PasteBin 3 $regsubex($did(3),/([^\w-])/ig,$null) }"

u can use isin and $remove dont need to use a regex for a smal thing like that

if ($did == 3) && ($chr(32) isin $did(3)) { did -ra $dname 3 $remove($v2,$chr(32)) }
In this case, I had to use $regsubex there to remove all non 123-ABC characters, excluding the character '-'. Only '\w' regex strings and - are allowed for PasteBin names. So, I can't really just remove $chr(32)...

Same with:

also for $did == 5

if ($did == 5) && ($chr(32) isin $did(5)) || (.. isin $did(5)) did -ra PasteBin 5 $replace($remove($v2,$chr(32)),..,.)
All '\w' characters and, . and -, as exceptions are allowed for sub-domain names. Thus, two subsequent periods are not allowed, but -'s are, which leads to more complication. Furthermore, I had to use many $iif's and some $regsubex there to remove all possible invalid entries.
Simple $remove is not going to help.

As for checking the error of sockets...

u dont check the error of socket?? and "if ($regex(%pb,))" u can use isin i think
All that $regex and $regsubex used for the edit boxes try to make the PasteBin paste as "valid" as possible, hence, they are the error checkers.
In fact, about 30% ~ 40% of this snippet is for error checking. The actual script itself can be written in about 100 lines.

Not to mention my code:

    if ($regex(%pb,</h1><ul><li>(.*)</li>)) || ($regex(%pb,(.*)<P>)) {

checks for invalid links...

But yes, thanks for the other suggestions, I'll take a look into them.

[size=28]@ ^Neptune[/size]

Dialog is WAY too big, it won't even fit on my screen.
Well, my screen is only 800 x 600 and it fits fine.
I'll think about compressing the dialog size.

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.