Browse Source

Channged connectionStatus check to a switch.

release/0.19
JustinAJ 10 years ago
parent
commit
9e9ffc070d
  1. 26
      Jupiter/IRC_Client.cpp

26
Jupiter/IRC_Client.cpp

@ -604,8 +604,9 @@ int Jupiter::IRC::Client::primaryHandler()
}
break;
} // numeric switch
if (Jupiter::IRC::Client::data_->connectionStatus == 1) // Socket established -- attempting STARTTLS
switch (Jupiter::IRC::Client::data_->connectionStatus)
{
case 1: // Socket established -- attempting STARTTLS
switch (numeric)
{
case IRC_RPL_BOUNCEOLD: // 005
@ -689,9 +690,9 @@ int Jupiter::IRC::Client::primaryHandler()
default:
break;
} // numeric switch
}
else if (Jupiter::IRC::Client::data_->connectionStatus == 2) // Capability negotiation
{
break;
case 2: // Capability negotiation
switch (numeric)
{
case 0:
@ -748,8 +749,9 @@ int Jupiter::IRC::Client::primaryHandler()
default:
break;
} // numeric switch
}
else if (Jupiter::IRC::Client::data_->connectionStatus == 3) // Registration sent, but not verified.
break;
case 3: // Registration sent, but not verified.
{
bool completelyBadNick = false;
switch (numeric)
@ -820,8 +822,9 @@ int Jupiter::IRC::Client::primaryHandler()
break;
}
}
else if (Jupiter::IRC::Client::data_->connectionStatus == 4) // Registration verified, but connection process in progress.
{
break;
case 4: // Registration verified, but connection process in progress.
switch (numeric)
{
case IRC_RPL_ISUPPORT: // 005
@ -904,9 +907,9 @@ int Jupiter::IRC::Client::primaryHandler()
}
break;
}
}
else // Post-registration.
{
break;
default: // Post-registration.
if (streqli(w2.c_str(), "PRIVMSG"))
{
Jupiter::CStringS chan = buff.getWord(2, WHITESPACE);
@ -1200,6 +1203,7 @@ int Jupiter::IRC::Client::primaryHandler()
if (i >= 0) Jupiter::IRC::Client::data_->channels.get(i)->data_->isAddingNames = false;
}
}
break;
}
}
else

Loading…
Cancel
Save