6 static CMD_BIND(neonserv_cmd_help) {
9 ident = merge_argv(argv, 0, argc);
14 printf_mysql_query("SELECT `user_lang` FROM `users` WHERE `user_user` = '%s'", escape_string(user->auth));
17 if ((row = mysql_fetch_row(res)) != NULL)
21 printf_mysql_query("SELECT `text` FROM `help` WHERE `lang` = '%s' AND `ident` = '%s'", escape_string(lang), escape_string(ident));
23 if ((row = mysql_fetch_row(res)) == NULL) {
24 if(stricmp(lang, "en")) {
25 printf_mysql_query("SELECT `text` FROM `help` WHERE `lang` = 'en' AND `ident` = '%s'", escape_string(ident));
28 if ((row = mysql_fetch_row(res)) == NULL) {
29 reply(getTextBot(), user, "NS_HELP_TOPIC");
36 for(i = 0; i < strlen(row[0]); i++) {
40 sendBuf[sendBufPos] = '\0';
41 reply(getTextBot(), user, "%s", sendBuf);
48 sendBuf[sendBufPos++] = '\002';
52 sendBuf[sendBufPos++] = '\003';
56 sendBuf[sendBufPos++] = '\031';
61 sendBufPos += sprintf(sendBuf + sendBufPos, "%s", client->user->nick);
65 sendBuf[sendBufPos++] = '$';
70 sendBuf[sendBufPos++] = row[0][i];
75 sendBuf[sendBufPos] = '\0';
76 reply(getTextBot(), user, "%s", sendBuf);