You are not logged in.

#1 2017-05-28 23:19:08

Horizon_Brave
Operating System: Linux-Nettrix
Registered: 2015-10-18
Posts: 1,473

The IRSSI IRC Chat Client

Hey everyone. So I've been spending a bit more time on IRC chats as of late and found that the web based client that one particular network uses has some annoying features that I can't find how remedy. So I began to search for a replacement, and found the program irssi. By default the program uses a command line interface to the network/channels and even the chat itself.   So just for those who don't know IRC which is it's own standard, is made up of people running Networks. Then inside each network there are multiple #channels that you can connect to. (lol, I doubt most people would go through the trouble of setting up an IRC network just to run 1 channel)  Each #channel is basically the chatroom that you wish to join. So you'll see chatroom displayed like #debian, or #Horizon_Brave_Rocks. The point is these chat names are exclusive to the network that it's attached to.  The Network itself being a server on someone's machine.

Just remember what area you're in. The prompt will tell if you if you're in the #channel level, or network level, or it will show (status) if you are in the global irssi level. This 'global' level is where you would probably want to do most of the configuration that affects the customizing of irssi itself.

Took some screen shots of me setting this client up so figured I'd share...

To Start:
download it obviously. I believe the debian stable version is around the 0.8 version, while Stretch is currently frozen at 1.0.2.
I can't tell ya what the major changes are, but 1.0.2 seems like it's pretty complete, so just nab it from backports...

# irssi

1st.png
Once it launches, Using the

/HELP

2nd.png

Above is the output of the /HELP menu. A lot of different options, only a handful I'll explain here…

One complaint I have though is that the output of the commands that you issue, sort of blend together on the screen. Look below, the output from the previous /HELP command is still directly above the new command that I issued, /NETWORK LIST. There's no separation except the text "Networks:" The formatting could be a bit better…


Anyway the /NETWORK LIST command lists the default packaged networks that irssi comes shipped with.

But that's boring! I want to add the Network and channels that I want to connect to…
Okay so first let's add an entry for a Network.

/NETWORK ADD <Name of Network>

3rd.png

The Network name here can be anything, just something descriptive that will display in the list when you go to browse.  I'm adding the TWiT network to my list of networks, so I used:

/NETWORK ADD Twit.tv

4th.png

Note how I now have TWiT.tv added to the list. At this point though it's just a name of a Network, as there are no servers defined for it. Each Network will have a server address needed to be defined with it. Sooo let's get that assigned so we can actually connect to something!

/SERVER ADD -network TwiT.tv irc.twit.tv

Notice that the name of the network, has to match exactly what you put in…And I believe it's case sensitive. So it'll probably annoy me later on that I used capital T's but lower case w, and i.

Okay so we now have the Network's name, and it's server that it's using defined. Let's see if I can connect to one of their channels.

/CONNECT TwiT

This connects us to the TwiT.tv network I created using it's irc.twit.tv server address.

But…do we know the name of the exact channel that we want? Maybe, but maybe not..it'd be great to see a list of all the channels provided on a network.

/list

4th.png

This gives us the list of hosted channels.



Hmm this comes back to the formatting issue I have with this program…everything seems very jumbled. Not sure if this is a problem with the terminal I'm using, (guake).  Each channel on the network is prepended by the hash, comment sign (#). So from the above list, there's #twitlive, #unfiltered, twitlive2, etc… you can join any of these channels (chatrooms). Let's try one…for this we use the /JOIN command

/JOIN  #twitlive

6th.png

Annnnnd whammo! We're in! The chatroom looks pretty basic. I think there's a way to colorize the text…

Also for convenience sake, use the pg up and pg dn keys to scroll up and down while using irssi. Very helpful for paging through chat room history, as well as when listing channels in networks that have tons of channels, etc..

Network ID names
This configures a network to give and save a nickname for you, when you join it.

/NETWORK ADD -nick Horizon-Brave TwiT.tv

7th.png


Note that my nickname now appears when I do a /NETWORK LIST command. So when I log into the network twit, I'll be switched to the Horizon-Brave name instead of my computers KingCaesar name.
To remove the nickname you'd do:

/NETWORK ADD -nick "" TwiT.tv

Note how the ADD command is basically like an "update" command to your network listing.

So I think that's pretty much it to get up and running… below are just some optional extra features that I found… I'll update this thread with newer stuff and tips that I experiment with…

Save the config:
I'm not sure if this is needed to do each time you make a change, but you should do this atleast once so it creates the /irssi/config file.

/save


Optionals:

If you want lines containing your nick to be highlighted:

/SET hilight_nick_matches ON

which applies just to the currently connected network…


/SET hilight_nick_matches_everywhere ON

or this applies it to all networks. Use this one..it's a good feature to have!

Likewise while in chat you can get a beep from your speaker whenever you are mentioned in chat as well:

/SET beep_msg_level MSGS HILIGHT DCCMSGS

That means set the beeps for private messages, name highlights and….i'm not sure what the DCCMSGS is..but I'm sure it's important!

Create multiple windows:


/WINDOW NEW

8th.png

Likewise, you can join a channel, and have it create a separate window for it, while you can still perform commands on the main window. Pretty much like Tmux.

Change between the windows with alt-1, or alt-2 etc..



A bit messy as well but I'm trying to get used to the formatting here. This program could really make better use of spacing. Everything is just so scrunched together.

