|
Re: BRenBot CMSG paging isn't working [message #470849 is a reply to message #470847] |
Fri, 06 July 2012 13:42 |
iRANian
Messages: 4311 Registered: April 2011
Karma: 0
|
General (4 Stars) |
|
|
[22:38:46] <Blacky> if ( $line =~ /^The Version of the server is (.+)/ || $line =~ /^The version of (bhs|tt).dll on this machine is (.+)/i )
[22:38:46] <Blacky> { $brconfig::serverBhsVersion = $1; }
[22:38:51] <Blacky> this is why it not working
[22:38:53] <Blacky> regex wrong
[22:39:10] <Blacky> sversion
[22:39:10] <Blacky> >The version of tt.dll on this machine is 4.000000
Long time and well respected Renegade community member, programmer, modder and tester.
Scripts 4.0 private beta tester since May 2011.
My Renegade server plugins releases
|
|
|
|
|
Re: BRenBot CMSG paging isn't working [message #470856 is a reply to message #470847] |
Fri, 06 July 2012 15:08 |
|
Gen_Blacky
Messages: 3250 Registered: September 2006
Karma: 1
|
General (3 Stars) |
|
|
The regex is fine.
# Record the version of the server
if ( $line =~ /^The Version of the server is (.+)/ || $line =~ /^The version of (bhs|tt).dll on this machine is (.+)/i )
{ $brconfig::serverBhsVersion = $1; }
but on this $line =~ /^The version of (bhs|tt).dll on this machine is (.+)/i
your setting "serverBhsVersion" to "bhs" or "tt" not script version.
(bhs|tt) is $1
need to use $2 or fix the regex.
# Record the version of the server
if ( $line =~ /^The Version of the server is (.+)/ || $line =~ /^The version of bhs.dll|tt.dll on this machine is (.+)/i )
{ $brconfig::serverBhsVersion = $1; }
[Updated on: Fri, 06 July 2012 15:25] Report message to a moderator
|
|
|
|
|
Re: BRenBot CMSG paging isn't working [message #470860 is a reply to message #470859] |
Fri, 06 July 2012 15:55 |
|
Gen_Blacky
Messages: 3250 Registered: September 2006
Karma: 1
|
General (3 Stars) |
|
|
danpaul88 wrote on Fri, 06 July 2012 16:48 |
Gen_Blacky wrote on Fri, 06 July 2012 23:35 | didn't want to make new thread but fix this.
!uptime
!uptime
!uptime
!uptime
I've been running for 5 minutes, 12.9123239517212 seconds.
I've been running for 5 minutes, 13.9123239517212 seconds.
I've been running for 5 minutes, 13.9123239517212 seconds.
I've been running for 6 minutes, 39.9123239517212 seconds.
|
Fix people spamming a command?
As for the Regex matching group, it used to be $1 before I tweaked it to support tt.DLL as well as bhs.DLL, guess I just forgot to make it a non capturing group. Simple fix to make.
|
truncate decimal would be better I think, milliseconds always the same.
[Updated on: Fri, 06 July 2012 15:57] Report message to a moderator
|
|
|