How to IRC: Difference between revisions

From CSCWiki
Jump to navigation Jump to search
mNo edit summary
(IRC -> mattermost, yo)
Line 1: Line 1:
= IRC Setup =
= IRC Setup =


We self-host mattermost now, it's easier to use. If you know how to use IRC, we're #csc on freenode and there may or may not be a #csc bridge that relays messages between #csc and our mattermost. But #csc is now on mattermost.
[[File:Glowing-bear-screencap.png|alt=glowing-bear screen capture of #csc IRC channel|right|thumbnail|450px|A screen capture of the #csc IRC channel, as seen from glowing-bear client]]


= Mattermost Setup =
[[File:Weechat-Android-screenshot.png|alt=Weechat Android screen capture of #csc IRC channel|right|thumbnail|A screen capture of the #csc IRC channel, as seen from Weechat Android client]]


Make an account at [https://mattermost.csclub.uwaterloo.ca/signup_email our self-hosted mattermost]. For username, you can put your questid (i.e. your CSC username), although you can always set your full name as it will appear in mattermost.
This method will establish a persistent IRC sessions that you can connect to with different clients. A weechat server program running on a CSClub server will remain connected to IRC networks at all times, and simply connecting to your weechat server program will give you all the chat history upon connection.


The benefit of mattermost over slack and family is that slack stores all your information on slack's servers, wherever they are in the US. They do this so they can sell your data back to you (e.g. not allowing you to see old messages), but slack is also closed-source even though it was derived from IRC. Mattermost is open-source and hosted on CSC servers.
To set up your weechat server program:
<ol>
<li>Log in to a CS Club general-use server, such as taurine.csclub.uwaterloo.ca, and run `weechat` in such a way that it will keep running after you log out</li>


[[File:Mattermost-csc-sample.png|alt=Mattermost #csc screen capture, including a conversation between members of the channel|600px|left|thumbnail|A screen capture of the #csc channel, as seen from Mattermost desktop]]
Replace ctdalek with your username


[[File:Mattermost-phone-sample.jpg|alt=Mattermost android screenshot of #csc channel|200px|right|thumbnail|A screen capture of the #csc channel, as seen from Mattermost Android client]]
$ ssh ctdalek@taurine.csclub.uwaterloo.ca
$ screen -U weechat

A "WeeChat" window should have opened up. Type the following commands into this window, replacing [yourpassword] with a password of your choice and [yourport] with a number in the range of [28100-28400]:

> /set relay.network.password [yourpassword]
> /relay add weechat [yourport]
> /save

Once you have entered in all these commands, you don't need your terminal anymore. You can close your ssh window!

<li>Your personal WeeChat server is set up. Now connect to it using a pretty client:</li>

[http://www.glowing-bear.org/ glowing-bear] is a free and open source web-based weechat client. It works well as a desktop client, and on iOS. To connect using glowing-bear, fill in "Connection Settings" with `taurine.csclub.uwaterloo.ca`, `[yourport]`, and `[yourpassword]`. Make sure to use the http version of the website with this guide! HTTPS only works if you set up encryption. That's not covered here.

'''Recommended''': [https://play.google.com/store/apps/details?id=com.ubergeek42.WeechatAndroid Weechat Android] is a free and open source android weechat client. It gives notifications when your receive a direct message or your name is mentioned in one of the channels you are in. To connect using Weechat Android, fill in Settings > Connection with `taurine.csclub.uwaterloo.ca`, `[yourport]`, and `[yourpassword]`.

<li>Join the #csc IRC channel</li>

In your weechat client (e.g. glowing-bear or Weechat Android), switch to the 'Freenode' tab and type:

> /server add freenode chat.freenode.net/7000 -ssl -autoconnect
> /set irc.server.freenode.autojoin "#csc"
> /save
> /connect freenode

You're now connected to the main IRC network! Connected by an SSL connection, so you're super sneaky as well. Way to go.

Now, to join the CSC channel!

In your client, you'll now have two buffers that you can switch to. One is called "weechat" and the other is "freenode".

Switch to the "freenode" buffer and type:

> /join #csc

Congratulations you win!

<li>Know some IRC commands</li>

Welcome to the channel! Go ahead and say something, like

> Good morning ctdalek http://www.total-knowledge.com/~ilya/mips/ugt.html

If you want to privately message someone, use
> /q [nick] [optional message]
which will open a new tab with that person. For example `/q pj2melan ping pong`.

If you want to join another channel, use
> /join [channel]
For example `/join #csc`.
</ol>
''Note about CSClub server restarts:'' If taurine or any server you're using to run the weechat program on is restarted for any reason (we'll email you if it does), Make sure to run `screen -U weechat` again to start your server. You won't have to reconfigure weechat (step 2) though.

== Advanced, But Recommended SSL Setup ==

With the default setup, when you log in to your weechat relay using a client such as glowing-bear or Weechat Android ''your password is sent in the clear''. If you believe this to be a bad thing, follow these steps to enable SSL encryption between you and your weechat relay running on taurine.

<ol>
<li>Log in to caffeine.csclub.uwaterloo.ca to generate an SSL certificate:

<pre>
$ ssh caffeine.csclub.uwaterloo.ca
$ mkdir ~/.weechat/ssl
$ cd ~/.weechat/ssl
$ openssl req -nodes -newkey rsa:4096 -keyout relay.pem -x509 -days 365 -out relay.pem # Fill in the fields as it asks
$ exit
</pre>
</li>

<li>Tell weechat to use the new certificate you generated, and add a new relay with a different password (since your old password was likely compromised):

<p>In your weechat client (glowing-bear, or Weechat Android), run</p>

<pre>
> /set relay.network.password [newpassword]
> /relay sslcertkey
> /relay del weechat
> /relay add ssl.weechat [yourport]
</pre>
</li>

<li>Tell your client to connect to your relay using SSL:

<p>For glowing-bear, refresh and simply check the "Encryption. Check settings for help." checkbox when logging in with your new password.</p>

<p>For Weechat Android, in Settings > Connection, change Connection type to WeeChat SSL and change your Relay password.</p>
</li>

</ol>

Enjoy fully encrypted communication!

You might have warnings about untrusted certificates, but since you made the certificate yourself you can trust yourself and add required security exceptions.

= Quick Basic Setup =
1. Open up an IRC client, i.e. irssi. Launch irssi in a screen session, which you
can return to later.

$ ssh taurine.csclub.uwaterloo.ca
$ screen -U irssi

2. In irssi, connect to the freenode network and join our channel.

/connect chat.freenode.net
/join #csc

3. Please set your nickname to your Quest ID so we know who you are.

/nick $YOUR_QUEST_ID

You can register your nickname on the freenode network by messaging NickServ.

/msg NickServ REGISTER password email

4. Close your screen session, which you can return to later.

CTRL-A CTRL-D

5. Return to your screen session. You will have remained connected to the channel.

$ ssh taurine.csclub.uwaterloo.ca -t "screen -Urd"

Revision as of 18:58, 19 March 2018

IRC Setup

We self-host mattermost now, it's easier to use. If you know how to use IRC, we're #csc on freenode and there may or may not be a #csc bridge that relays messages between #csc and our mattermost. But #csc is now on mattermost.

Mattermost Setup

Make an account at our self-hosted mattermost. For username, you can put your questid (i.e. your CSC username), although you can always set your full name as it will appear in mattermost.

The benefit of mattermost over slack and family is that slack stores all your information on slack's servers, wherever they are in the US. They do this so they can sell your data back to you (e.g. not allowing you to see old messages), but slack is also closed-source even though it was derived from IRC. Mattermost is open-source and hosted on CSC servers.

Mattermost #csc screen capture, including a conversation between members of the channel
A screen capture of the #csc channel, as seen from Mattermost desktop
Mattermost android screenshot of #csc channel
A screen capture of the #csc channel, as seen from Mattermost Android client