]> git.sommitrealweird.co.uk Git - twirssi-net-twitter-lite.git/commitdiff
Create a twitter_window on startup if it does not exist.
authorMarcus Crestani <crestani@bender.informatik.uni-tuebingen.de>
Wed, 21 Jan 2009 14:22:23 +0000 (22:22 +0800)
committerDan Boger <dan@peeron.com>
Wed, 21 Jan 2009 17:57:39 +0000 (01:57 +0800)
Signed-off-by: Dan Boger <dan@peeron.com>
twirssi.pl

index 03680f400d70c935e2392e375341c94f37402562..61fdb1fc7fcc207a2686726927f113a069e353ac 100644 (file)
@@ -933,6 +933,11 @@ Irssi::settings_add_bool( "twirssi", "twirssi_use_reply_aliases", 0 );
 Irssi::settings_add_bool( "twirssi", "tweet_window_input",        0 );
 $window = Irssi::window_find_name( Irssi::settings_get_str('twitter_window') );
 
 Irssi::settings_add_bool( "twirssi", "tweet_window_input",        0 );
 $window = Irssi::window_find_name( Irssi::settings_get_str('twitter_window') );
 
+if (!$window) {
+  $window = Irssi::Windowitem::window_create (Irssi::settings_get_str('twitter_window'), 1);
+  $window->set_name (Irssi::settings_get_str('twitter_window'));
+}
+
 if ($window) {
     Irssi::command_bind( "dm",               "cmd_direct" );
     Irssi::command_bind( "dm_as",            "cmd_direct_as" );
 if ($window) {
     Irssi::command_bind( "dm",               "cmd_direct" );
     Irssi::command_bind( "dm_as",            "cmd_direct_as" );