}
/* Bind */
- if (strlen(IRCItem->vhost) > 0)
+ if (!EmptyString(IRCItem->vhost))
{
int bindret = 0;
if (!inet_pton(AF_INET, IRCItem->vhost, &(IRC_LOCAL.in4.s_addr)))
irc_send("NICK %s", IRCItem->nick);
- if(strlen(IRCItem->password) > 0)
+ if (!EmptyString(IRCItem->password))
irc_send("PASS %s", IRCItem->password);
irc_send("USER %s %s %s :%s",
log_printf("IRC -> Connected to %s:%d", IRCItem->server, IRCItem->port);
/* Identify to nickserv if needed */
- if(strlen(IRCItem->nickserv))
+ if (!EmptyString(IRCItem->nickserv))
irc_send("%s", IRCItem->nickserv);
/* Oper */
{
channel = (struct ChannelConf *) node->data;
- if(strlen(channel->name) == 0)
+ if (EmptyString(channel->name))
continue;
- if(strlen(channel->key) > 0)
+ if (!EmptyString(channel->key))
irc_send("JOIN %s %s", channel->name, channel->key);
else
irc_send("JOIN %s", channel->name);
if((channel = get_channel(parv[3])) == NULL)
return;
- if(strlen(channel->invite) == 0)
+ if (EmptyString(channel->invite))
return;
irc_send("%s", channel->invite);