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
➜ alias and plugin question
|
alias and plugin question
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Linoge
(1 post) Bio
|
| Date
| Sun 21 Mar 2004 05:56 PM (UTC) |
| Message
| hi, im new to mushclient and was just getting my feet wet
experimenting with plugins. I wrote a plugin that created
an alias which would create other aliases (for different containers, etc..) everthing worked fine, the AddAlias function even returned eOk but the aliases arent being
added to world
my function looked something like this.
a little simplified but i cant get this to
work either.
function SomeFunction()
{
world.AddAlias("", "pup *", "put %1 pack", 1, "");
}
any ideas what im doing wrong?
and one other question is there any built-in way of having the values of variables created in the <script> section of a plugin persist through sessions?
Thanks, Linoge | | Top |
|
| Posted by
| Nick Gammon
Australia (23,165 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Sun 21 Mar 2004 08:35 PM (UTC) Amended on Sun 21 Mar 2004 08:36 PM (UTC) by Nick Gammon
|
| Message
| Aliases
Your AddAlias should work, it worked for me.
However your alias is added to the plugin, not to the world, so if you look at the world's alias list you won't see it.
Try typing:
/world.debug ("plugins");
That will show what aliases are in your plugins.
If that doesn't work, find out what the return code from the AddAlias is, eg.
world.Note (world.AddAlias("", "pup *", "put %1 pack", 1, ""));
If non-zero, look it up in the error code list to see what is going wrong.
Variables
If you "save state" in your plugins the variables will be saved, eg.
<plugin
name="whatever"
...
save_state="y"
...
>
|
- 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.
9,733 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top