Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ SMAUG coding
➜ SmaugFUSS channels
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1 2
Posted by
| Metsuro
USA (389 posts) Bio
|
Date
| Fri 09 Jun 2006 09:18 AM (UTC) |
Message
| Alright I've been looking over how the channels work and this annoys me that the channels like imm and chat take the $ code and use them... I dont see how or why someone would do that?
You chat '$s.'
Metsuro chats 'his.'
|
Everything turns around in the end | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #1 on Fri 09 Jun 2006 10:01 AM (UTC) |
Message
| It's not clear to me what you're saying. Are you asking why the channels don't parse the variables? Are you asking how to make them parse the variables? (your "how or why" is a little confusing.) |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Metsuro
USA (389 posts) Bio
|
Date
| Reply #2 on Fri 09 Jun 2006 10:32 AM (UTC) |
Message
| I am asking I meant why does it parse them already, to me its stupid to have the channels to parse them cause they arn't needed on those channels. So I would like to know how to make it not do it. |
Everything turns around in the end | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #3 on Fri 09 Jun 2006 10:43 AM (UTC) |
Message
| Oh. From your post it looked like $s wasn't parsing for you, and for Metsuro it was.
If you don't want it to parse those, just bypass the act_string function calls. (That might not be the exact name, but it's similar.)
Undoubtedly they were added in the first place because somebody saw the need for them at some point. Either that, or it was just easiest to copy/paste the code from other channels that do need the variables. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Metsuro
USA (389 posts) Bio
|
Date
| Reply #4 on Fri 09 Jun 2006 10:48 AM (UTC) |
Message
| no see its not the act() thats the problem cause say is a act too and it doesn't parse them. And on the mud I'm metsuro. Thats the output from the mud when I'm snooping someone, and what I see. |
Everything turns around in the end | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #5 on Fri 09 Jun 2006 11:18 AM (UTC) |
Message
| That's because the text in do_say's 'act' call is in the $t variable, so it doesn't get parsed. Look at how 'act' function is called in both cases and you will see the difference. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Metsuro
USA (389 posts) Bio
|
Date
| Reply #6 on Fri 09 Jun 2006 11:22 AM (UTC) |
Message
| act( AT_SAY, "&CYou say '$T'&D", ch, NULL, drunk_speech( capper(argument), ch ), TO_CHAR ); -- do_say
snprintf( buf, MAX_STRING_LENGTH, "&z[&GGM&z] &Y%s:&w %s", capitalize( ch->name ), capper(argument) );
act( AT_IMMORT, buf, ch, argument, NULL, TO_CHAR ); -- immtalk
the only thing i notice is that one is argument, NULL and the other is NULL, argument. |
Everything turns around in the end | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #7 on Fri 09 Jun 2006 11:27 AM (UTC) |
Message
| I told you already: it's the $t variable. If you looked at the code for 'act', you'd see that it takes the fifth argument (the drunk_speech one) and plugs that in for $t. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Metsuro
USA (389 posts) Bio
|
Date
| Reply #8 on Fri 09 Jun 2006 11:32 AM (UTC) |
Message
| Well I dont really much like the way the channels work in SmaugFUSS, I got used to how the were in dbsc and I dont remember which verison that was... heh. But if so, this still doesn't really explain how i can make them not parse? |
Everything turns around in the end | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #9 on Fri 09 Jun 2006 11:36 AM (UTC) |
Message
| Before understanding how to make it not parse, you need to understand how the system works in general... So, note that in 'say' it uses the 2nd argument as a format string, and the t variable tells it to use the 5th argument as the text. You can use this to pretty much immediately alter the channel handling, by having it not print the buffer, but a format string that uses the t variable and a fifth argument. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Metsuro
USA (389 posts) Bio
|
Date
| Reply #10 on Fri 09 Jun 2006 12:21 PM (UTC) |
Message
| alright my problem I guess is that the way most of the talk_channel uses act() which of course is the act_string later on, but the way it was done uses act to do the invisible setup as well? I just really dont understand i guess maybe? Or maybe I should just change all of talk_channel to the one of dbsc that uses send_to_char instead of the acts? |
Everything turns around in the end | Top |
|
Posted by
| Metsuro
USA (389 posts) Bio
|
Date
| Reply #11 on Fri 09 Jun 2006 02:08 PM (UTC) |
Message
| Well looking at it more I understand act a lot more then I did but I am still not sure how I could "bypass" act because I dont really know how it was set up with the whole invis thing. |
Everything turns around in the end | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #12 on Fri 09 Jun 2006 03:28 PM (UTC) |
Message
| Instead of using the text string as the argument to act, use "$t" as the argument and pass the text string as the fifth argument to act, similarly to how do_say does it. That will bypass the variable parsing since the $t variable contents don't get parsed. I strongly recommend against simply picking up another talk_channel and sticking it in since there's no telling if it'll actually work. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Metsuro
USA (389 posts) Bio
|
Date
| Reply #13 on Fri 09 Jun 2006 03:47 PM (UTC) |
Message
| I dont think that is possible? because not all the channels use use act like Immtalk, later down in the the function they use...
mudstrlcat( lbuf, buf, MAX_STRING_LENGTH );
I think this is what it uses to send the strings to the player?
mudstrlcat( lbuf, buf, MAX_STRING_LENGTH );
if( channel == CHANNEL_IMMTALK || channel == CHANNEL_AVTALK )
act( AT_IMMORT, lbuf, ch, sbuf, vch, TO_VICT );
else if( channel == CHANNEL_WARTALK )
act( AT_WARTALK, lbuf, ch, sbuf, vch, TO_VICT );
else if( channel == CHANNEL_RACETALK )
act( AT_RACETALK, lbuf, ch, sbuf, vch, TO_VICT );
else
act( AT_GOSSIP, lbuf, ch, sbuf, vch, TO_VICT );
this at the bottom talk_channel is the only thing I could find that sends the strings to the player in anyway using the buf. Now I thought you could do something like replace the mudstrlcat with a send_to_pager but that by itself wont work because it doesn't allow for the invis parts. So maybe i'm just missing something? |
Everything turns around in the end | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #14 on Fri 09 Jun 2006 04:05 PM (UTC) |
Message
| You're saying FUSS channels take variables like $n and makes them into "his" etc? I have stock FUSS running and mine doesn't do that... |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
52,012 views.
This is page 1, subject is 2 pages long: 1 2
It is now over 60 days since the last post. This thread is closed.
Refresh page
top