Simple image host.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #
  2. # Print hilighted messages & private messages to window named "hilight" for
  3. # irssi 0.7.99 by Timo Sirainen
  4. #
  5. # Modded a tiny bit by znx to stop private messages entering the hilighted
  6. # window (can be toggled) and to put up a timestamp.
  7. #
  8. use Irssi;
  9. use POSIX;
  10. use vars qw($VERSION %IRSSI);
  11. $VERSION = "0.02";
  12. %IRSSI = (
  13. authors => "Timo \'cras\' Sirainen, Mark \'znx\' Sangster",
  14. contact => "tss\@iki.fi, znxster\@gmail.com",
  15. name => "hilightwin",
  16. description => "Print hilighted messages to window named \"hilight\"",
  17. license => "Public Domain",
  18. url => "http://irssi.org/",
  19. changed => "Sun May 25 18:59:57 BST 2008"
  20. );
  21. sub sig_printtext {
  22. my ($dest, $text, $stripped) = @_;
  23. my $opt = MSGLEVEL_HILIGHT;
  24. if(Irssi::settings_get_bool('hilightwin_showprivmsg')) {
  25. $opt = MSGLEVEL_HILIGHT|MSGLEVEL_MSGS;
  26. }
  27. if(
  28. ($dest->{level} & ($opt)) &&
  29. ($dest->{level} & MSGLEVEL_NOHILIGHT) == 0
  30. ) {
  31. $window = Irssi::window_find_name('hilight');
  32. if ($dest->{level} & MSGLEVEL_PUBLIC) {
  33. $text = $dest->{target}.": ".$text;
  34. }
  35. $text = strftime(
  36. Irssi::settings_get_str('timestamp_format')." ",
  37. localtime
  38. ).$text;
  39. $window->print($text, MSGLEVEL_NEVER) if ($window);
  40. }
  41. }
  42. $window = Irssi::window_find_name('hilight');
  43. Irssi::print("Create a window named 'hilight'") if (!$window);
  44. Irssi::settings_add_bool('hilightwin','hilightwin_showprivmsg',1);
  45. Irssi::signal_add('print text', 'sig_printtext');
  46. # vim:set ts=4 sw=4 et: