#!/usr/bin/env perl # # Irssi script for easy usage of unicode emoticons. # # Package `unifont` should have to be installed so that # some of these display correctly. Depending on the font, some # of them may not really work anyway. # # Feel free to add your own. # # Enjoy! (ââ _â )ãâªâ¬ use strict; use utf8; use vars qw($VERSION %IRSSI %EMOTICONS); $VERSION = "0.0.1"; %IRSSI = ( authors => "Ilkka Pale", contact => "ilkka.pale\@gmail.com", name => "emo", description => "Outputs various unicode emoticons", commands => "emo", license => "Public Domain" ); use Irssi; use Irssi::Irc; %EMOTICONS = ( happy => 'Êâ¿Ê', smile => 'â ⣠â', flex => 'á(ââ¸â¼â¶)á', shrug => '¯\_(ã)_/¯', wave => '(â¢â¡â¢)/', bear => 'Êâ¢á´¥â¢Ê', love => 'â¥â¿â¥', shock => 'âââ', wink => 'ââ¿â¼', what => 'â_â', worried => 'âï¹â', fingers => 'ââ©â®(-_-)ââ©â®', tableflip => '(â¯Â°â¡Â°ï¼â¯ï¸µ â»ââ»', tableback => 'â¬ââ⬠ã(ã-ãã)', heart => 'â¤', lenny => '(͡° ÍÊ Í¡Â°)', gift => '(´ã»Ïã»)ã£ç±', disapprove => 'ಠ_ಠ', tired => 'ب_ب', handsup => 'â(â¢ââ¢)â', dance => '(ââ _â )ãâªâ¬', sad => 'â︿â', ohplease => 'ã(ï¿£Ïï¿£ã)', kiss => '(ã£Ëз(Ëâ£Ë )', owl => 'ââ¼â', hrm => 'ë_ë', success => '(â¢Ìá´â¢Ì)Ù', whatever => 'â_â', amazed => 'ï¼¼(âoâ)ï¼', suave => 'ã(ï¿£â³ï¿£ã)', eyes => 'Ô¾_Ô¾', ghost => '༼â·É·â·à¼½', stoned => '{â â¡ â}', angry => 'âº_â', ); sub emolist { foreach my $key (sort keys %EMOTICONS) { Irssi::print($key . " = " . $EMOTICONS{$key}); } } sub emo { my ($key, $server, $dest) = @_; if (!$server || !$server->{connected}) { Irssi::print("Not connected to server."); return; } return unless $dest; if (!exists $EMOTICONS{$key}) { return; } $dest->command("msg " . $dest->{name} . " " . $EMOTICONS{$key}); } Irssi::command_bind('emo', 'emo'); Irssi::command_bind('emolist', 'emolist');