Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Tiberian Technologies / Blackhand Studios » Other Products » Brenbot Plugin
Brenbot Plugin [message #400153] Thu, 27 August 2009 19:00 Go to previous message
Gen_Blacky is currently offline  Gen_Blacky
Messages: 3250
Registered: September 2006
Karma:
General (3 Stars)
Can some one tell me why the plugin wont load. Im just trying to get it to load before i go any further.


error found in forcecp.pm: syntax error at plugins/forcecp.pm line 48, near ")
                {"
syntax error at plugins/forcecp.pm line 69, near ")
                                if"
Compilation failed in require at (eval 198) line 1.



package forcecp;

use POE;
use plugin;

# define additional events in the POE session

our %additional_events =
(
	# !command functions
	"forcecp" => "forcecp"
);

# BRenBot automatically sets the plugin name
our $plugin_name;

# BRenBot automatically imports the plugin's config (from the xml file) into %config
our %config;

our $currentVersion = 1.00;


sub forcecp
{
	my ( $session, $heap, $args ) = @_[ SESSION, HEAP, ARG0 ];
	my $kernel = $_[KERNEL];
	my %args = %{$args};

	eval
	{
		if (!$args{arg1})
		{
			if ($args{nicktype} == 1)
			{
				my $syntaxvalue = $args{settings}->{syntax}->{value};
				brIRC::ircmsg ( "Usage: $syntaxvalue", $args{'ircChannelCode'} );
			}
			else
			{
				modules::RenRemCMD("msg [BR] Usage: $args{settings}->{syntax}->{value}");
			}
			return;
		}
		my $user = $args{arg1}

        if ( modules::get_module("bhs") )
		{
			my $mod = $args{nick};

			my ( $result, %player ) = playerData::getPlayerData( $user );
			if ( $result == 1 )
			{	

				if (!modules::get_module("gamelog") )
				{
					modules::RenRemCMD("msg [BR] Gamelog must be enabled to be able to use forcecp");
					return;
				}

				my $loaded = gamelog::get_player( $player{'name'} );

                
				
				print "Enforcing Scripts now!\n";
							
				my ( $result, %player ) = playerData::getPlayerData( $user );
				while ( my ( $id, $player ) = each ( %playerData ) )
				if ( length ( $player->{'bhsVersion'} ) == 0 && ( ( time() - $player->{'joinTime'} ) > 10 ) )
				{
					brIRC::ircmsg ( "$admin Forced $player to get scripts.", $args{'ircChannelCode'} );
					modules::RenRemCMD( "pamsg $player->{id} You need Scripts to play on this server" );					
					RenRem::RenRemCMDtimed( "kick $player->{id}", 5 );	
				}
			}
		}
	}
}





#		else
#		{
#		if ( $player->{'bhsVersion'} >= 3.4 ){
#            brIRC::ircmsg ( "$player Has Scripts 3.4 No Reason to Force.", $args{'ircChannelCode'} );





sub start
{
	plugin::set_global ( "version_plugin_forcecp", $currentVersion );
}


sub stop
{

}


sub command
{
	my $kernel = $_[KERNEL];
	my %args = %{@_[ ARG0 ]};
	$kernel->yield( $args{'command'} => \%args);
}


# Return true or the bot will not work properly...
1;






http://s18.postimage.org/jc6qbn4k9/bricks3.png

[Updated on: Thu, 27 August 2009 19:02]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Server crash when loaded C&C_Under.mix edit
Next Topic: Leveledit
Goto Forum:
  


Current Time: Sat Nov 30 10:15:08 MST 2024

Total time taken to generate the page: 0.00833 seconds