Merge pull request #625 from orium/network-name-improve
Improved server_get_network()
This commit is contained in:
commit
c9c8993b9d
@ -1903,9 +1903,14 @@ server_set_defaults (server *serv)
|
||||
char *
|
||||
server_get_network (server *serv, gboolean fallback)
|
||||
{
|
||||
/* check the network list */
|
||||
if (serv->network)
|
||||
return ((ircnet *)serv->network)->name;
|
||||
|
||||
/* check the network name given in 005 NETWORK=... */
|
||||
if (serv->server_session && *serv->server_session->channel)
|
||||
return serv->server_session->channel;
|
||||
|
||||
if (fallback)
|
||||
return serv->servername;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user