Register forum user name Search FAQ

Gammon Forum

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 ➜ MUSHclient ➜ General ➜ Chat questions

Chat questions

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Jeffrey F. Pia   (49 posts)  Bio
Date Tue 27 Apr 2004 09:01 AM (UTC)
Message
Most of the people on my MUD use zMud, and I've been able to successfully connect to their zChat, but have had some problems:

1) How do I get ANSI colors to work?
#chat nita Test @GGreen
<CHAT> You chat to Nita, 'Test @GGreen'


2) How do I change the default color of incoming chat? It's currently all red, unlike the outgoing text which is bright cyan surrounded by red.

3) For some reason Snoop isn't working, or returning any errors.
TRACE: Trace on
#snoop Nita
TRACE: Matched alias "#snoop *"


4) Any way to get triggers to fire based on Chat text?

That's all I've got for the moment. I'm guessing it's mainly because of zMud/Mushclient incompatibilities, but I haven't ruled out user ignorance yet either. :)
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #1 on Tue 27 Apr 2004 11:38 PM (UTC)
Message
Quote:

1) How do I get ANSI colors to work?


Well, &G isn't an ANSI colour, that is a MUD colour code. What you could do would be to make a simple script that does things like replace &G with the ANSI equivalents before sending the message. See the ANSI script function that will do that, given the appropriate number.

Quote:

2) How do I change the default color of incoming chat? It's currently all red, unlike the outgoing text which is bright cyan surrounded by red.


See the chat configuration dialog.

Quote:

3) For some reason Snoop isn't working, or returning any errors.


Seems to work for me. Did you have the chat plugin installed?

Quote:

4) Any way to get triggers to fire based on Chat text?


You can't use a trigger, it isn't incoming MUD text. However the chat plugin has a callback OnPluginChatMessage - you can add code to that, to match things, and take steps. See the plugin for an example.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Jeffrey F. Pia   (49 posts)  Bio
Date Reply #2 on Wed 28 Apr 2004 09:39 AM (UTC)
Message
1) Ah gotcha... I'll have to read up on that.

2) Okay, that changed the entire line (except for the last ') to a different color. Even though it would have been nice to change only the words as opposed to the whole line, it's much better than the default color.

3) Yeah, I'm sure. The normal chat commands work, just not snoop. For what it's worth, she was able to snoop me just fine, but when I use the command it doesn't return anything at all.

4) Do I make the changes in the plugin itself? Just do an if message = 7 and send the sText to another Sub for parsing?
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #3 on Wed 28 Apr 2004 09:30 PM (UTC)
Message
Snoops


  1. What client does she use? I can try it with that.

  2. Does she have snoop enabled?

  3. It is possible that client is buggy in that it is ignoring the snoop command. I tested snooping from MUSHclient to MUSHclient.


Triggers

Actually you probably want OnPluginChatDisplay - that is the interface just before a message is displayed. You can filter it and then return FALSE to not display it (eg. if you display it yourself with a note, or if you want to ignore it).

You probably want to catch types like:


   4 Incoming Personal  
   5 Incoming Everybody 
   6 Incoming Group     


Yes, you would change the plugin itself. I would probably rename it as JeffChat.xml (on disk) or something like that, so that your changed version doesn't get overwritten next time you upgrade MUSHclient. Then use JeffChat as your plugin rather than Chat.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by MattMc   USA  (54 posts)  Bio
Date Reply #4 on Wed 09 Feb 2005 01:38 PM (UTC)
Message
Budding off of this old conversation, I have a question reguarding snoop:
Is there a way to have snoop view the world in the eyes of the player - currently it's just sending the basic MUD output to the viewer, not trigger modified. All trigger echos, substitutions, etc. are not showing up on my friends screen.

Any thoughts?

Matt
Top

Posted by Flannel   USA  (1,230 posts)  Bio
Date Reply #5 on Wed 09 Feb 2005 07:50 PM (UTC)
Message
http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=2583

If you scroll down a bit you'll see the diagram about how the client deals with snooping (and that it's sent beforehand).

You could get around it, by implimenting your own snoop system with one of the custom message numbers.
And actually, plugin packet changing might occur before the snoop, so you could work around it like that.

As for notes, you'll see (in that thread) nicks reasonings for not allowing notes to be snooped. However, you can send a chat message in addition to your notes if you have a few things you need to send. You could either just chat it, or set up your own command (chat number) to have the other client note it as well (with a callback on the recieving end).

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
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.


23,101 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.