+ my $libpath;
+
+ # Find out the script directory, and add it to @INC.
+ # This is necessary to find libvideosite.pm
+ $libpath = File::Spec->catfile(Irssi::get_irssi_dir(), 'scripts');
+
+ # If the library is already loaded unload it
+ foreach (keys(%INC)) {
+ if ($INC{$_} eq File::Spec->catfile($libpath, 'libvideosite.pm')) {
+ delete($INC{$_});
+ }
+ }
+
+ push(@INC, $libpath);
+ load 'libvideosite';
+