[PENNMUSH] Preserving % at input

Talvo Hornblower talvohornblower at hotmail.com
Tue Feb 8 18:24:17 CST 2005


Hi Jason,

Instead of using 'http%0' when you trigger url_check, try using %c instead. That evaluates to the last command typed, before 
evaluation, so it should contain the exact URL they entered.

Hope that helps,
Mike Griffiths

----- Original Message ----- 
From: "Jason Newquist" <jason at nocturne.org>
To: "PennMUSH Mailing List" <pennmush at pennmush.org>
Sent: Tuesday, February 08, 2005 10:00 PM
Subject: [PENNMUSH] Preserving % at input


> Greetings!
>
> We've had a nagging problem on my social MUSH for a while now, and I thought I might present it here to see if anyone can help 
> crack it.
>
> We have some code which allows people to simply paste a URL into the MUSH, thus:
>
>  &WWW3_CMD Globals = $http*:  @tr me/url_code =
>  http%0, %N, %#
>
> &url_code then takes these arguments, adds the link to a log, and presents the output to everyone in the room.  Kinda nice.  We 
> use it a great deal.
>
> However, many URLs contain percent signs (%20 for space being infamous, and other special cases abound), and this causes our code 
> above some trouble.  According to DEBUG output, the percent signs are gone by the time we send %0 as an argument to url_code --  
> the very first time we reference it.
>
> Is there anything we can do to preserve percentages given at input time, before they're evaluated and thus vanish?
>
> Jason Newquist
> San Francisco Bay Area
> _______________________________________________
> Pennmush mailing list
> Pennmush at pennmush.org
> http://www.pennmush.org/mailman/listinfo/pennmush
> PennMUSH FAQ-o-matic! http://www.pennmush.org/cgi-penn/fom
> 


More information about the Pennmush mailing list