本文整理汇总了C++中CIRCNetwork::GetIRCServer方法的典型用法代码示例。如果您正苦于以下问题:C++ CIRCNetwork::GetIRCServer方法的具体用法?C++ CIRCNetwork::GetIRCServer怎么用?C++ CIRCNetwork::GetIRCServer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CIRCNetwork
的用法示例。
在下文中一共展示了CIRCNetwork::GetIRCServer方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UserCommand
//.........这里部分代码省略.........
if (m_pUser->DeleteNetwork(sNetwork)) {
PutStatus("Network deleted");
} else {
PutStatus("Failed to delete network");
PutStatus("Perhaps this network doesn't exist");
}
} else if (sCommand.Equals("LISTNETWORKS")) {
CUser *pUser = m_pUser;
if (m_pUser->IsAdmin() && !sLine.Token(1).empty()) {
pUser = CZNC::Get().FindUser(sLine.Token(1));
if (!pUser) {
PutStatus("User not found " + sLine.Token(1));
return;
}
}
const vector<CIRCNetwork*>& vNetworks = pUser->GetNetworks();
CTable Table;
Table.AddColumn("Network");
Table.AddColumn("OnIRC");
Table.AddColumn("IRC Server");
Table.AddColumn("IRC User");
Table.AddColumn("Channels");
for (unsigned int a = 0; a < vNetworks.size(); a++) {
CIRCNetwork* pNetwork = vNetworks[a];
Table.AddRow();
Table.SetCell("Network", pNetwork->GetName());
if (pNetwork->IsIRCConnected()) {
Table.SetCell("OnIRC", "Yes");
Table.SetCell("IRC Server", pNetwork->GetIRCServer());
Table.SetCell("IRC User", pNetwork->GetIRCNick().GetNickMask());
Table.SetCell("Channels", CString(pNetwork->GetChans().size()));
} else {
Table.SetCell("OnIRC", "No");
}
}
if (PutStatus(Table) == 0) {
PutStatus("No networks");
}
} else if (sCommand.Equals("JUMPNETWORK")) {
CString sNetwork = sLine.Token(1);
if (sNetwork.empty()) {
PutStatus("No network supplied.");
return;
}
if (m_pNetwork && (m_pNetwork->GetName() == sNetwork)) {
PutStatus("You are already connected with this network.");
return;
}
CIRCNetwork *pNetwork = m_pUser->FindNetwork(sNetwork);
if (pNetwork) {
PutStatus("Switched to " + sNetwork);
SetNetwork(pNetwork);
} else {
PutStatus("You don't have a network named " + sNetwork);
}
} else if (sCommand.Equals("MODE")) {
CString sNetwork = sLine.Token(1);