Script Registry -- for script authors; track your script usage

Veracity

Developer
Staff member
Send CDM a message, tell him what you're doing, and suggest a new field. Not to say he'll do it - or even respond any time soon - but it can't hurt to suggest it.
 

Bale

Minion
LoL!

Code:
Message 13: Registering charred for 'Rainbow Gravitation.ash'...
[COLOR="#008000"]Success! charred is now registered as a user of your 'Rainbow Gravitation.ash' script.[/COLOR]
Message 14: Registering OrochiDP for 'CounterChecker.ash'...
[B][COLOR="#ff0000"]Query strings aren't toys, you know.[/COLOR][/B]
Message 15: Registering Gneurotic for 'Universal_recovery.ash'...
[COLOR="#808000"]Gneurotic was already successfully registered for this script.[/COLOR]

Never saw that error message before.
 

zarqon

Well-known member
At this point in time I don't even recall what that error message means... perhaps a required field was missing or corrupted? I'll be able to check once I fix my laptop -- I'm 0 for 1 on fixing attempts so far.

I often like to reward hackers with funny error messages in my web apps, but the app itself isn't supposed to trigger them.

Update!

Use ZLib's process_kmail() for ridiculously fantastic justice. Also, allow unlimited commands in any order per kmail.
 

Bale

Minion
Use ZLib's process_kmail() for ridiculously fantastic justice. Also, allow unlimited commands in any order per kmail.

Argh! No! That means I'll have to update my local copy again. I've worked your registry script into an on-logon Kmail processor that also deletes old kBay mails and prints a report about non-registry new kMails so that I know if I should check my kMail box. Perhaps I'll wait a bit before I integrate your update. ;)

PHP:
string new_mess(kmessage m) {
	string oneItem() {
		foreach it in m.items return " ("+it+")";
		return "";
	}
	int gothodge() {
		foreach it in m.items
			if(it == $item[stuffed Hodgman]) return m.items[$item[stuffed Hodgman]];
		return 0;
	}
	boolean brick() {
		foreach it in m.items
			if(it == $item[brick]) return true;
		return false;
	}
	string kBaySummary() {
		if(m.message.contains_text("cashout")) return " saying you need to cashout to receive items/meat when "+(in_hardcore()? "hardcore": "ronin")+" is over.";
		if(m.message.contains_text("The winner of the auction is")) return " sending you "+m.meat+" meat.";
		foreach s in $strings[You have successfully listed a new auction, Here is everything that I owe you,
		  I will return your items to you]
			if(m.message.contains_text(s)) return " saying, \""+s+"\"";
		return "";
	}
	if(m.fromname == "Your Pen Pal" || m.fromname == "Subject 37")
		return m.fromname + oneItem();
	if(m.fromname == "kBay") return m.fromname + kBaySummary();
	if(count(m.items) > 0) {
		int hodgies = gothodge();
		if(hodgies > 0)
			return m.fromname + " -- Sending you " + (hodgies == 1? "a stuffed Hodgman.":(hodgies+" stuffed Hodgmen."));
		if(brick())
			return m.fromname + " hitting you with a brick.";
		return m.fromname + " -- sending you a gift.";
	}
	return m.fromname;
}
 

Banana Lord

Member
Running v1.7, I get "URL for 'relay_Harvest.ash' successfully modified.", and then the script shows "no" in the "URL?" column for relay_Harvest.ash.
 

stannius

Member
What is the "best practice" for naming and versioning scripts? Right now I have separate files for each version. At the top of my script I also have

stannius_spaaace_0.6.ash said:
// note to self: make sure to update the version number in all relevant places
script "stannius_spaaace_0.6.ash";
notify stannius;
import "zlib.ash";
check_version("stannius_spaaace", "stannius_spaaace", "0.6", 6969);
So, different versions are in some ways different scripts.
 

Bale

Minion
It is generally considered a good idea to leave off the version number if you're using this script. Otherwise it will become annoying later to have separate entries for each version. I'd personally just use script "spaaace"; since that is all the author needs to know. Seriously, you don't need to be reminded what your own name is and nobody else is going to get the kMail containing your script's name.

If you're interested in check_version(), that's a different thread and a completely different problem.
 

stannius

Member
It is generally considered a good idea to leave off the version number if you're using this script. Otherwise it will become annoying later to have separate entries for each version. I'd personally just use script "spaaace"; since that is all the author needs to know. Seriously, you don't need to be reminded what your own name is and nobody else is going to get the kMail containing your script's name.

If you're interested in check_version(), that's a different thread and a completely different problem.

I was posting the whole chunk for completeness and/or comparison. AFAIK the check_version part works fine. I do kinda like knowing when people are running an old version, but unless and until notify supports version numbers, not much I can do about it. OK, I'll remove the version # in the next version. I personally like reading my own name so it doesn't hurt to leave that part in right? :D
 

Bale

Minion
Does anyone ever look there except when they just lent someone an ancient ItoM and wonder, "Wait! Did I type his name correctly...."
 

roippi

Developer
I stress out so hard when sending expensive stuff. I triple check the spelling before sending AND check the outbox.
 

zarqon

Well-known member
I sent the wrong person a VIP invite once due to a mistype (never got it back, either). I've been just as careful ever since.
 

Banana Lord

Member
Is there any way I can change the capitalization of my name in registry? It comes up as "banana lord" and I'd prefer "Banana Lord". Oh yeah, I get WAY more OCD than that ;). Just idle curiosity really, if it'd require something on your end, Zarqon, don't bother :).
 

Theraze

Active member
There's apparently a script name-checking bug. I'm not sure if it's possible to come up if you don't screw up the script name like I did, but...
> registry

Registering URL for 'TheSea.ash'...
URL for 'TheSea.ash' successfully modified.
Deleting processed mail...
1 message deleted.
Printing report...
Script Registry report for Theraze: 2 scripts, 9 users.

Script Registered URL? Users
The Sea 1/14/12 yes 9
TheSea.ash 1/17/12 no 0
Everything happens to the incorrectly named "The Sea" script, not the correctly named "TheSea.ash" script. I can't set url, registrer users, anything... at this point, do I just accept that the name will be wrong? I can register and unregister on the right name, I just can't set the URL or have people actually registered to it.
 

lostcalpolydude

Developer
Staff member
Mafia will only send a message the first time someone runs the script and I used notify on my script once before so those people aren't sending me new messages, but fortunately I'd saved those mails in a text file in case I was ever curious about them. It wasn't too hard to modify your script to read in the old messages using file_to_map so I was able to get those old registrations into your database. ;)

I just decided to use this script and ran into the same issue. I ended up using visit_url after figuring out how the script works to get the registry up to date. All of the messages were in my Saved folder, but api.php has no way of reading those.
 

Bale

Minion
So? Modify the script to read from messages.php?box=Saved if you want to get them. It'll be a bit harder to modify this version of the script for that than the original pre- api.php version, but it's still doable. The question is how much you want to rescue those registrations from obscurity.
 

lostcalpolydude

Developer
Staff member
So? Modify the script to read from messages.php?box=Saved if you want to get them. It'll be a bit harder to modify this version of the script for that than the original pre- api.php version, but it's still doable. The question is how much you want to rescue those registrations from obscurity.

That would take me about a week to figure out how to parse the page. I found my own solution to include the old information, so my motivation to write anything that implements the niche feature has gone way down. Just pointing out that if someone ever gets really bored, it's something they could maybe look at.
 
Top