Site Tools


Using EPIC in Dumb Mode

What is dumb mode?

Dumb mode is a non-full screen interface, which you can turn on with the -d command line option. In Dumb mode, EPIC reads from stdin, and writes to stdout. This is suitable for use with external things, like screen readers. You can do everything in dumb mode that you can do in full screen mode

How do I start the client in dumb mode?

At the command line

  epic5 -d yournick

Where you provide a nickname for “yournick” and you provide a server for “”. I am assuming you already know what server you want to connect to.

What if I need to use SSL?

When you specify your server, you are actually supplying a bunch of colon separated fields. You can specify multiple fields with their names

 epic5 -d yournick

Most SSL servers run on a different report (often 6697), and the only real magic here is “type=IRC-SSL”. That tells EPIC that the server at “” uses SSL.

How do I do stuff when I log on to irc?

The first thing you need to know is that you can give instructions to epic in your ~/.epicrc file. The very first line of your ~/.epicrc file should be

 load global

And then after that, can be anything you want (see the examples below)

How do I msg nickserv when i connect to irc?

EPIC's programming language is event-driven. You can hook these events and run code when they happen. Each time you connect to a server, a “CONNECT” event is thrown. You can hook it like this:

 on ^connect " 6697 *" {msg nickserv auth user@host mypass}

In this example, whenever you connect to an irc server named “” on port 6697, you want to msg a service called “nickserv” with your nickserv credentials. Naturally, you should change this to reflect the server's name and port you are using (on the command line). You wouldn't want to msg a bot on another network with your credentials!

How do I join a channel each time I connect to a server?

You can set up multiple hooks for the same event, as long as they use different serial numbers. Serial numbers are a way that epic figures out what order to run them in. There are shortcuts for this.

 on #^connect + " 6697 *" {join #mychan}

Notice in this case, that before the word “connect” is a hash (#). This hash tells epic that this hook will use a serial number. The serial number in this case is the plus (+) which is a magic serial number that means “pick an unused serial number for me that is greater than 0”. By default, ONs will use serial number 0 (such as in our first example).

How can I do something when someone says my nick?

There is an event that is thrown whenever someone sends you any kind of a PRIVMSG (either a direct message, or a message to a channel). Additionally, your nickname is $N. So you can create a hook that does something if either of these two things is true

 on #^general_privmsg - * {if ([$1] == N] || [$2-] =~ [*$N*]) {exec beep_my_terminal}}

There are two new things you see here. In this case, we used the serial number '-' which means “pick any serial number less than 0”, and we have an /IF statement here. This IF statement has two clauses – one checks to see if $0 is your nickname (ie, it was sent to you), and the other checks to see if your nickname is contained in the message (to pick up things like “yournick: …” in a channel). Whenever either of these two things is true, it will run the body of the IF statement, which is an /EXEC. /EXEC is how you run a shell command in epic. Here we have it run the “beep_my_terminal” shell command. But you could have it do anything you want.

using_epic_in_dumb_mode.txt · Last modified: 2017/01/10 19:47 by

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki