OSDN Git Service

First version
[st-ro/stro.git] / src / login / loginclif.c
1 /**
2  * @file loginclif.c
3  * Module purpose is to handle incoming and outgoing requests with client.
4  * Licensed under GNU GPL.
5  *  For more information, see LICENCE in the main folder.
6  * @author Athena Dev Teams originally in login.c
7  * @author rAthena Dev Team
8  */
9
10 #include "../common/timer.h" //difftick
11 #include "../common/strlib.h" //safeprint
12 #include "../common/showmsg.h" //show notice
13 #include "../common/socket.h" //wfifo session
14 #include "../common/malloc.h"
15 #include "../common/utils.h"
16 #include "../common/md5calc.h"
17 #include "../common/random.h"
18 #include "account.h"
19 #include "ipban.h" //ipban_check
20 #include "login.h"
21 #include "loginlog.h"
22 #include "loginclif.h"
23 #include "loginchrif.h"
24
25 #include <stdlib.h>
26
27 /**
28  * Transmit auth result to client.
29  * @param fd: client file desciptor link
30  * @param result: result to transmit to client, see below
31  *  1 : Server closed
32  *  2 : Someone has already logged in with this id
33  *  8 : already online
34  * <result>.B (SC_NOTIFY_BAN)
35  */
36 static void logclif_sent_auth_result(int fd,char result){
37         WFIFOHEAD(fd,3);
38         WFIFOW(fd,0) = 0x81;
39         WFIFOB(fd,2) = result;
40         WFIFOSET(fd,3);
41 }
42
43 /**
44  * Auth successful, inform client and create a temp auth_node.
45  * @param sd: player session
46  */
47 static void logclif_auth_ok(struct login_session_data* sd) {
48         int fd = sd->fd;
49         uint32 ip = session[fd]->client_addr;
50
51         uint8 server_num, n;
52         uint32 subnet_char_ip;
53         struct auth_node* node;
54         int i;
55
56 #if PACKETVER < 20170315
57         int cmd = 0x69; // AC_ACCEPT_LOGIN
58         int header = 47;
59         int size = 32;
60 #else
61         int cmd = 0xac4; // AC_ACCEPT_LOGIN3
62         int header = 64;
63         int size = 160;
64 #endif
65
66         if( runflag != LOGINSERVER_ST_RUNNING ){
67                 // players can only login while running
68                 logclif_sent_auth_result(fd,1); // server closed
69                 return;
70         }
71
72         if( login_config.group_id_to_connect >= 0 && sd->group_id != login_config.group_id_to_connect ) {
73                 ShowStatus("Connection refused: the required group id for connection is %d (account: %s, group: %d).\n", login_config.group_id_to_connect, sd->userid, sd->group_id);
74                 logclif_sent_auth_result(fd,1); // server closed
75                 return;
76         } else if( login_config.min_group_id_to_connect >= 0 && login_config.group_id_to_connect == -1 && sd->group_id < login_config.min_group_id_to_connect ) {
77                 ShowStatus("Connection refused: the minimum group id required for connection is %d (account: %s, group: %d).\n", login_config.min_group_id_to_connect, sd->userid, sd->group_id);
78                 logclif_sent_auth_result(fd,1); // server closed
79                 return;
80         }
81
82         server_num = 0;
83         for( i = 0; i < ARRAYLENGTH(ch_server); ++i )
84                 if( session_isActive(ch_server[i].fd) )
85                         server_num++;
86
87         if( server_num == 0 )
88         {// if no char-server, don't send void list of servers, just disconnect the player with proper message
89                 ShowStatus("Connection refused: there is no char-server online (account: %s).\n", sd->userid);
90                 logclif_sent_auth_result(fd,1); // server closed
91                 return;
92         }
93
94         {
95                 struct online_login_data* data = (struct online_login_data*)idb_get(online_db, sd->account_id);
96                 if( data )
97                 {// account is already marked as online!
98                         if( data->char_server > -1 )
99                         {// Request char servers to kick this account out. [Skotlex]
100                                 uint8 buf[6];
101                                 ShowNotice("User '%s' is already online - Rejected.\n", sd->userid);
102                                 WBUFW(buf,0) = 0x2734;
103                                 WBUFL(buf,2) = sd->account_id;
104                                 logchrif_sendallwos(-1, buf, 6);
105                                 if( data->waiting_disconnect == INVALID_TIMER )
106                                         data->waiting_disconnect = add_timer(gettick()+AUTH_TIMEOUT, login_waiting_disconnect_timer, sd->account_id, 0);
107                                 logclif_sent_auth_result(fd,8); // 08 = Server still recognizes your last login
108                                 return;
109                         }
110                         else
111                         if( data->char_server == -1 )
112                         {// client has authed but did not access char-server yet
113                                 // wipe previous session
114                                 idb_remove(auth_db, sd->account_id);
115                                 login_remove_online_user(sd->account_id);
116                                 data = NULL;
117                         }
118                 }
119         }
120
121         login_log(ip, sd->userid, 100, "login ok");
122         ShowStatus("Connection of the account '%s' accepted.\n", sd->userid);
123
124         WFIFOHEAD(fd,header+size*server_num);
125         WFIFOW(fd,0) = cmd;
126         WFIFOW(fd,2) = header+size*server_num;
127         WFIFOL(fd,4) = sd->login_id1;
128         WFIFOL(fd,8) = sd->account_id;
129         WFIFOL(fd,12) = sd->login_id2;
130         WFIFOL(fd,16) = 0; // in old version, that was for ip (not more used)
131         //memcpy(WFIFOP(fd,20), sd->lastlogin, 24); // in old version, that was for name (not more used)
132         memset(WFIFOP(fd,20), 0, 24);
133         WFIFOW(fd,44) = 0; // unknown
134         WFIFOB(fd,46) = sex_str2num(sd->sex);
135 #if PACKETVER >= 20170315
136         memset(WFIFOP(fd,47),0,17); // Unknown
137 #endif
138         for( i = 0, n = 0; i < ARRAYLENGTH(ch_server); ++i ) {
139                 if( !session_isValid(ch_server[i].fd) )
140                         continue;
141                 subnet_char_ip = lan_subnetcheck(ip); // Advanced subnet check [LuzZza]
142                 WFIFOL(fd,header+n*size) = htonl((subnet_char_ip) ? subnet_char_ip : ch_server[i].ip);
143                 WFIFOW(fd,header+n*size+4) = ntows(htons(ch_server[i].port)); // [!] LE byte order here [!]
144                 memcpy(WFIFOP(fd,header+n*size+6), ch_server[i].name, 20);
145                 WFIFOW(fd,header+n*size+26) = ch_server[i].users;
146                 WFIFOW(fd,header+n*size+28) = ch_server[i].type;
147                 WFIFOW(fd,header+n*size+30) = ch_server[i].new_;
148 #if PACKETVER >= 20170315
149                 memset(WFIFOP(fd, header+n*size+32), 0, 128); // Unknown
150 #endif
151                 n++;
152         }
153         WFIFOSET(fd,header+size*server_num);
154
155         // create temporary auth entry
156         CREATE(node, struct auth_node, 1);
157         node->account_id = sd->account_id;
158         node->login_id1 = sd->login_id1;
159         node->login_id2 = sd->login_id2;
160         node->sex = sd->sex;
161         node->ip = ip;
162         node->clienttype = sd->clienttype;
163         idb_put(auth_db, sd->account_id, node);
164         {
165                 struct online_login_data* data;
166                 // mark client as 'online'
167                 data = login_add_online_user(-1, sd->account_id);
168                 // schedule deletion of this node
169                 data->waiting_disconnect = add_timer(gettick()+AUTH_TIMEOUT, login_waiting_disconnect_timer, sd->account_id, 0);
170         }
171 }
172
173 /**
174  * Inform client that auth has failed.
175  * @param sd: player session
176  * @param result: nb (msg define in conf)
177     0 = Unregistered ID
178     1 = Incorrect Password
179     2 = This ID is expired
180     3 = Rejected from Server
181     4 = You have been blocked by the GM Team
182     5 = Your Game's EXE file is not the latest version
183     6 = You are prohibited to log in until %s
184     7 = Server is jammed due to over populated
185     8 = No more accounts may be connected from this company
186     9 = MSI_REFUSE_BAN_BY_DBA
187     10 = MSI_REFUSE_EMAIL_NOT_CONFIRMED
188     11 = MSI_REFUSE_BAN_BY_GM
189     12 = MSI_REFUSE_TEMP_BAN_FOR_DBWORK
190     13 = MSI_REFUSE_SELF_LOCK
191     14 = MSI_REFUSE_NOT_PERMITTED_GROUP
192     15 = MSI_REFUSE_NOT_PERMITTED_GROUP
193     99 = This ID has been totally erased
194     100 = Login information remains at %s
195     101 = Account has been locked for a hacking investigation. Please contact the GM Team for more information
196     102 = This account has been temporarily prohibited from login due to a bug-related investigation
197     103 = This character is being deleted. Login is temporarily unavailable for the time being
198     104 = This character is being deleted. Login is temporarily unavailable for the time being
199      default = Unknown Error.
200  */
201 static void logclif_auth_failed(struct login_session_data* sd, int result) {
202         int fd = sd->fd;
203         uint32 ip = session[fd]->client_addr;
204
205         if (login_config.log_login)
206         {
207                 if(result >= 0 && result <= 15)
208                     login_log(ip, sd->userid, result, msg_txt(result));
209                 else if(result >= 99 && result <= 104)
210                     login_log(ip, sd->userid, result, msg_txt(result-83)); //-83 offset
211                 else
212                     login_log(ip, sd->userid, result, msg_txt(22)); //unknow error
213         }
214
215         if( (result == 0 || result == 1) && login_config.dynamic_pass_failure_ban )
216                 ipban_log(ip); // log failed password attempt
217
218 #if PACKETVER >= 20120000 /* not sure when this started */
219         WFIFOHEAD(fd,26);
220         WFIFOW(fd,0) = 0x83e;
221         WFIFOL(fd,2) = result;
222         if( result != 6 )
223                 memset(WFIFOP(fd,6), '\0', 20);
224         else { // 6 = You are prohibited to log in until %s
225                 struct mmo_account acc;
226                 AccountDB* accounts = login_get_accounts_db();
227                 time_t unban_time = ( accounts->load_str(accounts, &acc, sd->userid) ) ? acc.unban_time : 0;
228                 timestamp2string(WFIFOCP(fd,6), 20, unban_time, login_config.date_format);
229         }
230         WFIFOSET(fd,26);
231 #else
232         WFIFOHEAD(fd,23);
233         WFIFOW(fd,0) = 0x6a;
234         WFIFOB(fd,2) = (uint8)result;
235         if( result != 6 )
236                 memset(WFIFOP(fd,3), '\0', 20);
237         else { // 6 = You are prohibited to log in until %s
238                 struct mmo_account acc;
239                 AccountDB* accounts = login_get_accounts_db();
240                 time_t unban_time = ( accounts->load_str(accounts, &acc, sd->userid) ) ? acc.unban_time : 0;
241                 timestamp2string(WFIFOCP(fd,3), 20, unban_time, login_config.date_format);
242         }
243         WFIFOSET(fd,23);
244 #endif  
245 }
246
247 /**
248  * Received a keepalive packet to maintain connection.
249  * 0x200 <account.userid>.24B.
250  * @param fd: fd to parse from (client fd)
251  * @return 0 not enough info transmitted, 1 success
252  */
253 static int logclif_parse_keepalive(int fd){
254         if (RFIFOREST(fd) < 26)
255                 return 0;
256         RFIFOSKIP(fd,26);
257         return 1;
258 }
259
260 /**
261  * Received a keepalive packet to maintain connection.
262  * S 0204 <md5 hash>.16B (kRO 2004-05-31aSakexe langtype 0 and 6)
263  * @param fd: fd to parse from (client fd)
264  * @return 0 not enough info transmitted, 1 success
265  */
266 static int logclif_parse_updclhash(int fd, struct login_session_data *sd){
267         if (RFIFOREST(fd) < 18)
268                 return 0;
269         sd->has_client_hash = 1;
270         memcpy(sd->client_hash, RFIFOP(fd, 2), 16);
271         RFIFOSKIP(fd,18);
272         return 1;
273 }
274
275 /**
276  * Received a connection request.
277  * @param fd: file descriptor to parse from (client)
278  * @param sd: client session
279  * @param command: packet type sent
280  * @param ip: ipv4 address (client)
281  *  S 0064 <version>.L <username>.24B <password>.24B <clienttype>.B
282  *  S 0277 <version>.L <username>.24B <password>.24B <clienttype>.B <ip address>.16B <adapter address>.13B
283  *  S 02b0 <version>.L <username>.24B <password>.24B <clienttype>.B <ip address>.16B <adapter address>.13B <g_isGravityID>.B
284  *  S 01dd <version>.L <username>.24B <password hash>.16B <clienttype>.B
285  *  S 01fa <version>.L <username>.24B <password hash>.16B <clienttype>.B <?>.B(index of the connection in the clientinfo file (+10 if the command-line contains "pc"))
286  *  S 027c <version>.L <username>.24B <password hash>.16B <clienttype>.B <?>.13B(junk)
287  *  S 0825 <packetsize>.W <version>.L <clienttype>.B <userid>.24B <password>.27B <mac>.17B <ip>.15B <token>.(packetsize - 0x5C)B
288  * @param fd: fd to parse from (client fd)
289  * @return 0 failure, 1 success
290  */
291 static int logclif_parse_reqauth(int fd, struct login_session_data *sd, int command, char* ip){
292         size_t packet_len = RFIFOREST(fd);
293
294         if( (command == 0x0064 && packet_len < 55)
295         ||  (command == 0x0277 && packet_len < 84)
296         ||  (command == 0x02b0 && packet_len < 85)
297         ||  (command == 0x01dd && packet_len < 47)
298         ||  (command == 0x01fa && packet_len < 48)
299         ||  (command == 0x027c && packet_len < 60)
300         ||  (command == 0x0825 && (packet_len < 4 || packet_len < RFIFOW(fd, 2))) )
301                 return 0;
302         else {
303                 int result;
304                 char username[NAME_LENGTH];
305                 char password[PASSWD_LENGTH];
306                 unsigned char passhash[16];
307                 uint8 clienttype;
308                 bool israwpass = (command==0x0064 || command==0x0277 || command==0x02b0 || command == 0x0825);
309
310                 // Shinryo: For the time being, just use token as password.
311                 if(command == 0x0825) {
312                         char *accname = RFIFOCP(fd, 9);
313                         char *token = RFIFOCP(fd, 0x5C);
314                         size_t uAccLen = strlen(accname);
315                         size_t uTokenLen = RFIFOREST(fd) - 0x5C;
316
317                         if(uAccLen > NAME_LENGTH - 1 || uAccLen == 0 || uTokenLen > NAME_LENGTH - 1  || uTokenLen == 0)
318                         {
319                                 logclif_auth_failed(sd, 3);
320                                 return 0;
321                         }
322
323                         safestrncpy(username, accname, uAccLen + 1);
324                         safestrncpy(password, token, uTokenLen + 1);
325                         clienttype = RFIFOB(fd, 8);
326                 }
327                 else
328                 {
329                         safestrncpy(username, RFIFOCP(fd,6), NAME_LENGTH);
330                         if( israwpass )
331                         {
332                                 safestrncpy(password, RFIFOCP(fd,30), PASSWD_LENGTH);
333                                 clienttype = RFIFOB(fd,54);
334                         }
335                         else
336                         {
337                                 memcpy(passhash, RFIFOP(fd,30), 16);
338                                 clienttype = RFIFOB(fd,46);
339                         }
340                 }
341                 RFIFOSKIP(fd,RFIFOREST(fd)); // assume no other packet was sent
342
343                 sd->clienttype = clienttype;
344                 safestrncpy(sd->userid, username, NAME_LENGTH);
345                 if( israwpass )
346                 {
347                         ShowStatus("Request for connection of %s (ip: %s)\n", sd->userid, ip);
348                         safestrncpy(sd->passwd, password, NAME_LENGTH);
349                         if( login_config.use_md5_passwds )
350                                 MD5_String(sd->passwd, sd->passwd);
351                         sd->passwdenc = 0;
352                 }
353                 else
354                 {
355                         ShowStatus("Request for connection (passwdenc mode) of %s (ip: %s)\n", sd->userid, ip);
356                         bin2hex(sd->passwd, passhash, 16); // raw binary data here!
357                         sd->passwdenc = PASSWORDENC;
358                 }
359
360                 if( sd->passwdenc != 0 && login_config.use_md5_passwds )
361                 {
362                         logclif_auth_failed(sd, 3); // send "rejected from server"
363                         return 0;
364                 }
365
366                 result = login_mmo_auth(sd, false);
367
368                 if( result == -1 )
369                         logclif_auth_ok(sd);
370                 else
371                         logclif_auth_failed(sd, result);
372         }
373         return 1;
374 }
375
376 /**
377  * Client requests an md5key for his session: keys will be generated and sent back.
378  * @param fd: file descriptor to parse from (client)
379  * @param sd: client session
380  * @return 1 success
381  */
382 static int logclif_parse_reqkey(int fd, struct login_session_data *sd){
383         RFIFOSKIP(fd,2);
384         {
385                 memset(sd->md5key, '\0', sizeof(sd->md5key));
386                 sd->md5keylen = (uint16)(12 + rnd() % 4);
387                 MD5_Salt(sd->md5keylen, sd->md5key);
388
389                 WFIFOHEAD(fd,4 + sd->md5keylen);
390                 WFIFOW(fd,0) = 0x01dc;
391                 WFIFOW(fd,2) = 4 + sd->md5keylen;
392                 memcpy(WFIFOP(fd,4), sd->md5key, sd->md5keylen);
393                 WFIFOSET(fd,WFIFOW(fd,2));
394         }
395         return 1;
396 }
397
398 /**
399  * Char-server request to connect to the login-server.
400  * This is needed to exchange packets.
401  * @param fd: file descriptor to parse from (client)
402  * @param sd: client session
403  * @param ip: ipv4 address (client)
404  * @return 0 packet received too shirt, 1 success
405  */
406 static int logclif_parse_reqcharconnec(int fd, struct login_session_data *sd, char* ip){
407         if (RFIFOREST(fd) < 86)
408                 return 0;
409         else {
410                 int result;
411                 char server_name[20];
412                 char message[256];
413                 uint32 server_ip;
414                 uint16 server_port;
415                 uint16 type;
416                 uint16 new_;
417
418                 safestrncpy(sd->userid, RFIFOCP(fd,2), NAME_LENGTH);
419                 safestrncpy(sd->passwd, RFIFOCP(fd,26), NAME_LENGTH);
420                 if( login_config.use_md5_passwds )
421                         MD5_String(sd->passwd, sd->passwd);
422                 sd->passwdenc = 0;
423                 server_ip = ntohl(RFIFOL(fd,54));
424                 server_port = ntohs(RFIFOW(fd,58));
425                 safestrncpy(server_name, RFIFOCP(fd,60), 20);
426                 type = RFIFOW(fd,82);
427                 new_ = RFIFOW(fd,84);
428                 RFIFOSKIP(fd,86);
429
430                 ShowInfo("Connection request of the char-server '%s' @ %u.%u.%u.%u:%u (account: '%s', ip: '%s')\n", server_name, CONVIP(server_ip), server_port, sd->userid, ip);
431                 sprintf(message, "charserver - %s@%u.%u.%u.%u:%u", server_name, CONVIP(server_ip), server_port);
432                 login_log(session[fd]->client_addr, sd->userid, 100, message);
433
434                 result = login_mmo_auth(sd, true);
435                 if( runflag == LOGINSERVER_ST_RUNNING &&
436                         result == -1 &&
437                         sd->sex == 'S' &&
438                         sd->account_id < ARRAYLENGTH(ch_server) &&
439                         !session_isValid(ch_server[sd->account_id].fd) )
440                 {
441                         ShowStatus("Connection of the char-server '%s' accepted.\n", server_name);
442                         safestrncpy(ch_server[sd->account_id].name, server_name, sizeof(ch_server[sd->account_id].name));
443                         ch_server[sd->account_id].fd = fd;
444                         ch_server[sd->account_id].ip = server_ip;
445                         ch_server[sd->account_id].port = server_port;
446                         ch_server[sd->account_id].users = 0;
447                         ch_server[sd->account_id].type = type;
448                         ch_server[sd->account_id].new_ = new_;
449
450                         session[fd]->func_parse = logchrif_parse;
451                         session[fd]->flag.server = 1;
452                         realloc_fifo(fd, FIFOSIZE_SERVERLINK, FIFOSIZE_SERVERLINK);
453
454                         // send connection success
455                         WFIFOHEAD(fd,3);
456                         WFIFOW(fd,0) = 0x2711;
457                         WFIFOB(fd,2) = 0;
458                         WFIFOSET(fd,3);
459                 }
460                 else
461                 {
462                         ShowNotice("Connection of the char-server '%s' REFUSED.\n", server_name);
463                         WFIFOHEAD(fd,3);
464                         WFIFOW(fd,0) = 0x2711;
465                         WFIFOB(fd,2) = 3;
466                         WFIFOSET(fd,3);
467                 }
468         }
469         return 1;
470 }
471
472 /**
473  * Entry point from client to log-server.
474  * Function that checks incoming command, then splits it to the correct handler.
475  * @param fd: file descriptor to parse, (link to client)
476  * @return 0=invalid session,marked for disconnection,unknow packet, banned..; 1=success
477  */
478 int logclif_parse(int fd) {
479         struct login_session_data* sd = (struct login_session_data*)session[fd]->session_data;
480
481         char ip[16];
482         uint32 ipl = session[fd]->client_addr;
483         ip2str(ipl, ip);
484
485         if( session[fd]->flag.eof )
486         {
487                 ShowInfo("Closed connection from '"CL_WHITE"%s"CL_RESET"'.\n", ip);
488                 do_close(fd);
489                 return 0;
490         }
491
492         if( sd == NULL )
493         {
494                 // Perform ip-ban check
495                 if( login_config.ipban && ipban_check(ipl) )
496                 {
497                         ShowStatus("Connection refused: IP isn't authorised (deny/allow, ip: %s).\n", ip);
498                         login_log(ipl, "unknown", -3, "ip banned");
499                         WFIFOHEAD(fd,23);
500                         WFIFOW(fd,0) = 0x6a;
501                         WFIFOB(fd,2) = 3; // 3 = Rejected from Server
502                         WFIFOSET(fd,23);
503                         set_eof(fd);
504                         return 0;
505                 }
506                 // create a session for this new connection
507                 CREATE(session[fd]->session_data, struct login_session_data, 1);
508                 sd = (struct login_session_data*)session[fd]->session_data;
509                 sd->fd = fd;
510         }
511
512         while( RFIFOREST(fd) >= 2 )
513         {
514                 uint16 command = RFIFOW(fd,0);
515                 int next=1;
516
517                 switch( command )
518                 {
519                 // New alive packet: used to verify if client is always alive.
520                 case 0x0200: next = logclif_parse_keepalive(fd); break;
521                 // client md5 hash (binary)
522                 case 0x0204: next = logclif_parse_updclhash(fd,sd); break;
523                 // request client login (raw password)
524                 case 0x0064: // S 0064 <version>.L <username>.24B <password>.24B <clienttype>.B
525                 case 0x0277: // S 0277 <version>.L <username>.24B <password>.24B <clienttype>.B <ip address>.16B <adapter address>.13B
526                 case 0x02b0: // S 02b0 <version>.L <username>.24B <password>.24B <clienttype>.B <ip address>.16B <adapter address>.13B <g_isGravityID>.B
527                 // request client login (md5-hashed password)
528                 case 0x01dd: // S 01dd <version>.L <username>.24B <password hash>.16B <clienttype>.B
529                 case 0x01fa: // S 01fa <version>.L <username>.24B <password hash>.16B <clienttype>.B <?>.B(index of the connection in the clientinfo file (+10 if the command-line contains "pc"))
530                 case 0x027c: // S 027c <version>.L <username>.24B <password hash>.16B <clienttype>.B <?>.13B(junk)
531                 case 0x0825: // S 0825 <packetsize>.W <version>.L <clienttype>.B <userid>.24B <password>.27B <mac>.17B <ip>.15B <token>.(packetsize - 0x5C)B
532                         next = logclif_parse_reqauth(fd,  sd, command, ip); 
533                         break;
534                 // Sending request of the coding key
535                 case 0x01db: next = logclif_parse_reqkey(fd, sd); break;
536                 // Connection request of a char-server
537                 case 0x2710: logclif_parse_reqcharconnec(fd,sd, ip); return 0; // processing will continue elsewhere
538                 default:
539                         ShowNotice("Abnormal end of connection (ip: %s): Unknown packet 0x%x\n", ip, command);
540                         set_eof(fd);
541                         return 0;
542                 }
543                 if(next==0) return 0; // avoid processing of followup packets (prev was probably incomplete)
544         }
545
546         return 0;
547 }
548
549
550
551 /// Constructor destructor
552
553 /**
554  * Initialize the module.
555  * Launched at login-serv start, create db or other long scope variable here.
556  */
557 void do_init_loginclif(void){
558         return;
559 }
560
561 /**
562  * loginclif destructor
563  *  dealloc..., function called at exit of the login-serv
564  */
565 void do_final_loginclif(void){
566         return;
567 }