Logging:
Easiest way to start logging with Irssi is to use autologging. With it Irssi logs all channels and private messages to specified directory. You can turn it on with

/SET autolog ON

By default irssi logs to ~/irclogs//.log. You can change this with:

/SET autolog_path /home/kingcaesar/irc.log

"I have not failed, I have found 10,000 ways that will not work" -Edison

Offline

#2 2017-05-29 01:24:28

DeepDayze
Like sands through an hourglass...
From: In Linux Land
Registered: 2017-05-28
Posts: 1,901

Re: The IRSSI IRC Chat Client

Irssi is nice but I got to love Xchat and its successor Hexchat. However I'd use Irssi for times I need help and only stuck in a console (e.g. X won't start).

Thanks for sharing this. As for Guake, how well will it integrate into BL's desktop?


Real Men Use Linux

Offline

#3 2017-05-29 06:39:07

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,746

Re: The IRSSI IRC Chat Client

Subscribed.
btw: there is also cli weechat.

Offline

#4 2017-06-11 20:52:08

Horizon_Brave
Operating System: Linux-Nettrix
Registered: 2015-10-18
Posts: 1,473

Re: The IRSSI IRC Chat Client

brontosaurusrex wrote:

Subscribed.
btw: there is also cli weechat.

Yea I had two choices to either try irssi or weechat, but I went with irssi as there seems to be less documentation and usage thus far. Weechat seems like it already has a strong following… plus now that I've got it setup though, I probably won't be switching! lol, I made my choice and dug my heels in  big_smile

Configuration:

So all of your settings and configurations that you make, are found in

.irssi/config

The information here, will reflect the output of the /SET command that you do in irssi's global mode.

1st.jpg.png

2nd.png


Exiting:

Also I found that there's a few different ways and 'levels' of backing out of a #channel or leaving a server, or leaving the network, or closing the irssi completely:

/part     to leave a #channel that you are in. you can also leave a "parting" message like

/part "Later losers!"

/disconnect         remove yourself completely from the #channel, server and network. irssi still runs though.
/bye                      exits irssi gracefully
/exit                     exits abrutly


Auto Joining Servers and Channels:

So after a few launches of irssi, I was getting annoyed at typing /connect etc…. Then /join  etc…
So lets set it up so that when you launch irssi, it auto joins a specific server, and if you want to take it further, we can set it up that it joins a specific server AND a specific #channel.

First let's add a specific irc server. As a reminder you must have these irc servers already added to a network. I described that in the previous post.

So for example:

/server add -auto irc.geekshed.net 

The irc.geekshed.net is the address of the server that's running the irc server, and you're telling irssi to connect to it on startup.

*note* Make sure you /save often, just incase!

Okay, so you could stop here, and then when you re-start irssi, you'll be put onto the server, and from there you can join whatever #channel you wish. But for me I usually only frequent 1 chat or 2 most, on any particular server. So, what I'm going to do is have it so that it auto connects furthermore to a specific server AND then into a particular room.

/channel add -auto #twitlive  TWiT.tv

4thafterlist.png


The above image shows the #channel, what network it's attached to and the autojoin parameter. So after /save, reboot irssi, and what you'll see is that a window will open for each irc #channel, as well as one main window for the irssi global command line prompt. 


Poor Windowing...:

Another complaint I have with irssi, is that it doesn't make it obvious at all, that you have multiple windows open. You can flip between windows with  Alt+1, Alt+2 etc..for as many windows, but irssi doesn't really let you know this. So just a heads up. I probably need to start using screen or tmux…


Scripting!

What's pretty neat is the interactivity of irssi. Because the client is run from the terminal, that means scripts can be loaded with ease. Unfortunately (for me) from what I can garner, irssi only uses perl scripts. Since I only have the vaguest and most minute knowledge of perl scripting, most of the scripts I'll use will be premade ones sadly enough. I was really hoping that irssi could use C programs, but it doesn't appear so. But I'm sure many out there can make their own perl scripts.
The only one I have loaded currently is a nickname colorization script.

So first, at this point you should have your ~/.irssi/ directory made. We'll need to make 2 more directories.

mkdir  ~/.irssi/scripts

and then…

mkdir ~/.irssi/scripts/autorun

I think you can guess what each is for.  Once these are created, you can either go out hunting for premade perl scripts, or if you're one of "them", write your own. (I'm sure the upper ecchelon of the elite on here, know perl… sad  )
Either way, there's a ton out there currently, a lot of which though I can definitely live without…

Anyway once you find or write some that you want, either place them in the scripts or autorun directory and launch irssi.


In Irssi,  /script load <scriptname>

So for me…

/script load ~/.irssi/scripts/autorun/nickcolor.pl

To remove the script from usage:

/script unload nickcolor.pl

I think for most scripts, once loaded, you then have to restart irssi. But remember to do a /save before you do! I'm not quite sure what /save specifically saves, but I believe it's still needed.

When you do start compiling a bunch of scripts, It'll be good to see which ones you've loaded and are active on irssi and which ones aren't, you can do

/script list

afterchannel.png



One thing to note, is that because of irssi's long history it seems that some scripts that are older, no longer run very well through the built in perl engine.  I found that the log rotate script causes the perl interpreter to really throw a fit. So if you do download pre-made scripts that are older, be prepared you may have to do some editing. For me this is problematic as I don't know much (any) Perl.


"I have not failed, I have found 10,000 ways that will not work" -Edison

Offline

Board footer

Powered by FluxBB