File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -11,10 +11,10 @@ namespace Oxide.Plugins;
1111[ Description ( "Link your Azuriom website with an Oxide server." ) ]
1212class AzLink : CovalencePlugin
1313{
14- private const string AzLinkVersion = "0.1.0 " ;
14+ private const string AzLinkVersion = "0.1.1 " ;
1515
16- private DateTime lastSent = DateTime . MinValue ;
17- private DateTime lastFullSent = DateTime . MinValue ;
16+ private DateTime lastSent = DateTime . Now ;
17+ private DateTime lastFullSent = DateTime . Now ;
1818
1919 private void Init ( )
2020 {
@@ -92,22 +92,22 @@ private void TryFetch()
9292 return ;
9393 }
9494
95- if ( ( now - lastSent ) . Seconds < 15 )
95+ if ( ( now - lastSent ) . TotalSeconds < 15 )
9696 {
9797 return ;
9898 }
9999
100100 lastSent = now ;
101101
102- var sendFull = now . Minute % 15 == 0 && ( now - lastFullSent ) . Seconds > 60 ;
102+ var full = now . Minute % 15 == 0 && ( now - lastFullSent ) . TotalSeconds >= 60 ;
103103
104- if ( sendFull )
104+ if ( full )
105105 {
106106 lastFullSent = now ;
107107 }
108108
109109 RunFetch ( res => DispatchCommands ( res . Commands ) ,
110- code => LogError ( "Unable to send data to the website (code {0})" , code ) , sendFull ) ;
110+ code => LogError ( "Unable to send data to the website (code {0})" , code ) , full ) ;
111111 }
112112
113113 private void RunFetch ( Action < FetchResponse > callback , Action < int > errorHandler , bool sendFullData )
You can’t perform that action at this time.
0 commit comments