Fix bug #100 - Null pointer crash if sending a chat message without the message part.

This commit is contained in:
Jan Vidar Krey 2009-12-09 19:30:08 +01:00
parent 7c093dc5da
commit 50f5ce9d32

View File

@ -183,7 +183,10 @@ int hub_handle_chat_message(struct hub_info* hub, struct hub_user* u, struct adc
char* message = adc_msg_get_argument(cmd, 0);
int ret = 0;
int relay = 1;
if (!message)
return 0;
if ((cmd->cache[0] == 'B') && (message[0] == '!' || message[0] == '+'))
{
/*