Revision 7970 on Jab 12, 2010 says: "When casting a libram skill from skills.php, do not also log its casting from the subsequent redirect to campground.php". Note that that deals with fixing the logging, not with actually casting the skill twice. I can assure you: when I was testing this back in January, the skill was NOT actually cast twice.
The OP does not include a debug log, but slyz's debug log shows a relay override script for campground.php...
- You visit the skill page, select a bookshelf skill, and cast it.
- KoLmafia submits a call to skills.php?pwd&action=Skillz&whichskill=8103&quantity=1
- KoL sends a redirect to campground.php?quantity=1&preaction=summonbrickos&pwd&skilluse=1
- KoLmafia passes the redirect down to the browser, which then submits it.
- KoLmafia intercepts call to campground.php, notices that you have campground.ash, and KoLMafiaASH.getClientHTML invokes your script.
-----Summoning #1:
- Your script calls visit_url(), which submits the URL to do the summoning.
- The request completes and KoL redirects to skills.php?message=1 with content length = 0
- visit_url returns with an empty string
- Your script returns an empty string to KoLMafiaASH.getClientHTML.
- Since your script did not return a page to send to the browser ...
-----Summoning #2
- KoLmafia submits the campground request to KoL.
- KoL responds with a redirect, which is passed down to the browser, and submited
- You see the result of the second summoning request.
You get where I'm going with this? The relay override script cast the summoning and then, when it failed to return text to KoLmafia, KoLmafia did it again.
- Perhaps the relay override script should not kick in when it is being invoked to cast a skill. You have access to individual form fields via form_field( string) or to all of them via form_fields().
- Perhaps we need to provide a way for a relay override script to recognize when visit_url resulted in a redirect and allow it to follow the redirect.
- Perhaps visit_url should automatically follow redirects and only return the final result text to the script.
- Perhaps if a relay override script returns an empty string, KoLmafia should notice that there is an unfollowed redirect and carry on from there, rather than submitting the original URL again.
Those last three "perhaps" all require changes to relay override script support. They may be desirable, but I suggest that the first is relevant regardless: if campground.php is trying to show the state of the telescope, for example, it should only take control on a page that actually shows the telescope, rather than submitting the URL for ALL campground requests - including bookshelf summons.
Edit: well, I see a lot of activity happened here while I was composing my reply.
I also had installed Bale's telescope script.
I think Bale should fix his script, as described in "perhaps" #1...
Does this also affect summons when they are made from the gCLI or from the Skill Casting tab?
No. Relay override scripts are only invoked when you submit something via the relay browser.