Off-the-Record (OTR) for mIRC (via the ZNC-OTR module)
note: here is a tl;dr version.
Preface and Disclaimer
This is an attempt at bringing seamless Off-the-Record (OTR) functionality to mIRC. Hopefully this might get the ball rolling for someone who really knows what they're doing to put together a proper plugin for mIRC that interacts directly with the libOTR library.. rather than relying on additional software like ZNC. This is pretty much a bandaid solution. It has not been fully tested and should not be used in life or death situations.
Setup and Installation
This guide is intended for computers running mIRC on Windows.
A super simplified tl;dr version is here
Cygwin Setup
(tldr: install cygwin, add the cygwinports mirror, install libotr-devel, libotr5, libgcrypt-devel, libgcrypt20, make, znc, znc-devel, wget, nano)
Download the Cygwin installer to your Desktop.
Direct links: setup-x86.exe (for 32-bit Windows) or setup-x86_64.exe (for 64-bit Windows)
Once downloaded.. right click anywhere on your Desktop and select New > Shortcut
Enter location of the setup file you just downloaded.. e.g. C:\users\yourname\Desktop\setup-x86.exe
Click Next
Give the shortcut a name: Cygwin Setup
Click Finish
On your desktop, right click the shortcut you just created and click Properties
Add the following after the filename in the Target field: -K http://cygwinports.org/ports.gpg
(the end result should look something like: c:\users\yourname\Desktop\setup-x86.exe -K http://cygwinports.org/ports.gpg )
Click OK
Double-click the shortcut you just created.
Click Next
On the "Choose Installation Type" page, select Install from Internet and click Next
On the "Choose Installation Directory" page, type: c:\cygwin (or leave it unchanged if there is a different path entered.. but remember this path)
Click Next, Next, Next
On the "Choose Download Sites" page.. enter the following user URL: ftp://ftp.cygwinports.org/pub/cygwinports and click Add
The list will have the ftp://ftp.cygwinports.org entry highlighted -- hold down Ctrl on the keyboard and select another mirror..
(two mirrors should now be highlighted)
Click Next (wait a moment for it to download some things)
Search for: libotr
Click the + next to Libs and click skip for both libotr-devel and libotr5. \( (note -- when you click 'skip' this is because you want to install this package. clicking 'skip' readies the package to be downloaded, and the word 'skip' will change to the package version number.)
Search for: libgcrypt
Click the + next to Libs and click skip for both libgcrypt-devel and libgcrypt20.
Search for: make
Click the + next to Devel .. scroll down and click skip for make.
Search for: znc
Click the + next to Net and click skip for both znc and znc-devel.
Search for: wget
Click the + next to Web and click skip for wget.
Search for: nano
Click the + next to Editors and click skip for nano.
Click Next (wait a while for it to download everything)
It may prompt you asking to install additional dependencies -- this is fine.
Click Finish when prompted.
ZNC setup
Locate the Cygwin Terminal shortcut on your Desktop (if it was created) and open it.
If it isn't there, open c:\cygwin\bin\mintty.exe
Enter the following commands:
cd ~
mkdir znc
cd znc
wget https://github.com/mmilata/znc-otr/archive/master/znc-otr-master.tar.gz
(note: if wget throws a certificate error.. download that file via your browser and place it in c:\cygwin\home\yourname\znc -- or follow the steps here )
tar xzvf znc-otr-master.tar.gz
cd znc-otr-master
nano Makefile
Change line 6 to: LIBS="-lotr -lgcrypt" znc-buildmod $<
Save and exit by pressing: Ctrl+O, Enter, Ctrl+X
make
mv otr.so /lib/znc/otr.so
znc --makeconf
ZNC will now setup.. enter the following information:
[ ?? ] Listen on port (1025 to 65534): 1299
Important: "Listen on port" should be 1299.
[ ?? ] Listen using SSL (yes/no) [no]: no
[ ?? ] Listen using both IPv4 and IPv6 (yes/no) [yes]: yes
[ ?? ] Username (alphanumeric): zncuser
[ ?? ] Enter password: somepassword
[ ?? ] Confirm password: somepassword
[ ?? ] Nick [yournick]: yournick
Important: For now.. set Nick to a nick you aren't currently using on IRC.
[ ?? ] Alternate nick [yournick_]: yournick_
[ ?? ] Ident [yournick]:
[ ?? ] Real name [Got ZNC?]:
[ ?? ] Bind host (optional):
[ ?? ] Set up a network? (yes/no) [yes]: yes
[ ?? ] Name [freenode]: efnet
[ ?? ] Server host (host only): irc.colorsolutions.net
Important: For now.. connect directly to an IRC server.. not a remote bouncer, if you are using one.
[ ?? ] Server uses SSL? (yes/no) [no]: yes
[ ?? ] Server port (1 to 65535) [6697]: 9999
[ ?? ] Server password (probably empty):
[ ?? ] Initial channels:
[ ?? ] Launch ZNC now? (yes/no) [yes]: no
Important: "Launch ZNC now" must be no.
You can now close Cygwin. Open mIRC if it isn't open already.
Press Alt+R and select File > New
In this new document.. paste in everything from this link: http://jollo.org/LNT/doc/irc/mirc-otr.txt
Keep this script open.. don't click OK yet.
OTR Setup
There are a couple of things you need to edit for the script to function.. look in the top section and update zncuser and somepassword with the credintials you provided during ZNC setup.
Additionally.. make sure the path to znc.exe is correct. (verify by locating the file via Windows Explorer.. but dont open it yet.)
This script can be used in a couple of ways: you can use the local ZNC connection as your primary connection, or ZNC can be launched on-demand any time you want to go Off-the-Record.
- On Demand - If you are connected to a remote IRC server directly via mIRC (not via port 1299) - a pop-up menu item 'ZNC/OTR' will be available in the status and query windows which lets you jump into a new ZNC server window to begin an Off-the-Record conversation. \
- Full Time - If you are using this local ZNC as your primary connection (via port 1299) to your remote IRC server destination.. you will have the option to use OTR immediately without having to open a new server window.
It is recommended to test this script out in 'on demand' mode -- therefore don't uncomment the on *:start block in the mircscript file.
Once you are finished.. click OK.
In a status or query window - right click and select ZNC/OTR to activate ZNC in a new server window.
All OTR controls are available in a popup menu in query windows. Remember to first generate a private Key.. Right Click > OTR > Generate Key.
For more information about OTR: https://otr.cypherpunks.ca/.
Last updated September 21, 2016 by fanfare