Skip to content
Lieven Hollevoet edited this page Sep 22, 2014 · 1 revision

toc

Instant Messengers

To use IMs with mh, you first need to create a user for mh. For the rest of this page, we'll assume that you are using aim, but the basic instructions are valid for other IMs as well.

Set the following variables in your mh.ini or mh.private.ini file:

code format="perl" net_aim_name_send=johnsmith net_aim_name=MyMisterHouseAIMUser net_aim_password=xxxxxxxxx net_aim_buddies=johnsmith, janesmith, thejones net_aim_autoconnect=1 password_allow_im=johnsmith, jamesmith net_aim_buddy_icon=$config_parms{html_dir}/graphics/mh_buddy.jpg code

  • **net_aim_name_send** is the default IM user who will receive messages from mh
  • **net_aim_name** is the name of your mh IM user
  • **net_aim_password** is the password you assigned to the user
  • **net_aim_buddies** are the names of the users that you wish to be able to see and send commands to mh (they will need to login if they aren't listed in password_allow_im)
  • **net_aim_autoconnect** tells mh to connect on startup
  • **password_allow_im** are the users that don't need to login in order to send commands to mh
  • **net_aim_buddy_icon** points to a 48x48 JPEG or GIF file to use as your mh buddy icon. This currently only works for AIM and ICQ.
Somewhere in your user code, add the following. Note that the "hook" stuff only currently works with AIM and ICQ.

code format="perl"

  1. Add a "hook" that automatically calls aol_disconnected when we lose the connection to AOL
if ($Reload) {
  &AOLim_Disconnected_add_hook(\&aol_disconnected);

}

  1. subroutine that's automatically called when we lose the connection to AOL
sub aol_disconnected {
  print "AOL got disconnected, let's try reconnecting, shall we?\n";
  &net_im_signon(undef,undef,'aol');

} code

Configuration Notes for Google Talk

First of all, if you start setting up a Jabber client from Misterhouse, first try it with your own server (so that you have access to the server logs) or use a known-working service (like Google Talk). I spent quite some time debugging mysterious SASL/Jabber module errors, and in the end it became clear that the server I tried to connect to was causing the problem.

Setting up a standard Google Talk account is easy, fill in the following parameters:

**net_jabber_name_send=**<your_account>@gmail.com&lt;/span&gt;</your_account> (MH will sent messages to this user)

    • net_jabber_name=**misterhouse (Account name that will represent your MH install)
    • net_jabber_password=**my_password (Password for the MH account)
    • net_jabber_server=**talk.google.com
    • net_jabber_resource=**Home (This is optional, but set it anyway)
    • net_jabber_tls=**1
    • net_jabber_component_name=**gmail.com
    • net_jabber_autoconnect=**1 (Optional, will ensure auto-connect and reconnect after a MH restart)
Now, first authenticate the MH user to your own account using a standard Jabber client. This will ensure that you can communicate with the MH account. Then let MH connect to the Google Talk server and verify that you can send a message to MH.

Now, before you are able to send real commands you will need to authenticate using the 'login' command. If you would like to disable that (after all, you are already authenticated to your Google Talk client) you can add the following parameter to the mh.private.ini file:

    • password_allow_im**=<your_account></your_account>@gmail.com/resource
Key here is to include the resource part after the '/', as MH strips the session from your resource, but keeps the user defined part of the resource. So if you want to control MH from your home and work jabber client, password_allow_im should look like this (assuming that you have set the resources to be 'Home' and 'Work'):
    • password_allow_im**=<your_account></your_account>@gmail.com/Home,<your_account></your_account>@gmail.com/Work

Configuration Notes for Google Talk w/ Private Domain

I took a little while to figure out the right parameters for this arrangement. Firstly, as mentioned above you will want to create another user on the domain that you host with Google through the web interface. Set a password for it. You will then need to login to that account and get through the initial setup. Then configure the MH ini file to use that new account. Here is an example of the parameters...

**net_jabber_name_send=**tom.christian@my_domain.com (Just the default name for MH to send IM to)

    • net_jabber_name=**misterhouse (Use the logon name without the domain)
    • net_jabber_password=**my_password (password for the logon name above)
    • net_jabber_server=**talk.google.com
    • net_jabber_resource=**Home (This is optional)
    • net_jabber_tls=**1
    • net_jabber_component_name=**my_domain.com (This is key -- It should be your domain, not the generic google domain)
    • net_jabber_autoconnect=**1 (optional)
Clone this wiki locally