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
➜ Lua
➜ Chat
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Imperian_Addict
(4 posts) Bio
|
Date
| Sat 17 Dec 2005 06:13 PM (UTC) |
Message
| I just started to experiment with the great chat that mush has, but I cant figure out how to append the incomming\outgoing messages to a notepad window using Lua.
Please help me...
\Surakai | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #1 on Sun 18 Dec 2005 07:23 AM (UTC) |
Message
| I found bug in the chat callback functions when using Lua. This is under investigation, and I will post a lengthier reply tomorrow. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #2 on Wed 21 Dec 2005 01:56 AM (UTC) Amended on Wed 21 Dec 2005 01:57 AM (UTC) by Nick Gammon
|
Message
| There was probably an easy answer to that, but I decided to do it the hard way and rewrite the chat plugin in Lua.
In the process I found a couple of problems in the way Lua handled plugin callbacks, which are fixed in version 3.72.
The principle one was that the "return true" or "return false" was not being processed correctly for various complicated reasons.
The second problem was that the dates returned to Lua (such as the date of the chat session) was in the Windows date format, not the Unix date format. I have changed the way dates are returned to Lua to make them easier to display.
Shortly I will upload the Lua version of the chat plugin, which you can use. The important part, which you need to solve your problem is to uncomment a few lines in the middle of the plugin, namely, to make the OnPluginChatDisplay function look like this:
function OnPluginChatDisplay (message, sText)
--
-- We will take normal incoming and outgoing chats and emotes, and
-- display them in a notepad window, and omit them from the main window
--
if message >= 4 and message <= 9 then
AppendToNotepad ("Chats",
Replace (StripANSI (sText), "\n", "\r\n"), "\r\n")
return false
end -- if
return true -- display it
end -- function
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #3 on Wed 21 Dec 2005 03:26 AM (UTC) |
Message
| The new version of MUSHclient is now released, and the Lua chat plugin is available from the plugins download page. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | 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.
12,586 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top