MU Soapbox

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Muxify
    • Mustard

    Custom Channel System on PennMUSH?

    MU Code
    5
    11
    3411
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Roz
      Roz Banned last edited by

      Has anyone built out a softcode channel system to replace to hardcoded one for PennMUSH ever? Looking specifically for stuff like MUX's addcom functionality where you set custom aliases to talk on the channel and also the ability for channel creation to be open to players (but also having the ability to lock specific channels, like a Staff chan). Mostly curious if this is already out there and accessible. I am a VERY LOW-LEVEL CODER and I can kind of see how it would work structurally but it'd be a big project for someone at my level.

      Alternatively, a way to make our current hack for channel aliases not swallow up semicolons. 😛 Right now we just do:

      $alias *:@force me=+Channel %0
      

      Which is fine except that it naturally eats semicolons and any text after them.

      faraday 1 Reply Last reply Reply Quote 0
      • faraday
        faraday @Roz last edited by

        @Roz I don't have anything that does the addcom stuff, but using cemit() instead of an @force will probably fix your semicolon problem. You can look at my channel alias system for inspiration. (it basically lets you set up mux-style channel aliases like =pub or pub for public).

        Roz 1 Reply Last reply Reply Quote 0
        • Roz
          Roz Banned @faraday last edited by

          @faraday Lol and we're even running games with your system. I was somewhere aware of you having that tool for setting global channel aliases, I swear. Not quite the same for letting players set their own, but probably will be helpful to look at to fix our own addcom hack. Thanks!

          faraday 1 Reply Last reply Reply Quote 1
          • Mercutio
            Mercutio Creator last edited by Mercutio

            You don't even need to use @fo. You can just do:
            $alias *:+channel %0
            Or
            $alias *:@chat channel=%0

            There is also a common hardcode patch to add mux channel aliases sitting around somewhere, if you have shell access.

            Edit: https://github.com/pennmush/pennmush/issues/410

            1 Reply Last reply Reply Quote 1
            • faraday
              faraday @Roz last edited by

              @Roz Heh. It actually creates fixed commands though. So after you customize and install it, it ends up being like:

              CMD-PUB: $pub *:cemit code
              CMD-=PUB: $=pub *:cemit code

              You could conceivably have a command that did something like the channel alias +setup, only it created an individualized command on the player himself. (But that would require them being set !no_command). Always seemed like too much of a pain to manage, which is why I settled for my hacktastic alias system instead 🙂

              1 Reply Last reply Reply Quote 0
              • Roz
                Roz Banned last edited by

                @Mercutio said:

                $alias *:@chat channel=%0

                Bless you for this.

                We do have shell access so might look at the hardcode patch, but this may have just done what we wanted without having to touch the hardcode at all, so we'll see.

                1 Reply Last reply Reply Quote 1
                • Bobotron
                  Bobotron last edited by Bobotron

                  You could feasibly do it if you have, say, an OOC emit code and adjust from that.

                  Create a channel code object.
                  Create commnds to add/delete channels (add them to a master list on the object), add alias (to the character, as an attribute for the channel full name, and the attribute content is the alias, staff-locked and dark; command can be used to overwrite an old alias; just use a switch to check), join/leave commands (adds/removes alias) alias <stuff> commands, gag/ungag commands (checks against a gag list on the master code object, and when you talk on the channel, the command uses setdiff() to determine who to pemit to). You can even get creative and give it locks based on attributes on the character such as organization, type, etc.

                  You'll want to perhaps make it so that you have to use mux-style or another precursor character, or you could @hook/before it to the normal channel commands for speaking if you want to use +channel.

                  The channel attr on the object has DBREF lists of everyone who is part of that channel; at that point you just need to @pemit to an iter() or @pemit/list the attribute, with code in place to format the output to everyone on the channel.

                  We used this at a Transformers MUSH I was associated with in the early 2000s, before Megaman MUSH did their more complex radio frequency code and it spread around the circuit of games I was on.

                  Roz 1 Reply Last reply Reply Quote 0
                  • Roz
                    Roz Banned @Bobotron last edited by

                    @Bobotron Yeah, this is about the kind of structure I had in mind for a total softcoded system. I'd probably be a better coder by the end of it if I made the plunge! 😉

                    Bobotron 1 Reply Last reply Reply Quote 0
                    • Bobotron
                      Bobotron @Roz last edited by

                      @Roz
                      Sometimes you just have to take the plunge. I did back in 1999 when I wanted to open my Beast Wars game, especially after I had to fire my friend/coder who was sexually harassing female players. You'll thank yourself if you don't have a solid bunch of coders to rely on (or have something unique enough that there is no code out there for it on the intertubes).

                      1 Reply Last reply Reply Quote 0
                      • Mercutio
                        Mercutio Creator last edited by

                        If you are going to create your own, make sure to use @message and speech().
                        @message respects a lot of the locks, such as interact-lock, and makes proper spoofing easier.

                        I would not keep track of dbrefs on a master object. Use a simple lsearch() making use of lock-based searching. Example:
                        lsearch(all,etype,players,elock,chan`public:on)

                        This way, you don't have to clean up if a character is removed, or you recreate a person. lsearch() based on locks is very fast.

                        1 Reply Last reply Reply Quote 0
                        • ZekeTheG33k
                          ZekeTheG33k last edited by ZekeTheG33k

                          Never mind. Marc, beat me to it. I didn't see the link.

                          Pay no attention to me. I'm old, jaded and generally unfriendly. I am prone to fits of stupidity, but I am still unique, just like everyone else. ~~ Current President of the Anti-Faraday fan club.

                          1 Reply Last reply Reply Quote 0
                          • 1 / 1
                          • First post
                            Last post