When calling the mysql_real_connect for the first time, this connection will be stored in a global (libcod) variable. This function retrieves said variable (or undefined if no connection has been set up yet).
Very useful when trying to keep mysql connections to a minimum.