Tips/tricks

Collected by Darix.

zsh completion for irssi options.
you can download/see it here
hide aliases
sometimes i found it quite useful to have a much more quiet irssi :)
/alias  hideadd          eval set activity_hide_targets $activity_hide_targets $-
/alias  hideclear        set -c activity_hide_targets
/alias  hidelevels.clear set -c activity_hide_level
/alias  hidelevels.set   set activity_hide_level parts joins quits nicks modes
/alias  hidelist         set activity_hide_targets
/alias  hideset          set activity_hide_targets $-

i have replaced the aliases with a simple script. see hide.pl ( source )

mIRC-like flashing with putty
to get notified off activities, while im working, i use the following setup:
irssi
/set beep_when_window_active ON
/set beep_when_away ON
/set beep_msg_level MSGS NOTICES DCC DCCMSGS HILIGHT
/set bell_beeps ON
screen
Audible bell (switch Ctrl+a Ctrl+g)
putty
- no bell and steady on bell
right aligned nicks
/format own_msg {ownmsgnick $2 {ownnick $[-9]0}}$1
/format own_msg_channel {ownmsgnick $3 {ownnick $[-9]0}{msgchannel $1}}$2
/format pubmsg_me {pubmsgmenick $2 {menick $[-9]0}}$1
/format pubmsg_me_channel {pubmsgmenick $3 {menick $[-9]0}{msgchannel $1}}$2
/format pubmsg_hilight {pubmsghinick $0 $3 $[-9]1}$2
/format pubmsg_hilight_channel {pubmsghinick $0 $4 $[-9]1{msgchannel $2}}$3
/format pubmsg {pubmsgnick $2 {pubnick $[-9]0}}$1
/format pubmsg_channel {pubmsgnick $3 {pubnick $[-9]0}{msgchannel $1}}$2

http://irccrew.org/~cras/format.txt

uptime alias
put it in your .irssi/config in the alias section as one line:
UPTIME = "eval exec - expr `date +%s` - \\$F | awk '{print \"Irssi uptime: \"int(\\\\\\$1/3600/24)\"d \"int(\\\\\\$1/3600%24)\"h \"int(\\\\\\$1/60%60)\"m \"int(\\\\\\$1%60)\"s\" }'";
ssh/telnet alias
/alias TELNET window new hidden;window name telnet;exec -name telnet -nosh -interactive -window telnet $-
/alias SSH window new hidden;window name ssh;exec -name ssh -nosh -interactive -window ssh $-
happy mudding, telnetting :)
icq client in irssi?:)
/alias MICQ window new hidden;window name micq;exec -name micq -nosh -interactive -window micq $-
but you could also try the icq module for irssi
news reader in irssi?:)
no problem:
/alias NNTP window new hide;window name news;exec printf 'article <%s>\\nquit\\n', '$0'|nc news.helsinki.fi nntp|tr -d '\\r'
hmm now there is a script for this purpose too. checkout news.pl (source)
autocorrect feature in irssi?
Of course. ;)
replaces = (
    { text = ".)"; replace = ":)"; },
    { text = ":9"; replace = ":)"; }
);

These replaces would be replaced on pressing space or return. But you can add some bindings for it.

/bind , multi check_replaces;insert_text ,
/bind . multi check_replaces;insert_text .

Now pressing . or , will replace it too.

completions for often used words
completions = (
      { short = "sid"; long = "http://scripts.irssi.de/"; },
      { short = "wid"; long = "http://www.irssi.de/"; },
      { short = "ios"; long = "http://irssi.org/scripts/"; }
);

Write wid press tab key and it will be replaced with http://www.irssi.de/.

Where are my completions/replaces gone?

With latest irssi cvs the format changed a bit. cras merged replaces and completions

completions = {
  wid = { value = "http://www.irssi.de/"; };
  sid = { value = "http://scripts.irssi.de/"; };
  ios = { value = "http://irssi.org/scripts/"; };
  ":9" = { value = ":)"; auto = "yes"; };
};

And there is now a command to maintain the completions:

/completion [-auto] <key> <value>
/completion -delete <key>

To get the replaces like behavior add the completion with -auto.

/ame & /asay
/alias ame foreach channel /eval action $$C $$-; foreach query /eval action $$T $$-
/alias asay foreach channel /eval msg $$C $$-; foreach query /eval msg $$T $$-