prevent empty messages
This commit is contained in:
parent
dac167ba41
commit
80ec1f3f0d
@ -171,7 +171,7 @@ def mysql_check_messages():
|
|||||||
str = f"""say {result}"""
|
str = f"""say {result}"""
|
||||||
print('str: ', str)
|
print('str: ', str)
|
||||||
writeCfgInput(str)
|
writeCfgInput(str)
|
||||||
time.sleep(0.2)
|
time.sleep(0.9)
|
||||||
sql_statement = f"""DELETE FROM unloze_css_autism_bot.`chatting` WHERE `responsemessage` = '{result}'"""
|
sql_statement = f"""DELETE FROM unloze_css_autism_bot.`chatting` WHERE `responsemessage` = '{result}'"""
|
||||||
print('sql_statement: ', sql_statement)
|
print('sql_statement: ', sql_statement)
|
||||||
cur.execute(sql_statement)
|
cur.execute(sql_statement)
|
||||||
@ -194,7 +194,7 @@ def mysql_check_if_connected():
|
|||||||
#playercount might not be updated ingame and auto leave?
|
#playercount might not be updated ingame and auto leave?
|
||||||
print('connected: ', connected)
|
print('connected: ', connected)
|
||||||
if connected == 0:
|
if connected == 0:
|
||||||
str1 = "connect 151.80.230.149:27019/test132;"
|
str1 = "connect 151.80.230.149:27015;"
|
||||||
writeCfgInput(str1)
|
writeCfgInput(str1)
|
||||||
time.sleep(0.2)
|
time.sleep(0.2)
|
||||||
writeCfgInput("wait 5;")
|
writeCfgInput("wait 5;")
|
||||||
|
@ -60,6 +60,11 @@ public Action cmd_talk(int client, int args)
|
|||||||
{
|
{
|
||||||
char info[generic_length];
|
char info[generic_length];
|
||||||
GetCmdArgString(info, sizeof(info));
|
GetCmdArgString(info, sizeof(info));
|
||||||
|
if (strlen(info) == 0)
|
||||||
|
{
|
||||||
|
PrintToChat(client, "Add a message to the command if autism bot is ingame");
|
||||||
|
return Plugin_Handled;
|
||||||
|
}
|
||||||
char error_connect[generic_length];
|
char error_connect[generic_length];
|
||||||
Database database_connection;
|
Database database_connection;
|
||||||
if (SQL_CheckConfig("css_autism_bot_info"))
|
if (SQL_CheckConfig("css_autism_bot_info"))
|
||||||
|
Loading…
Reference in New Issue
Block a user