[PENNMUSH] Preserving % at input
Andrew Brockert
andrew at mail.truffula.net
Tue Feb 8 21:36:51 CST 2005
Since you mentioned @set, I'm wondering if maybe you could do something
like @set me=temp_url:http%0 right off the bat, then work with
v(temp_url), possibly throwing in a lit(). Just a wild guess.
-- Andrew
Jason Newquist wrote:
> Hi,
>
> This could work! Usage of %c seems to be a little tricky, since if
> you use it in a command (say, to set a variable), it evaluates to the
> *variable setting command*.
>
> Can you recommend a usage which would capture $-command input?
>
> -Jason
>
>
> On Wed, 9 Feb 2005, Talvo Hornblower wrote:
>
>> 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
>>>
>> _______________________________________________
>> 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
>>
>
> 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