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.
 Entire forum ➜ MUSHclient ➜ General ➜ Autologin: Built-in vs. Triggers

Autologin: Built-in vs. Triggers

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


Posted by Yasik   Ukraine  (15 posts)  Bio
Date Wed 19 Jan 2005 07:45 AM (UTC)
Message
Greetings everyone!

First of all i want to thank Mr. Gammon for making such great client. I have tested about 10 of them, but every client i used had lack of features i'd like to see in it, until i installed Mush, which has even more than i need :)

Now, to topic of post.
There is a mud (slothmud.org 6101).
There is few lines on which i wish Mush to react automatically. Here they are:

1. "By what name do you wish to be known?"
2. "Password:"
3. "Password accepted. Press return to continue..."

What i want from triggers is to send contents of variable @char_name on 1st line mentioned, contents of variable @pass_word on 2nd line mentioned and "Enter" on 3rd line mentioned.

I tried nearly all combination of triger patterns ("Regular expression" checked on/off, "Send to..." etc), options etc, but none of it worked. I know there is Autologin feature (which works correctly), but i'd like to try to make it on triggers.

I will be forever in your debt if you post here properly working triggers with pattern and 'send' parts and also notification about what checkboxes must be "checked" in Global_Preferences and World_Configuration menus or|and everywhere you think its needed. And your post will be even more valuable if you find time to test these triggers with the mud (IP and port see above).

Thanx in advance :)
Top

Posted by Ked   Russia  (524 posts)  Bio
Date Reply #1 on Wed 19 Jan 2005 05:09 PM (UTC)

Amended on Wed 19 Jan 2005 05:11 PM (UTC) by Ked

Message
First off, storing your name/password in MC variables isn't a very good idea, as it's fairly easy for someone to snatch them from there using a plugin or a code snippet. Unless of course you check the code in all the plugins you install. Having said that...

Triggers won't work, since they require a newline to match and login/password prompts aren't terminated with a newline. An easier solution would be to use a script to send the contents of your variables when the world connects to the mud. To do that you'd need to use either a plugin or a main script file, since the latter is a bit simple I'll use it as an example. The language used is vbscript. Set that as your scripting language, make sure that scripting is enabled. Then create a new text file (Notepad will work for this) and put the following there:


option explicit

sub OnWorldConnect

   Send GetVariable("char_name")
   Send GetVariable("pass_word")

end sub


Save this file with a .vbs extension somewhere in Mushclient's folder.

Then go back to the Scripting dialogue in Mushclient and put "OnWorldConnect" (without the quotes) in the "Connect:" field of the World Events box. Browse for the file you saved above and open it to set it as your script file. Click OK to close the dialogue and parse your script. Now when you connect to the mud, the first two things to get sent will be your char name and password.
Top

Posted by Shadowfyr   USA  (1,788 posts)  Bio
Date Reply #2 on Wed 19 Jan 2005 05:40 PM (UTC)
Message
Another solution is to the settings at General-Connecting.

Enter your character name and password, then place:

%name%
%password%

in the box below. Not sure if putting a blank line "enter" is possible or not. This tends to be safer that storing the values in unsecure variables.
Top

Posted by Faux   United Kingdom  (77 posts)  Bio
Date Reply #3 on Thu 20 Jan 2005 12:22 PM (UTC)
Message
To answer your actual question, there's a massive disadvantage to triggers in that using them on some muds will get you banned/deleted/.. etc.

Quote:
Triggers won't work, since they require a newline to match..

Not techically accurate any more :) Have a search of the forum.

Faux, from Discworld. Feel free to come talk to me =)

http://faux.servebeer.com/
Top

Posted by Ked   Russia  (524 posts)  Bio
Date Reply #4 on Thu 20 Jan 2005 03:23 PM (UTC)
Message
I remember reading something about being able to force newlines, or something along those lines, but as I've been using OnPluginPartialLine without any problems for awhile, I didn't pay much attention :)
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #5 on Sat 22 Jan 2005 09:49 PM (UTC)
Message
What is wrong with using the auto-login feature of MUSHclient? It just sends your name and password directly after connecting. It doesn't really matter what the MUD sends, you assume they will ask for the name and password.

- 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.


24,994 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.