Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Tiberian Technologies / Blackhand Studios » Other Products » Brenbot Code Questions
Re: Update pinfo [message #440642 is a reply to message #438916] Thu, 02 December 2010 12:51 Go to previous messageGo to previous message
Gen_Blacky is currently offline  Gen_Blacky
Messages: 3250
Registered: September 2006
Karma:
General (3 Stars)
im making a plugin that get peoples serial hashes from renlog

sub serial
{
	my ( $session, $heap, $args ) = @_[ SESSION, HEAP, ARG0 ];
	my $kernel = $_[KERNEL];
	my $line = $args->{line};
	my $name;
	my $serial;
	my $ip;
	my $port;
	my $verification;
	if ($line =~ m/^Serial\shash\sresponse\sfrom\s(.+)\s\-\>\s(.+)\./)
	{
		$name = $1;
		$serial = $2;
		
	}
	if ($line =~ m/^\[JOIN\]\s(.+)\s(.+)\s(.+)/)
	{
		$name = $1;
		$ip = $2;
		$serial = $3;
	}
	if ($line =~ m/^\[Serial\]\s(.+)\s(.+)/)
	{
		$name = $1;
		$serial = $2;
	}
	if ( $line =~ /\(Game\)\s(.+)/ )
	{
		my $text = $1;
		if ($text =~ m/Serial\sof\sclient\s\'(.+)\'\sis\s(.+)\./) 
		{
			$name = $1;
			$serial = $2;
			brIRC::ircmsg ( "in serial 1 $name $serial", "A" );
		}
		if ($text =~ m/Client\s\'(.+)\'\s\((.+)\:(.+)\)\sconnected\./) 
		{
			$name = $1;
			$ip = $2;
			$port = $3;
		}
	}
	if ($line =~ m/(\d+)\s\|\s(.+)\s\|\s(.+)\s\|\s(.+)/) 
	{
		$id = $1;
		$name = $2;
		$serial = $3;
		$verification = $4;
		brIRC::ircmsg ( "09[Serial] $name Verification $verification with serial $serial", "A" );
	}
	brIRC::ircmsg ( "serial $name $serial", "A" );
	serialupdate( $name, $serial );
}


What is the appropriate way to use the renlog hook in the .xml file. What i have currently works but is their an easy way when using the hook.

  <renlog_regex_hooks>
  <hook event="serial" regex="^\[Serial\]|^\[Join\]|^Serial\shash\s|^\(Game\)\s(.+)\sSerial|^\(Game\)\s(.+)\sClient|^\(Game\)\s(.+)\sClient|^(\d+)\s\|\s(.+)\s\|\s(.+)\s\|\s(.+)" />
  </renlog_regex_hooks>


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

[Updated on: Thu, 02 December 2010 12:52]

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
Read Message
Previous Topic: scripts.dll 3.4.4 is out
Next Topic: BRenBot serial plugin
Goto Forum:
  


Current Time: Thu Nov 28 11:35:55 MST 2024

Total time taken to generate the page: 0.00723 seconds