SHARE
TWEET

Untitled

a guest Sep 14th, 2017 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. sub spectate_bi
  2. {
  3.     my ( $kernel, $session, $heap, $args ) = @_[ KERNEL, SESSION, HEAP, ARG0 ];
  4.     my %args = %{$args};
  5.  
  6.     if ( $args{arg} =~ m/^\!\S+\s(.+)$/i )
  7.     {
  8.         my ( $result, %player ) = plugin::getPlayerData ( $1 );
  9.         if ( $result == 1 )
  10.                 {
  11.         plugin::RenRemCMD ( "spectate_bi $player{name}" );
  12.                 brIRC::ircmsg ( "spectate_bi mode set for $player{name}", "A");
  13.  
  14.         }
  15.         else { brIRC::ircmsg ( "$1 was not found ingame, or is not unique", "A"); }
  16.  
  17.     else
  18.     {
  19.         brIRC::ircmsg ( "Usage: !spectate_bi <modname>", "A");
  20.     }
  21. }
  22.  
  23. sub unspectate_bi
  24. {
  25.     my ( $kernel, $session, $heap, $args ) = @_[ KERNEL, SESSION, HEAP, ARG0 ];
  26.     my %args = %{$args};
  27.  
  28.     if ( $args{arg} =~ m/^\!\S+\s(.+)$/i )
  29.     {
  30.         my ( $result, %player ) = plugin::getPlayerData ( $1 );
  31.         if ( $result == 1 )
  32.         {
  33.                 plugin::RenRemCMD ( "unspectate_bi $player{name}" );
  34.                 brIRC::ircmsg ( "unspectate_bi mode unset for $player{name}", "A");
  35.  
  36.         }
  37.         else { brIRC::ircmsg ( "$1 was not found ingame, or is not unique", "A"); }
  38.     }
  39.     else
  40.     {
  41.         brIRC::ircmsg ( "Usage: !unspectate_bi <modname>", "A");
  42.     }
  43. }
RAW Paste Data
Top