[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Help with chat_redirector

Help with chat_redirector

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


Posted by Lippa   (11 posts)  [Biography] bio
Date Wed 15 Feb 2012 11:24 PM (UTC)
Message
Hi,

I run the Chat_redirector plugin which send the chat to a world called Chat Window, which works fine. However, I wanted to add a similar window which just takes the Auction Data from the main world.

I literally just copy/pasted the Chat_redirector plugin - renamed it Auction_redirector and then Did a Find All/replace All in the document changing the word chat to auction. I then changed the triggers to suit my needs.

However, when I try to install the second plugin I get the error message :-

Line 22: The plugin 'Chat_Redirector' is already loaded. (Cannot load)

If I uninstall chat_redirector and install the auction_redirector it works fine, so it is not the plugin itself.

Just wondering if someone could please tell me what I am doing wrong?

Also, I cant seem to get the logging to work for the redirected window, is this possible?

Thanks in advance :)
[Go to top] top

Posted by Mleo2003   (32 posts)  [Biography] bio
Date Reply #1 on Thu 16 Feb 2012 01:04 AM (UTC)
Message
At the top of your plugin, there is a Plugin Name, and a Plugin ID. Those should be changed (the ID is necessary, the Name would just be helpful).
[Go to top] top

Posted by Lippa   (11 posts)  [Biography] bio
Date Reply #2 on Thu 16 Feb 2012 01:09 AM (UTC)

Amended on Thu 16 Feb 2012 01:10 AM (UTC) by Lippa

Message
Oh, I see! Thankyou.

Can I just change the id to anything?
It is currently:=

id="cb84a526b476f69f403517da
[Go to top] top

Posted by Mleo2003   (32 posts)  [Biography] bio
Date Reply #3 on Thu 16 Feb 2012 02:10 AM (UTC)
Message
Under the Edit Menu in Mushclient, there is an option labeled Generate Unique ID. You can use that to create a new ID that should be different from any others you may use. Of course, you could just change one character in the id (to something from 0-9 or a-f), and that would work too.
[Go to top] top

Posted by Lippa   (11 posts)  [Biography] bio
Date Reply #4 on Thu 16 Feb 2012 08:31 AM (UTC)
Message
Awesome, that works. Thanks very much.

Is there any reason that logging wont work on the two dummy world windows I now have set up?
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #5 on Thu 16 Feb 2012 08:40 AM (UTC)
Message
Lippa said:

Also, I cant seem to get the logging to work for the redirected window, is this possible?



How have you got logging configured? Redirected chats are notes, not world output.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Lippa   (11 posts)  [Biography] bio
Date Reply #6 on Thu 16 Feb 2012 09:05 AM (UTC)

Amended on Thu 16 Feb 2012 09:47 AM (UTC) by Lippa

Message
I have log notes and html checked but it is not creating the log files at all.

The logging for the main world window is working fine.
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #7 on Fri 17 Feb 2012 04:23 AM (UTC)
Message
If it isn't creating the file you may have a problem with the path, such as, it doesn't exist.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Lippa   (11 posts)  [Biography] bio
Date Reply #8 on Sat 18 Feb 2012 01:16 PM (UTC)
Message
Ive double checked and triple checked the path and it is correct.

When I click the Log session in the file menu it will work for that session but I cant get it to work automatically....

[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #9 on Sat 18 Feb 2012 07:23 PM (UTC)
Message
Auto log is triggered by a connection being established (that is, it starts logging when you connect).

Since "dummy" worlds are never connected, auto log won't kick in.

You would need to have some other way of doing it, like a plugin that opens the log file when the world is opened, not when the world is connected.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Lippa   (11 posts)  [Biography] bio
Date Reply #10 on Sat 18 Feb 2012 10:55 PM (UTC)
Message
Ahhh, thanks. I thought it might be something like that.

But if I added a plugin which just opened the log files, that wouldnt automatically make it start logging would it?
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #11 on Sun 19 Feb 2012 01:12 AM (UTC)
Message
What do you mean by "start logging"? The log file would be open but nothing would be written until the main world sent it.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Lippa   (11 posts)  [Biography] bio
Date Reply #12 on Tue 21 Feb 2012 05:51 PM (UTC)
Message
Thanks Nick. Sorry, by "start logging" I meant when the main world sent the data to that world.

I havent added a plugin to open the log files as yet, but I manually created the file (as per the autologging path spec - AuctionLog%a%d%b%Y.txt) before opening mushclient and connecting to the MUD.

However, the logging of the data still would not start until I manually clicked the Log Session in the file menu. It isnt a major problem to keep doing this, but was just wondering why?
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #13 on Wed 22 Feb 2012 03:48 AM (UTC)
Message
Lippa said:

But if I added a plugin which just opened the log files, that wouldnt automatically make it start logging would it?


The plugin would need to open the log file when the world opened. Something like this:

Template:saveplugin=OpenLogFile To save and install the OpenLogFile plugin do this:
  1. Copy between the lines below (to the Clipboard)
  2. Open a text editor (such as Notepad) and paste the plugin into it
  3. Save to disk on your PC, preferably in your plugins directory, as OpenLogFile.xml
  4. Go to the MUSHclient File menu -> Plugins
  5. Click "Add"
  6. Choose the file OpenLogFile.xml (which you just saved in step 3) as a plugin
  7. Click "Close"



<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>

<muclient>
<plugin
   name="OpenLogFile"
   author="Nick Gammon"
   id="ac6f9e1e6d36ffaf37f5573a"
   language="Lua"
   purpose="Opens the log file"
   date_written="2012-02-22 13:38:37"
   requires="4.70"
   version="1.0"
   >
<description trim="y">
<![CDATA[
Opens the configured log file when the world is opened.
]]>
</description>

</plugin>

<!--  Script  -->

<script>
<![CDATA[

function OnPluginInstall ()
local err = OpenLog ("", true)
  if err == error_code.eOK then
    ColourNote ("white", "blue", "Log file " .. GetInfo (51) .. " opened.")
  elseif err == error_code.eLogFileAlreadyOpen then
    return
  elseif GetInfo (40) == "" then
    ColourNote ("white", "red", "No auto log file specified.")
  else
    ColourNote ("white", "red", "Could not open log file: " .. GetInfo (40) .. "")
  end -- if
end -- OnPluginInstall

]]>
</script>

</muclient>


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Lippa   (11 posts)  [Biography] bio
Date Reply #14 on Fri 24 Feb 2012 10:31 PM (UTC)
Message
That worked a treat, thanks Nick!
[Go to top] 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.


26,992 views.

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

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]