@@ -54,7 +54,7 @@ public Plugin myinfo =
5454 name = " Store - Voucher module" ,
5555 author = " shanapu, nuclear silo" , // If you should change the code, even for your private use, please PLEASE add your name to the author here
5656 description = " " ,
57- version = " 2.0 " , // If you should change the code, even for your private use, please PLEASE make a mark here at the version number
57+ version = " 2.1 " , // If you should change the code, even for your private use, please PLEASE make a mark here at the version number
5858 url = " "
5959};
6060
@@ -98,19 +98,17 @@ public void OnAllPluginsLoaded()
9898
9999public void Store_OnConfigExecuted (char [] prefix )
100100{
101- // If it's already connected we are good to go
102- if (g_hDatabase != INVALID_HANDLE )
103- return ;
104-
105101 strcopy (g_sChatPrefix , sizeof (g_sChatPrefix ), prefix );
106102
107103 ReadCoreCFG ();
108104
109- g_cvDatabaseEntry = FindConVar (" sm_store_database" );
110- char buffer [128 ];
111- g_cvDatabaseEntry .GetString (buffer , 128 );
112- SQL_TConnect (SQLCallback_Connect , buffer );
113-
105+ if (! g_hDatabase ) // If it's already connected we are good to go
106+ {
107+ g_cvDatabaseEntry = FindConVar (" sm_store_database" );
108+ char buffer [128 ];
109+ g_cvDatabaseEntry .GetString (buffer , 128 );
110+ SQL_TConnect (SQLCallback_Connect , buffer );
111+ }
114112}
115113
116114public void SQLCallback_Connect (Handle owner , Handle hndl , const char [] error , any data )
0 commit comments