Edit History Actions Discussion

Diff for "Howto/IRC"

Differences between revisions 15 and 16
Revision 15 as of 2007-11-21 15:49:02
Size: 5855
Comment: autosendcmd
Revision 16 as of 2008-02-17 20:00:59
Size: 5858
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
[[TableOfContents()]] <<TableOfContents>>
Line 6: Line 6:
In this lesson, you will learn how to make some basic usage out of your new shell account. We will concentrate on how to connect to IRC with the IRC-client [http://www.irssi.org/ irssi] and how to stay connected even when your computer is turned off via a helper program called [http://www.gnu.org/software/screen/ screen]. In this lesson, you will learn how to make some basic usage out of your new shell account. We will concentrate on how to connect to IRC with the IRC-client [[http://www.irssi.org/|irssi]] and how to stay connected even when your computer is turned off via a helper program called [[http://www.gnu.org/software/screen/|screen]].
Line 33: Line 33:
To learn more about screen, take a look at the [:Howto/Screen: Screen Howto]. To learn more about screen, take a look at the [[Howto/Screen| Screen Howto]].
Line 97: Line 97:
 * ["FAQ/DeadScreen"] - What to do when you can't resume a screen because it's "dead".
 * ["FAQ/Unicode"] - Enable unicode to make local characters work properly.
 * ["Howto/Screen"] - More on how to use screen.
 * [[FAQ/DeadScreen]] - What to do when you can't resume a screen because it's "dead".
 * [[FAQ/Unicode]] - Enable unicode to make local characters work properly.
 * [[Howto/Screen]] - More on how to use screen.

Howto: IRC

Screen + irssi = <3

In this lesson, you will learn how to make some basic usage out of your new shell account. We will concentrate on how to connect to IRC with the IRC-client irssi and how to stay connected even when your computer is turned off via a helper program called screen.

Screen

Start by logging in to your shell account and type the following command:

screen

This will create a new screen. A screen is like a virtual terminal that you can leave open on the server even after you disconnect. This will enable you to always stay connected to IRC.

You can now start a program in this new screen. Start the IRC-client irssi for examlple:

irssi

You can now start using IRC. But before you start using IRC let's see how you can disconnect from the shell and then resume the same screen as you just started!

You can either just close the terminal window, or press and hold ctrl and then press a followed by d (ctrl-a d).

Now let's connect to the shell again. When you have logged in, type this command to resume the screen you previously started:

screen -r

Now you will be back in the program irssi you started before. This program kept running on the server the whole time you were disconnected!

To exit a screen (destroy it, not just detach), exit the programs running inside it (/quit in irssi) and then type exit or logout.

It's possible to have multiple screens running, but this is not recommended. It can get very confusing if you are new to screen. If you accidentaly do, just retach them one at a time and exit them. You can list all your screens with this command: screen -ls

To learn more about screen, take a look at the Screen Howto.

Irssi

Let's now learn some basics of irssi. Start by logging in to the shell and resuming the screen if you're not already connected. In irssi there is a command promt at the bottom. This is where you write messages and type in commands.

Before you can start chatting, you have to connect to an IRC server and join a channel. If you use the standard config for irssi (which you probably do), then you won't have to connect manually. Instead you should automatically get connected to our home IRC network and joined into #blinkenshell.

If not (or if you want to learn how to connect to other IRC networks), use these commands to connect and join:

/CONNECT irc.blinkenshell.org
/JOIN #blinkenshell

The first command connects to Allshells IRC-server. This might take a couple of seconds, so wait a bit before typing in the next command. The next command will connect you to our IRC channel #blinkenshell.

Now you are connected, and you have two "tabs" open in irssi. One with the server messages and one with our IRC-channel. To change between them press and hold the ALT-key while pressing the 1-9 on your keyboard. ALT-2 will change to the IRC-channel so you can start chatting. ALT-1 will change back to the server message tab. Go to the second tab with ALT-2 and say hello to us!

When you want to turn off the computer just close the window and you can then resume the screen the next time you want to use IRC and your session of irssi will be there waiting for you, running at the server at all times!

You can connect to multiple networks by issuing the /connect command several times. When you issue the join command, it will join the channel on the network that is currently selected. You can switch between the networks by pressing ctrl-x. To list all active connections to IRC networks, type /server

Autoconnect

Again, you don't have to do this if you already automatically gets connected to IRC.

Start irssi and type these commands to automatically join the official IRC channel each time you start irssi:

/SERVER ADD -auto -network Allshells irc.blinkenshell.org 6667
/CHANNEL ADD -auto #blinkenshell Allshells

Next time you start irssi, the program will automatically connect you to Allshells and join our IRC channel.

You can also make irssi automatically identify with NickServ when you connect to the network with the following command: {{{/NETWORK ADD -autosendcmd "/^msg nickserv ident <password>;wait 2000" Allshells }}}

Replace '<password>' with your NickServ password.

Added functionality via scripts

You can load scripts to provide additional functionality. You can find pre-installed scripts in /usr/share/irssi/scripts

Descriptions of what the scripts does can be found by viewing the script in a text editor like nano and reading the comments at the top of the source.

To load a script, type:

/SCRIPT LOAD trackbar.pl

To add autoload scripts when starting irssi, you can add a symlink like this:

cd .irssi/scripts/autorun
ln -s /usr/share/irssi/scripts/trackbar.pl ./

You might have to create the directories scripts and autorun if you have not used scripts before.

Explanation of some common and useful scripts

  • trackerbar - Prints a line where you last left of in a channel, so you easily can pick up your reading in the log when you come back.
  • screen_away - Automatically sets your status to away if you detach your screen.
  • usercount - Adds an item that displays the number of users in the statusbar.

More

  • FAQ/DeadScreen - What to do when you can't resume a screen because it's "dead".

  • FAQ/Unicode - Enable unicode to make local characters work properly.

  • Howto/Screen - More on how to use screen.