From fc30c3ea279b53b2c0e2a3b71f9811ff1033076c Mon Sep 17 00:00:00 2001 From: Szymon Tomasz Stefanek Date: Sat, 25 Dec 2010 03:14:10 +0000 Subject: Added the very first shy 'auto-join this channel' feature to the window popup. .serverJoinChannels and .networkJoinChannels now return arrays. Reworked a bit the 'network name' mess in the IrcConnection... possibly needs more reorganizing. Some small tweaks in the server dialog. git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@5226 17fca916-40b9-46aa-a4ea-0a15b648b75c --- src/kvirc/kernel/kvi_ircconnection.cpp | 10 +- src/kvirc/kernel/kvi_ircconnection.h | 4 +- src/kvirc/kernel/kvi_ircconnectionserverinfo.h | 3 + src/kvirc/kernel/kvi_ircconnectiontarget.cpp | 17 +- src/kvirc/kernel/kvi_ircconnectiontarget.h | 57 ++++-- .../kernel/kvi_ircconnectiontargetresolver.cpp | 2 +- src/kvirc/kvs/kvi_kvs_treenode_operation.cpp | 4 +- src/kvirc/sparser/kvi_sp_numeric.cpp | 7 +- src/kvirc/ui/kvi_channel.cpp | 4 +- src/kvirc/ui/kvi_console.h | 2 +- src/kvirc/ui/kvi_statusbar.cpp | 2 +- src/kvirc/ui/kvi_windowlist.cpp | 2 +- src/modules/context/libkvicontext.cpp | 84 ++++++++- src/modules/list/listwindow.cpp | 2 +- src/modules/my/libkvimy.cpp | 10 +- src/modules/options/optw_servers.cpp | 25 ++- src/modules/options/optw_servers.h | 1 + src/modules/serverdb/libkviserverdb.cpp | 206 ++++++++++++--------- 18 files changed, 309 insertions(+), 133 deletions(-) (limited to 'src') diff --git a/src/kvirc/kernel/kvi_ircconnection.cpp b/src/kvirc/kernel/kvi_ircconnection.cpp index c18579c97..21cf68b5c 100644 --- a/src/kvirc/kernel/kvi_ircconnection.cpp +++ b/src/kvirc/kernel/kvi_ircconnection.cpp @@ -282,9 +282,10 @@ void KviIrcConnection::serverInfoReceived(const QString & szServerName, const QS m_pConsole->frame()->childConnectionServerInfoChange(this); } -const QString & KviIrcConnection::networkName() +const QString & KviIrcConnection::currentNetworkName() { - return m_pTarget->networkName(); + //return m_pTarget->networkName(); + return m_pServerInfo->networkName(); } void KviIrcConnection::abort() @@ -311,7 +312,8 @@ void KviIrcConnection::linkEstabilished() // setup reasonable defaults before notifying anyone m_pStatistics->setConnectionStartTime(kvi_unixTime()); m_pStatistics->setLastMessageTime(kvi_unixTime()); - m_pServerInfo->setName(target()->server()->m_szHostname); + m_pServerInfo->setName(target()->server()->hostName()); + m_pServerInfo->setNetworkName(target()->network()->name()); // FIXME: With STARTTLS this is called TWICE! if(KviPointerList * l = context()->monitorList()) @@ -661,7 +663,7 @@ void KviIrcConnection::registerChannel(KviChannel * c) { m_pChannelList->append(c); if(KVI_OPTION_BOOL(KviOption_boolLogChannelHistory)) - g_pApp->addRecentChannel(c->windowName(),m_pTarget->networkName()); + g_pApp->addRecentChannel(c->windowName(),m_pServerInfo->networkName()); emit(channelRegistered(c)); emit(chanListChanged()); } diff --git a/src/kvirc/kernel/kvi_ircconnection.h b/src/kvirc/kernel/kvi_ircconnection.h index a21c8a990..e0836d38b 100644 --- a/src/kvirc/kernel/kvi_ircconnection.h +++ b/src/kvirc/kernel/kvi_ircconnection.h @@ -353,10 +353,10 @@ public: inline KviPointerList * channelList(){ return m_pChannelList; }; /** - * \brief Forwarder from KviIrcConnectionTarget, always non-empty string + * \brief Helper that provides a shortcut for really common access to serverInfo()->networkName() * \return const QString & */ - const QString & networkName(); + const QString & currentNetworkName(); /** * \brief Helper that provides a shortcut for really common access to userInfo()->nickName() diff --git a/src/kvirc/kernel/kvi_ircconnectionserverinfo.h b/src/kvirc/kernel/kvi_ircconnectionserverinfo.h index 205dcefd5..31ef4d79a 100644 --- a/src/kvirc/kernel/kvi_ircconnectionserverinfo.h +++ b/src/kvirc/kernel/kvi_ircconnectionserverinfo.h @@ -165,6 +165,7 @@ protected: ~KviIrcConnectionServerInfo(); private: KviBasicIrcServerInfo * m_pServInfo; + QString m_szNetworkName; // the most actual network name (may be the one we specify or the one that the server reports) QString m_szName; // the most actual server name (may be the one we specify or the one that the server wants to be known as) QString m_szSupportedUserModes; // the supported user modes QString m_szSupportedChannelModes; // the supported channel modes (all of them) @@ -192,6 +193,7 @@ public: const char * software() { return m_pServInfo ? m_pServInfo->getSoftware() : 0; }; bool getNeedsOpToListModeseI() { return m_pServInfo ? m_pServInfo->getNeedsOpToListModeseI() : false; }; const QString & name() { return m_szName; }; + const QString & networkName() { return m_szNetworkName; }; const QString & supportedUserModes() { return m_szSupportedUserModes; }; const QString & supportedChannelModes() { return m_szSupportedChannelModes; }; const QString & supportedChannelTypes() { return m_szSupportedChannelTypes; }; @@ -221,6 +223,7 @@ public: kvi_u32_t modeFlagFromPrefixChar(QChar c); kvi_u32_t modeFlagFromModeChar(QChar c); protected: + void setNetworkName(const QString &szName){ m_szNetworkName = szName; }; void setName(const QString &szName) { m_szName = szName; }; void setSupportedUserModes(const QString &szSupportedUserModes) { m_szSupportedUserModes = szSupportedUserModes; }; void setSupportedChannelModes(const QString &szSupportedChannelModes); diff --git a/src/kvirc/kernel/kvi_ircconnectiontarget.cpp b/src/kvirc/kernel/kvi_ircconnectiontarget.cpp index 1ddbe1ad0..2bd1bb10b 100644 --- a/src/kvirc/kernel/kvi_ircconnectiontarget.cpp +++ b/src/kvirc/kernel/kvi_ircconnectiontarget.cpp @@ -29,14 +29,16 @@ #include "kvi_network.h" #include "kvi_proxydb.h" -KviIrcConnectionTarget::KviIrcConnectionTarget(const KviNetwork * pNetwork, - const KviServer * pServer, - const KviProxy * pProxy, - const QString &szBindAddress) +KviIrcConnectionTarget::KviIrcConnectionTarget( + const KviNetwork * pNetwork, + const KviServer * pServer, + const KviProxy * pProxy, + const QString &szBindAddress + ) { m_pNetwork = new KviNetwork(*pNetwork); m_pServer = new KviServer(*pServer); - m_pProxy = pProxy ? new KviProxy(*pProxy) : 0; + m_pProxy = pProxy ? new KviProxy(*pProxy) : NULL; m_szBindAddress = szBindAddress; } @@ -44,9 +46,11 @@ KviIrcConnectionTarget::~KviIrcConnectionTarget() { delete m_pNetwork; delete m_pServer; - if(m_pProxy)delete m_pProxy; + if(m_pProxy) + delete m_pProxy; } +#if 0 const QString & KviIrcConnectionTarget::networkName() { return m_pNetwork->name(); @@ -56,6 +60,7 @@ void KviIrcConnectionTarget::setNetworkName(const QString &szNetName) { m_pNetwork->setName(szNetName); } +#endif void KviIrcConnectionTarget::clearProxy() diff --git a/src/kvirc/kernel/kvi_ircconnectiontarget.h b/src/kvirc/kernel/kvi_ircconnectiontarget.h index d67ba5ef3..258d5a5e3 100644 --- a/src/kvirc/kernel/kvi_ircconnectiontarget.h +++ b/src/kvirc/kernel/kvi_ircconnectiontarget.h @@ -38,32 +38,63 @@ class KVIRC_API KviIrcConnectionTarget : public KviHeapObject public: // pServer is a shallow pointer: this class makes a copy of it internally, must NOT be null // pProxy may be null if a proxy is not desired. this class makes a copy of it internally - KviIrcConnectionTarget(const KviNetwork * pNetwork, - const KviServer * pServer, - const KviProxy * pProxy = 0, - const QString &szBindAddress = QString()); + KviIrcConnectionTarget( + const KviNetwork * pNetwork, + const KviServer * pServer, + const KviProxy * pProxy = 0, + const QString &szBindAddress = QString() + ); ~KviIrcConnectionTarget(); private: - KviNetwork * m_pNetwork; // owned, never null - KviServer * m_pServer; // owned, never null - KviProxy * m_pProxy; // owned, may be null + KviNetwork * m_pNetwork; // owned, never null, it's a COPY of the entry in the db + KviServer * m_pServer; // owned, never null, it's a COPY of the entry in the db + KviProxy * m_pProxy; // owned, may be null, it's a COPY of the entry in the db QString m_szBindAddress; // forced bind address + public: - KviServer * server(){ return m_pServer; }; - KviNetwork * network(){ return m_pNetwork; }; - KviProxy * proxy(){ return m_pProxy; }; - const QString & bindAddress(){ return m_szBindAddress; }; - bool hasBindAddress(){ return (!m_szBindAddress.isEmpty()); }; + + KviServer * server() + { + return m_pServer; + } + + KviNetwork * network() + { + return m_pNetwork; + } + + KviProxy * proxy() + { + return m_pProxy; + } + + const QString & bindAddress() + { + return m_szBindAddress; + } + + bool hasBindAddress() + { + return (!m_szBindAddress.isEmpty()); + } + +#if 0 const QString & networkName(); + // this allows to force the network name: it should be used only by KviConsole // but it's KviServerParser (kvi_sp_numeric.cpp) that first // gets the new network name... thus we make it public // to remove one level of indirection. void setNetworkName(const QString &szNetName); +#endif + protected: // this is for KviIrcConnectionTargetResolver only void clearProxy(); - void setBindAddress(const QString &szBindAddress){ m_szBindAddress = szBindAddress; }; + void setBindAddress(const QString &szBindAddress) + { + m_szBindAddress = szBindAddress; + } }; #endif //!_KVI_IRCCONNECTIONTARGET_H_ diff --git a/src/kvirc/kernel/kvi_ircconnectiontargetresolver.cpp b/src/kvirc/kernel/kvi_ircconnectiontargetresolver.cpp index 65a9adf86..f49910661 100644 --- a/src/kvirc/kernel/kvi_ircconnectiontargetresolver.cpp +++ b/src/kvirc/kernel/kvi_ircconnectiontargetresolver.cpp @@ -158,7 +158,7 @@ void KviIrcConnectionTargetResolver::asyncStartResolve() __tr2qs("Attempting %Q to %Q (%Q) on port %u"), m_pTarget->server()->useSSL() ? &(__tr2qs("secure connection")) : &(__tr2qs("connection")), &(m_pTarget->server()->m_szHostname), - &(m_pTarget->networkName()), + &(m_pTarget->network()->name()), m_pTarget->server()->m_uPort); if(m_pTarget->proxy()) diff --git a/src/kvirc/kvs/kvi_kvs_treenode_operation.cpp b/src/kvirc/kvs/kvi_kvs_treenode_operation.cpp index 7e15c46b4..53a409cc0 100644 --- a/src/kvirc/kvs/kvi_kvs_treenode_operation.cpp +++ b/src/kvirc/kvs/kvi_kvs_treenode_operation.cpp @@ -779,7 +779,9 @@ void KviKvsTreeNodeOperationSelfSum::dump(const char * prefix) bool KviKvsTreeNodeOperationSelfSum::execute(KviKvsRunTimeContext * c) { KviKvsVariant v; - if(!m_pRightSide->evaluateReadOnly(c,&v))return false; + if(!m_pRightSide->evaluateReadOnly(c,&v)) + return false; + KviKvsNumber rnum; if(!v.asNumber(rnum)) diff --git a/src/kvirc/sparser/kvi_sp_numeric.cpp b/src/kvirc/sparser/kvi_sp_numeric.cpp index a45acc65e..b50f4fcc3 100644 --- a/src/kvirc/sparser/kvi_sp_numeric.cpp +++ b/src/kvirc/sparser/kvi_sp_numeric.cpp @@ -296,7 +296,10 @@ void KviServerParser::parseNumeric005(KviIrcMessage *msg) { p += 8; QString tmp = p; - if(!tmp.isEmpty())msg->console()->connection()->target()->setNetworkName(tmp); + + if(!tmp.isEmpty()) + msg->console()->connection()->serverInfo()->setNetworkName(tmp); + if((!_OUTPUT_MUTE) && (!msg->haltOutput()) && KVI_OPTION_BOOL(KviOption_boolShowExtendedServerInfo)) { msg->console()->output(KVI_OUT_SERVERINFO,__tr2qs("The current network is %Q"),&tmp); @@ -961,7 +964,7 @@ void KviServerParser::parseLoginNicknameProblem(KviIrcMessage *msg) KviIdentityProfile * pProfile = 0; if(bProfilesEnabled) { - pProfile = pSet->findNetwork(msg->connection()->networkName()); + pProfile = pSet->findNetwork(msg->connection()->currentNetworkName()); if(pProfile) { szNextNick = pProfile->altNick(); diff --git a/src/kvirc/ui/kvi_channel.cpp b/src/kvirc/ui/kvi_channel.cpp index 7ca800883..62506fd21 100644 --- a/src/kvirc/ui/kvi_channel.cpp +++ b/src/kvirc/ui/kvi_channel.cpp @@ -305,7 +305,7 @@ void KviChannel::getBaseLogFileName(QString & szBuffer) { szBuffer = szChan; szBuffer.append("."); - szBuffer.append(connection()->networkName()); + szBuffer.append(connection()->currentNetworkName()); } else { szBuffer = szChan; szBuffer.append("."); @@ -338,7 +338,7 @@ void KviChannel::getConfigGroupName(QString & szBuffer) // if(connection()) // { // szBuffer.append("@"); -// szBuffer.append(connection()->networkName()); +// szBuffer.append(connection()->currentNetworkName()); // } } diff --git a/src/kvirc/ui/kvi_console.h b/src/kvirc/ui/kvi_console.h index 1e8a43be4..92407e7e8 100644 --- a/src/kvirc/ui/kvi_console.h +++ b/src/kvirc/ui/kvi_console.h @@ -239,7 +239,7 @@ inline bool KviConsole::isNotConnected() inline QString KviConsole::currentNetworkName() { - return (connection() ? connection()->networkName() : QString()); + return (connection() ? connection()->currentNetworkName() : QString()); } #endif //_KVI_CONSOLE_H_ diff --git a/src/kvirc/ui/kvi_statusbar.cpp b/src/kvirc/ui/kvi_statusbar.cpp index 512fda21f..3f53a7883 100644 --- a/src/kvirc/ui/kvi_statusbar.cpp +++ b/src/kvirc/ui/kvi_statusbar.cpp @@ -555,7 +555,7 @@ void KviStatusBar::mouseDoubleClickEvent(QMouseEvent *) szText += __tr2qs("Network"); szText += ": "; - szText += c->connection()->networkName(); + szText += c->connection()->currentNetworkName(); szText += "
"; szText += __tr2qs("Server"); szText += ": "; diff --git a/src/kvirc/ui/kvi_windowlist.cpp b/src/kvirc/ui/kvi_windowlist.cpp index 21b5f86b8..f1163aa27 100644 --- a/src/kvirc/ui/kvi_windowlist.cpp +++ b/src/kvirc/ui/kvi_windowlist.cpp @@ -101,7 +101,7 @@ void KviWindowListBase::getTextForConsole(QString &szText,KviConsole * pConsole) // FIXME: Should never show "Standalone Servers" or "orphan_servers". // It would also be nice to have a number appended to // multiple entries with the same server name...but this costs too much. - szText = pConsole->connection()->networkName(); + szText = pConsole->connection()->currentNetworkName(); if(szText.isEmpty()) szText = pConsole->connection()->currentServerName(); } else { diff --git a/src/modules/context/libkvicontext.cpp b/src/modules/context/libkvicontext.cpp index acd5d66ed..bd3118be8 100644 --- a/src/modules/context/libkvicontext.cpp +++ b/src/modules/context/libkvicontext.cpp @@ -105,15 +105,50 @@ If the irc_context_id specification is not valid then this function returns nothing. If the specified IRC context is not currently connected then this function returns nothing. + The network name is the one that the server reports or + the one stored in the server database if the server reports no + network name. This is equivalent to [fnc]$my.network[/fnc]. @seealso: [fnc]$context.serverHostName[/fnc] + [fnc]$context.serverdbNetworkName[/fnc] */ STANDARD_IRC_CONNECTION_TARGET_PARAMETER( context_kvs_fnc_networkName, - c->returnValue()->setString(pConnection->target()->network()->name()) + c->returnValue()->setString(pConnection->currentNetworkName()) ) +/* + @doc: context.serverdbNetworkName + @type: + function + @title: + $context.serverdbNetworkName + @short: + Returns the original IRC network name of an IRC context + @syntax: + $context.serverdbNetworkName + $context.serverdbNetworkName() + @description: + Returns the name of the network for the specified IRC context. + If no irc_context_id is specified then the current irc_context is used. + If the irc_context_id specification is not valid then this function + returns nothing. If the specified IRC context is not currently connected + then this function returns nothing. + The returned network name is the one that has been specified + in the server database and may not correspond to the real network + name. However, this is the network name you want to use if + you want to manipulate the serverdb entries related to the current + connection. + @seealso: + [fnc]$context.serverHostName[/fnc] + [fnc]$context.networkName[/fnc] +*/ + +STANDARD_IRC_CONNECTION_TARGET_PARAMETER( + context_kvs_fnc_serverdbNetworkName, + c->returnValue()->setString(pConnection->target()->network()->name()) + ) /* @doc: context.serverHostName @@ -133,11 +168,14 @@ STANDARD_IRC_CONNECTION_TARGET_PARAMETER( If the irc_context_id specification is not valid then this function returns nothing. If the specified IRC context is not currently connected then this function returns nothing. - If the returned value is non empty then it will always be a valid - DNS hostname that can be used to perform a real connection. - Please note that this is different from $my.server() which might - return an invalid DNS entry. + Please note that this function returns the name of the server as reported + by the server itself. Some servers report a bogus value for this field. + You should take a look at [fnc]$context.serverIpAddress[/fnc] if you want a value that + can be used to really reconnect to this server. If you want a value + to manipulate the server entry via the serverdb functions then + you probably need [fnc]$context.serverdbServerHostName[/fnc]. @seealso: + [fnc]$context.serverdbServerHostName[/fnc] [fnc]$context.serverPort[/fnc], [fnc]$context.serverIpAddress[/fnc], [fnc]$context.serverPassword[/fnc] @@ -145,6 +183,40 @@ STANDARD_IRC_CONNECTION_TARGET_PARAMETER( STANDARD_IRC_CONNECTION_TARGET_PARAMETER( context_kvs_fnc_serverHostName, + c->returnValue()->setString(pConnection->currentServerName()) + ) + +/* + @doc: context.serverdbServerHostName + @type: + function + @title: + $context.serverdbServerHostName + @short: + Returns the original IRC server name of an IRC context + @syntax: + $context.serverdbServerHostName + $context.serverdbServerHostName() + @description: + Returns the host name of the IRC server that was used to perform + the connection in the specified irc context. + If no irc_context_id is specified then the current irc_context is used. + If the irc_context_id specification is not valid then this function + returns nothing. If the specified IRC context is not currently connected + then this function returns nothing. + The returned server name is the one that has been specified + in the server database and may refer to a round-robin dns entry. + However, this is the server name you want to use if you want to manipulate + the serverdb entries related to the current connection. + @seealso: + [fnc]$context.serverHostName[/fnc], + [fnc]$context.serverPort[/fnc], + [fnc]$context.serverIpAddress[/fnc], + [fnc]$context.serverPassword[/fnc] +*/ + +STANDARD_IRC_CONNECTION_TARGET_PARAMETER( + context_kvs_fnc_serverdbServerHostName, c->returnValue()->setString(pConnection->target()->server()->hostName()) ) @@ -457,6 +529,8 @@ static bool context_module_init(KviModule * m) KVSM_REGISTER_FUNCTION(m,"serverIsSSL",context_kvs_fnc_serverIsSSL); KVSM_REGISTER_FUNCTION(m,"serverPassword",context_kvs_fnc_serverPassword); KVSM_REGISTER_FUNCTION(m,"networkName",context_kvs_fnc_networkName); + KVSM_REGISTER_FUNCTION(m,"serverdbNetworkName",context_kvs_fnc_serverdbNetworkName); + KVSM_REGISTER_FUNCTION(m,"serverdbServerHostName",context_kvs_fnc_serverdbServerHostName); KVSM_REGISTER_FUNCTION(m,"state",context_kvs_fnc_state); KVSM_REGISTER_FUNCTION(m,"list",context_kvs_fnc_list); KVSM_REGISTER_FUNCTION(m,"serverSoftware",context_kvs_fnc_serverSoftware); diff --git a/src/modules/list/listwindow.cpp b/src/modules/list/listwindow.cpp index 6961548a6..c949bb307 100644 --- a/src/modules/list/listwindow.cpp +++ b/src/modules/list/listwindow.cpp @@ -358,7 +358,7 @@ void KviListWindow::exportList() break; } KviQString::sprintf(szFile,__tr2qs("Channel list for %Q - %Q"), - &(connection()->networkName()),&(szDate)); + &(connection()->currentNetworkName()),&(szDate)); } else { szFile = __tr2qs("Channel list"); } diff --git a/src/modules/my/libkvimy.cpp b/src/modules/my/libkvimy.cpp index 5196fa01b..3ccbb6a04 100644 --- a/src/modules/my/libkvimy.cpp +++ b/src/modules/my/libkvimy.cpp @@ -343,8 +343,10 @@ static bool my_kvs_fnc_serverIsSSL(KviKvsModuleFunctionCall * c) in that irc_context.[br] Please note that this function returns the name of the server as reported by the server itself. Some servers report a bogus value for this field. - You should take a look at $context.serverIpAddress or $context.serverHostName - if you want a value that can be used to really reconnect to this server. + You should take a look at [fnc]$context.serverIpAddress[/fnc] if you want a value that + can be used to really reconnect to this server. If you want a value + to manipulate the server entry via the serverdb functions then + you probably need [fnc]$context.serverdbServerHostName[/fnc]. */ static bool my_kvs_fnc_server(KviKvsModuleFunctionCall * c) @@ -353,7 +355,7 @@ static bool my_kvs_fnc_server(KviKvsModuleFunctionCall * c) if(wnd) { if(wnd->connection()) - c->returnValue()->setString(wnd->connection()->serverInfo()->name()); + c->returnValue()->setString(wnd->connection()->currentServerName()); } return true; } @@ -381,7 +383,7 @@ static bool my_kvs_fnc_network(KviKvsModuleFunctionCall * c) if(wnd) { if(wnd->connection()) - c->returnValue()->setString(wnd->currentNetworkName().toUtf8().data()); + c->returnValue()->setString(wnd->currentNetworkName()); } return true; } diff --git a/src/modules/options/optw_servers.cpp b/src/modules/options/optw_servers.cpp index cda2e9545..67156b5bc 100644 --- a/src/modules/options/optw_servers.cpp +++ b/src/modules/options/optw_servers.cpp @@ -1321,6 +1321,7 @@ KviServerOptionsWidget::KviServerOptionsWidget(QWidget * parent) m_pSrvNetLabel = new QLabel(__tr2qs_ctx("Server:","options"),gbox); m_pSrvNetEdit = new QLineEdit(gbox); + connect(m_pSrvNetEdit,SIGNAL(textEdited(const QString &)),this,SLOT(serverNetworkEditTextEdited(const QString &))); KviTalToolTip::add(m_pSrvNetEdit,__tr2qs_ctx("
This is the name of the currently selected server or network
","options")); m_pDetailsButton = new QPushButton(__tr2qs_ctx("Advanced...","options"),gbox); @@ -1513,7 +1514,6 @@ void KviServerOptionsWidget::selectBestServerByUrl(const QString &szUrl) } - void KviServerOptionsWidget::connectCurrentClicked() { saveLastItem(); @@ -1604,19 +1604,36 @@ void KviServerOptionsWidget::currentItemChanged(QTreeWidgetItem *it,QTreeWidgetI } } +void KviServerOptionsWidget::serverNetworkEditTextEdited(const QString &) +{ + if(!m_pLastEditedItem) + return; + + saveLastItem(); + + // make sure the current item is currently visible (if it still exists) + if(m_pLastEditedItem) + m_pTreeWidget->scrollToItem(m_pLastEditedItem,QTreeWidget::EnsureVisible); +} + + void KviServerOptionsWidget::saveLastItem() { - if(!m_pLastEditedItem)return; + if(!m_pLastEditedItem) + return; + if(m_pLastEditedItem->m_pServerData) { KviStr tmp = m_pSrvNetEdit->text(); - if(tmp.isEmpty())tmp = "irc.unknown.net"; + if(tmp.isEmpty()) + tmp = "irc.unknown.net"; m_pLastEditedItem->m_pServerData->m_szHostname = tmp; m_pLastEditedItem->updateVisibleStrings(); } else if(m_pLastEditedItem->m_pNetworkData) { QString tmp = m_pSrvNetEdit->text(); - if(tmp.isEmpty())tmp = __tr2qs_ctx("UnknownNet","options"); + if(tmp.isEmpty()) + tmp = __tr2qs_ctx("UnknownNet","options"); m_pLastEditedItem->m_pNetworkData->setName(tmp); m_pLastEditedItem->updateVisibleStrings(); } diff --git a/src/modules/options/optw_servers.h b/src/modules/options/optw_servers.h index 0568bc563..496e377c9 100644 --- a/src/modules/options/optw_servers.h +++ b/src/modules/options/optw_servers.h @@ -221,6 +221,7 @@ protected slots: void recentServersPopupAboutToShow(); void recentServersPopupClicked(int id); void importPopupActivated(int id); + void serverNetworkEditTextEdited(const QString &szNewText); public: virtual void commit(); }; diff --git a/src/modules/serverdb/libkviserverdb.cpp b/src/modules/serverdb/libkviserverdb.cpp index 9a91c06d9..6a73b11cd 100644 --- a/src/modules/serverdb/libkviserverdb.cpp +++ b/src/modules/serverdb/libkviserverdb.cpp @@ -105,10 +105,10 @@ extern KVIRC_API KviServerDataBase * g_pServerDataBase; @short: Checks if the network already exists in the DB @syntax: - $serverdb.networkExists + $serverdb.networkExists() @description: Checks if the network already exists in the DB.[br] - It returns 1 if the network exixts, 0 otherwise + It returns 1 if the network exixts, 0 otherwise. @seealso: [module:serverdb]ServerDB module documentation[/module] */ @@ -146,7 +146,7 @@ static bool serverdb_kvs_fnc_networkExists(KviKvsModuleFunctionCall * c) @short: Checks if the network already exists in the DB @syntax: - $serverdb.serverExists([,]) + $serverdb.serverExists([,]) @description: Checks if the server already exists for a network in the DB.[br] If no network name is provided, the check is made globally.[br] @@ -212,7 +212,7 @@ static bool serverdb_kvs_fnc_serverExists(KviKvsModuleFunctionCall * c) return true; } -#define SERVERDB_GET_NETWORK_PROPERTY(__functionName,__callName) \ +#define BEGIN_SERVERDB_GET_NETWORK_PROPERTY(__functionName) \ static bool __functionName(KviKvsModuleFunctionCall * c) \ { \ QString szName; \ @@ -232,14 +232,21 @@ static bool serverdb_kvs_fnc_serverExists(KviKvsModuleFunctionCall * c) { \ c->error(__tr2qs_ctx("The specified network does not exist","serverdb")); \ return false; \ - } \ + } + + +#define END_SERVERDB_GET_NETWORK_PROPERTY \ + return true; \ + } + +#define SERVERDB_GET_NETWORK_PROPERTY(__functionName,__callName) \ + BEGIN_SERVERDB_GET_NETWORK_PROPERTY(__functionName) \ \ c->returnValue()->setString(pNetwork->__callName()); \ \ - return true; \ - } + END_SERVERDB_GET_NETWORK_PROPERTY -#define SERVERDB_GET_SERVER_PROPERTY(__functionName,__callName,__variantSetCallName) \ +#define BEGIN_SERVERDB_GET_SERVER_PROPERTY(__functionName) \ static bool __functionName(KviKvsModuleFunctionCall * c) \ { \ QString szNetName, szServName; \ @@ -273,13 +280,19 @@ static bool serverdb_kvs_fnc_serverExists(KviKvsModuleFunctionCall * c) { \ c->error(__tr2qs_ctx("The specified server does not exist","serverdb")); \ return false; \ - } \ - \ - c->returnValue()->__variantSetCallName(pServer->__callName()); \ - \ + } + + +#define END_SERVERDB_GET_SERVER_PROPERTY \ return true; \ } +#define SERVERDB_GET_SERVER_PROPERTY(__functionName,__callName,__variantSetCallName) \ + BEGIN_SERVERDB_GET_SERVER_PROPERTY(__functionName) \ + c->returnValue()->__variantSetCallName(pServer->__callName()); \ + END_SERVERDB_GET_SERVER_PROPERTY + + /* @doc: serverdb.networkNickName @type: @@ -289,7 +302,7 @@ static bool serverdb_kvs_fnc_serverExists(KviKvsModuleFunctionCall * c) @short: Returns the nickname @syntax: - $serverdb.networkNickName() + $serverdb.networkNickName() @description: Returns the nickname set for the network if set @seealso: @@ -306,9 +319,9 @@ SERVERDB_GET_NETWORK_PROPERTY(serverdb_kvs_fnc_networkNickName,nickName) @short: Returns the username @syntax: - $serverdb.networkUserName() + $serverdb.networkUserName() @description: - Returns the username set for the network if set + Returns the username set for the network if set. @seealso: [module:serverdb]ServerDB module documentation[/module] */ @@ -323,7 +336,7 @@ SERVERDB_GET_NETWORK_PROPERTY(serverdb_kvs_fnc_networkUserName,userName) @short: Returns the realname @syntax: - $serverdb.networkRealName() + $serverdb.networkRealName() @description: Returns the realname set for the network if set @seealso: @@ -340,7 +353,7 @@ SERVERDB_GET_NETWORK_PROPERTY(serverdb_kvs_fnc_networkRealName,realName) @short: Returns the encoding @syntax: - $serverdb.networkEncoding() + $serverdb.networkEncoding() @description: Returns the encoding used for the network for server specific messages, like channel and nick names, if set @seealso: @@ -357,7 +370,7 @@ SERVERDB_GET_NETWORK_PROPERTY(serverdb_kvs_fnc_networkEncoding,encoding) @short: Returns the encoding @syntax: - $serverdb.networkTextEncoding() + $serverdb.networkTextEncoding() @description: Returns the encoding used for the network for text messages, if set @seealso: @@ -374,7 +387,7 @@ SERVERDB_GET_NETWORK_PROPERTY(serverdb_kvs_fnc_networkTextEncoding,textEncoding) @short: Returns the description @syntax: - $serverdb.networkDescription() + $serverdb.networkDescription() @description: Returns the description set for the network if set @seealso: @@ -391,7 +404,7 @@ SERVERDB_GET_NETWORK_PROPERTY(serverdb_kvs_fnc_networkDescription,description) @short: Returns the connect command @syntax: - $serverdb.networkConnectCommand() + $serverdb.networkConnectCommand() @description: Returns the connect command set for the network if set @seealso: @@ -408,7 +421,7 @@ SERVERDB_GET_NETWORK_PROPERTY(serverdb_kvs_fnc_networkConnectCommand,onConnectCo @short: Returns the login command @syntax: - $serverdb.networkLoginCommand() + $serverdb.networkLoginCommand() @description: Returns the login command set for the network if set @seealso: @@ -425,7 +438,7 @@ SERVERDB_GET_NETWORK_PROPERTY(serverdb_kvs_fnc_networkLoginCommand,onLoginComman @short: Returns the name @syntax: - $serverdb.networkName() + $serverdb.networkName() @description: Returns the name of the network @seealso: @@ -442,14 +455,31 @@ SERVERDB_GET_NETWORK_PROPERTY(serverdb_kvs_fnc_networkName,name) @short: Returns the list of autojoin channels @syntax: - $serverdb.networkJoinChannels() + $serverdb.networkJoinChannels() @description: - Returns a comma-separated list of autojoin channels and their relative passwords set for the network [br] - Each item in the list is in the format : + Returns an array of autojoin channels and their relative passwords set for the network [br] + Each item in the array is in the format : @seealso: [module:serverdb]ServerDB module documentation[/module] */ -SERVERDB_GET_NETWORK_PROPERTY(serverdb_kvs_fnc_networkJoinChannels,autoJoinChannelListAsString) +BEGIN_SERVERDB_GET_NETWORK_PROPERTY(serverdb_kvs_fnc_networkJoinChannels) + + KviKvsArray * pArray = new KviKvsArray(); + + QStringList * pAutoJoinChannels = pNetwork->autoJoinChannelList(); + if(pAutoJoinChannels) + { + kvs_uint_t idx = 0; + foreach(QString szEntry,*pAutoJoinChannels) + { + pArray->set(idx,new KviKvsVariant(szEntry)); + idx++; + } + } + + c->returnValue()->setArray(pArray); + +END_SERVERDB_GET_NETWORK_PROPERTY /* @doc: serverdb.serverNickName @@ -460,7 +490,7 @@ SERVERDB_GET_NETWORK_PROPERTY(serverdb_kvs_fnc_networkJoinChannels,autoJoinChann @short: Returns the nickname @syntax: - $serverdb.serverNickName(,) + $serverdb.serverNickName(,) @description: Returns the nickname set for the server of the network if set @seealso: @@ -477,7 +507,7 @@ SERVERDB_GET_SERVER_PROPERTY(serverdb_kvs_fnc_serverNickName,nickName,setString) @short: Returns the username @syntax: - $serverdb.serverUserName(,) + $serverdb.serverUserName(,) @description: Returns the username set for the server of the network if set @seealso: @@ -494,7 +524,7 @@ SERVERDB_GET_SERVER_PROPERTY(serverdb_kvs_fnc_serverUserName,userName,setString) @short: Returns the realname @syntax: - $serverdb.serverRealName(,) + $serverdb.serverRealName(,) @description: Returns the realname set for the server of the network if set @seealso: @@ -511,7 +541,7 @@ SERVERDB_GET_SERVER_PROPERTY(serverdb_kvs_fnc_serverRealName,realName,setString) @short: Returns the encoding @syntax: - $serverdb.serverEncoding(,) + $serverdb.serverEncoding(,) @description: Returns the encoding used for the server of the network for server specific messages, like channel and nick names, if set @seealso: @@ -528,7 +558,7 @@ SERVERDB_GET_SERVER_PROPERTY(serverdb_kvs_fnc_serverEncoding,encoding,setString) @short: Returns the encoding @syntax: - $serverdb.serverTextEncoding(,) + $serverdb.serverTextEncoding(,) @description: Returns the encoding used for the server of the network for server specific messages, like channel and nick names, if set @seealso: @@ -545,7 +575,7 @@ SERVERDB_GET_SERVER_PROPERTY(serverdb_kvs_fnc_serverTextEncoding,textEncoding,se @short: Returns the description @syntax: - $serverdb.serverDescription(,) + $serverdb.serverDescription(,) @description: Returns the description set for the server of the network if set @seealso: @@ -562,7 +592,7 @@ SERVERDB_GET_SERVER_PROPERTY(serverdb_kvs_fnc_serverDescription,description,setS @short: Returns the connect command @syntax: - $serverdb.serverConnectCommand(,) + $serverdb.serverConnectCommand(,) @description: Returns the connect command set for the server of the network if set @seealso: @@ -579,7 +609,7 @@ SERVERDB_GET_SERVER_PROPERTY(serverdb_kvs_fnc_serverConnectCommand,onConnectComm @short: Returns the login command @syntax: - $serverdb.serverLoginCommand(,) + $serverdb.serverLoginCommand(,) @description: Returns the login command set for the server of the network if set @seealso: @@ -596,7 +626,7 @@ SERVERDB_GET_SERVER_PROPERTY(serverdb_kvs_fnc_serverLoginCommand,onLoginCommand, @short: Returns the IP address @syntax: - $serverdb.serverIp(,) + $serverdb.serverIp(,) @description: Returns the IP address of the server of the network @seealso: @@ -613,7 +643,7 @@ SERVERDB_GET_SERVER_PROPERTY(serverdb_kvs_fnc_serverIp,ip,setString) @short: Returns the ID @syntax: - $serverdb.serverId(,) + $serverdb.serverId(,) @description: Returns the ID of the server of the network @seealso: @@ -630,7 +660,7 @@ SERVERDB_GET_SERVER_PROPERTY(serverdb_kvs_fnc_serverId,id,setString) @short: Returns the password @syntax: - $serverdb.serverPassword(,) + $serverdb.serverPassword(,) @description: Returns the password of the server of the network if set @seealso: @@ -647,7 +677,7 @@ SERVERDB_GET_SERVER_PROPERTY(serverdb_kvs_fnc_serverPassword,password,setString) @short: Returns the port @syntax: - $serverdb.serverPort(,) + $serverdb.serverPort(,) @description: Returns the port of the server of the network if set @seealso: @@ -664,7 +694,7 @@ SERVERDB_GET_SERVER_PROPERTY(serverdb_kvs_fnc_serverPort,port,setInteger) @short: Returns the autoconnect status @syntax: - $serverdb.isAutoConnect(,) + $serverdb.isAutoConnect(,) @description: Returns true if the server of the network if set to autoconnect, false otherwise @seealso: @@ -681,7 +711,7 @@ SERVERDB_GET_SERVER_PROPERTY(serverdb_kvs_fnc_serverAutoConnect,autoConnect,setB @short: Returns the IPv6 status @syntax: - $serverdb.isIPv6(,) + $serverdb.isIPv6(,) @description: Returns true if the server of the network if set to connect using IPv6 sockets, false otherwise @seealso: @@ -698,7 +728,7 @@ SERVERDB_GET_SERVER_PROPERTY(serverdb_kvs_fnc_serverIPv6,isIPv6,setBoolean) @short: Returns the SSL status @syntax: - $serverdb.isSSL(,) + $serverdb.isSSL(,) @description: Returns true if the server of the network if set to connect using SSL (Secure Socket Layer) sockets, false otherwise @seealso: @@ -715,7 +745,7 @@ SERVERDB_GET_SERVER_PROPERTY(serverdb_kvs_fnc_serverSSL,useSSL,setBoolean) @short: Returns the cache-ip status @syntax: - $serverdb.cacheIp(,) + $serverdb.cacheIp(,) @description: Returns true if KVIrc is set to cache the ip of the server of the network , false otherwise @seealso: @@ -732,14 +762,32 @@ SERVERDB_GET_SERVER_PROPERTY(serverdb_kvs_fnc_serverCacheIp,cacheIp,setBoolean) @short: Returns the list of autojoin channels @syntax: - $serverdb.serverJoinChannels(,) + $serverdb.serverJoinChannels(,) @description: - Returns a comma-separated list of autojoin channels and their relative passwords set for the server of the network [br] - Each item in the array is in the format : + Returns an array containing the autojoin channels and their relative passwords set for the server of the network [br] + Each item in the array is in the format channel_name:password @seealso: [module:serverdb]ServerDB module documentation[/module] */ -SERVERDB_GET_SERVER_PROPERTY(serverdb_kvs_fnc_serverJoinChannels,autoJoinChannelListAsString,setString) +BEGIN_SERVERDB_GET_SERVER_PROPERTY(serverdb_kvs_fnc_serverJoinChannels) + + KviKvsArray * pArray = new KviKvsArray(); + + QStringList * pAutoJoinChannels = pServer->autoJoinChannelList(); + if(pAutoJoinChannels) + { + kvs_uint_t idx = 0; + foreach(QString szEntry,*pAutoJoinChannels) + { + pArray->set(idx,new KviKvsVariant(szEntry)); + idx++; + } + } + + c->returnValue()->setArray(pArray); + +END_SERVERDB_GET_SERVER_PROPERTY + /* @doc: serverdb.addNetwork @@ -802,7 +850,7 @@ static bool serverdb_kvs_cmd_addNetwork(KviKvsModuleCommandCall * c) @short: Adds a server @syntax: - serverdb.addServer [switches] + serverdb.addServer [switches] @description: Adds the server to the network . @switches: @@ -899,11 +947,11 @@ static bool serverdb_kvs_cmd_addServer(KviKvsModuleCommandCall * c) #define SERVERDB_SET_NETWORK_PROPERTY(__functionName,__callName) \ static bool __functionName(KviKvsModuleCommandCall * c) \ { \ - QString szName, szPropertyName; \ + QString szName, szPropertyValue; \ \ KVSM_PARAMETERS_BEGIN(c) \ KVSM_PARAMETER("name",KVS_PT_STRING,0,szName) \ - KVSM_PARAMETER("property",KVS_PT_STRING,KVS_PF_APPENDREMAINING,szPropertyName) \ + KVSM_PARAMETER("property",KVS_PT_STRING,KVS_PF_APPENDREMAINING,szPropertyValue) \ KVSM_PARAMETERS_END(c) \ \ if(szName.isEmpty()) \ @@ -912,12 +960,6 @@ static bool serverdb_kvs_cmd_addServer(KviKvsModuleCommandCall * c) return false; \ } \ \ - if(szPropertyName.isEmpty()) \ - { \ - c->error(__tr2qs_ctx("You must provide the value as parameter","serverdb")); \ - return false; \ - } \ - \ KviNetwork * pNetwork = g_pServerDataBase->findNetwork(szName); \ if(!pNetwork) \ { \ @@ -926,7 +968,7 @@ static bool serverdb_kvs_cmd_addServer(KviKvsModuleCommandCall * c) return false; \ } \ \ - pNetwork->__callName(szPropertyName); \ + pNetwork->__callName(szPropertyValue); \ \ return true; \ } @@ -934,12 +976,12 @@ static bool serverdb_kvs_cmd_addServer(KviKvsModuleCommandCall * c) #define SERVERDB_SET_SERVER_PROPERTY(__functionName,__callName) \ static bool __functionName(KviKvsModuleCommandCall * c) \ { \ - QString szNetName, szServName, szPropertyName; \ + QString szNetName, szServName, szPropertyValue; \ \ KVSM_PARAMETERS_BEGIN(c) \ KVSM_PARAMETER("network_name",KVS_PT_STRING,0,szNetName) \ KVSM_PARAMETER("server_name",KVS_PT_STRING,0,szServName) \ - KVSM_PARAMETER("property",KVS_PT_STRING,KVS_PF_APPENDREMAINING,szPropertyName) \ + KVSM_PARAMETER("property",KVS_PT_STRING,KVS_PF_APPENDREMAINING,szPropertyValue) \ KVSM_PARAMETERS_END(c) \ \ if(szNetName.isEmpty()) \ @@ -954,12 +996,6 @@ static bool serverdb_kvs_cmd_addServer(KviKvsModuleCommandCall * c) return false; \ } \ \ - if(szPropertyName.isEmpty()) \ - { \ - c->error(__tr2qs_ctx("You must provide the value as parameter","serverdb")); \ - return false; \ - } \ - \ KviNetwork * pRecord = g_pServerDataBase->findNetwork(szNetName); \ if(!pRecord) \ { \ @@ -976,7 +1012,7 @@ static bool serverdb_kvs_cmd_addServer(KviKvsModuleCommandCall * c) return false; \ } \ \ - pServer->__callName(szPropertyName); \ + pServer->__callName(szPropertyValue); \ \ return true; \ } @@ -990,7 +1026,7 @@ static bool serverdb_kvs_cmd_addServer(KviKvsModuleCommandCall * c) @short: Sets the nickname @syntax: - serverdb.setNetworkNickName [switches] + serverdb.setNetworkNickName [switches] @description: Sets the nickname for the specified network . @switches: @@ -1015,7 +1051,7 @@ SERVERDB_SET_NETWORK_PROPERTY(serverdb_kvs_cmd_setNetworkNickName,setNickName) @short: Sets the username @syntax: - serverdb.setNetworkUserName [switches] + serverdb.setNetworkUserName [switches] @description: Sets the username for the specified network . @switches: @@ -1040,7 +1076,7 @@ SERVERDB_SET_NETWORK_PROPERTY(serverdb_kvs_cmd_setNetworkUserName,setUserName) @short: Sets the realname @syntax: - serverdb.setNetworkRealName [switches] + serverdb.setNetworkRealName [switches] @description: Sets the realname for the specified network . @switches: @@ -1065,7 +1101,7 @@ SERVERDB_SET_NETWORK_PROPERTY(serverdb_kvs_cmd_setNetworkRealName,setRealName) @short: Sets the encoding @syntax: - serverdb.setNetworkEncoding [switches] + serverdb.setNetworkEncoding [switches] @description: Sets the encoding for the specified network . This encoding will be used for server-specific text, like channel names and nicknames. @@ -1091,7 +1127,7 @@ SERVERDB_SET_NETWORK_PROPERTY(serverdb_kvs_cmd_setNetworkEncoding,setEncoding) @short: Sets the encoding @syntax: - serverdb.setNetworkTextEncoding [switches] + serverdb.setNetworkTextEncoding [switches] @description: Sets the encoding for the specified network . This encoding will be used for text messages. @switches: @@ -1116,7 +1152,7 @@ SERVERDB_SET_NETWORK_PROPERTY(serverdb_kvs_cmd_setNetworkTextEncoding,setTextEnc @short: Sets the description @syntax: - serverdb.setNetworkDescription [switches] + serverdb.setNetworkDescription [switches] @description: Sets the description for the specified network . @switches: @@ -1141,7 +1177,7 @@ SERVERDB_SET_NETWORK_PROPERTY(serverdb_kvs_cmd_setNetworkDescription,setDescript @short: Sets the connect command @syntax: - serverdb.setNetworkConnectCommand [switches] + serverdb.setNetworkConnectCommand [switches] @description: Sets the command to run on connect for the specified network . @switches: @@ -1166,7 +1202,7 @@ SERVERDB_SET_NETWORK_PROPERTY(serverdb_kvs_cmd_setNetworkConnectCommand,setOnCon @short: Sets the login command @syntax: - serverdb.setNetworkLoginCommand [switches] + serverdb.setNetworkLoginCommand [switches] @description: Sets the command to run on login for the specified network . @switches: @@ -1191,10 +1227,10 @@ SERVERDB_SET_NETWORK_PROPERTY(serverdb_kvs_cmd_setNetworkLoginCommand,setOnLogin @short: Sets the autojoin channels list @syntax: - serverdb.setNetworkJoinChannels + serverdb.setNetworkJoinChannels @description: Sets the autojoin channels list for the specified network .[br] - Items in the list have to be separated by a comma, and each item has to be in the form : + Items in the list have to be separated by a comma, and each item has to be in the form : @examples: [example] [comment]Set two autojoin channels for freenode[/comment][br] @@ -1214,7 +1250,7 @@ SERVERDB_SET_NETWORK_PROPERTY(serverdb_kvs_cmd_setNetworkJoinChannels,setAutoJoi @short: Sets the nickname @syntax: - serverdb.setServerNickName [switches] + serverdb.setServerNickName [switches] @description: Sets the nickname for the specified server in the network . @switches: @@ -1239,7 +1275,7 @@ SERVERDB_SET_SERVER_PROPERTY(serverdb_kvs_cmd_setServerNickName,setNickName) @short: Sets the username @syntax: - serverdb.setServerUserName [switches] + serverdb.setServerUserName [switches] @description: Sets the username for the specified server in the network . @switches: @@ -1264,7 +1300,7 @@ SERVERDB_SET_SERVER_PROPERTY(serverdb_kvs_cmd_setServerUserName,setUserName) @short: Sets the realname @syntax: - serverdb.setServerRealName [switches] + serverdb.setServerRealName [switches] @description: Sets the realname for the specified server in the network . @switches: @@ -1289,7 +1325,7 @@ SERVERDB_SET_SERVER_PROPERTY(serverdb_kvs_cmd_setServerRealName,setRealName) @short: Sets the encoding @syntax: - serverdb.setServerEncoding [switches] + serverdb.setServerEncoding [switches] @description: Sets the encoding for the specified server in the network . This encoding will be used for server-specific text, like channel names and nicknames. @@ -1315,7 +1351,7 @@ SERVERDB_SET_SERVER_PROPERTY(serverdb_kvs_cmd_setServerEncoding,setEncoding) @short: Sets the text encoding @syntax: - serverdb.setServerTextEncoding [switches] + serverdb.setServerTextEncoding [switches] @description: Sets the encoding for the specified server in the network . This encoding will be used for text messages. @switches: @@ -1340,7 +1376,7 @@ SERVERDB_SET_SERVER_PROPERTY(serverdb_kvs_cmd_setServerTextEncoding,setTextEncod @short: Sets the description @syntax: - serverdb.setServerDescription [switches] + serverdb.setServerDescription [switches] @description: Sets the description for the specified server in the network . @switches: @@ -1365,7 +1401,7 @@ SERVERDB_SET_SERVER_PROPERTY(serverdb_kvs_cmd_setServerDescription,setDescriptio @short: Sets the connect command @syntax: - serverdb.setServerConnectCommand [switches] + serverdb.setServerConnectCommand [switches] @description: Sets the command to run on connect for the specified server in the network . @switches: @@ -1390,7 +1426,7 @@ SERVERDB_SET_SERVER_PROPERTY(serverdb_kvs_cmd_setServerConnectCommand,setOnConne @short: Sets the login command @syntax: - serverdb.setServerLoginCommand [switches] + serverdb.setServerLoginCommand [switches] @description: Sets the command to run on login for the specified server in the network . @switches: @@ -1415,10 +1451,10 @@ SERVERDB_SET_SERVER_PROPERTY(serverdb_kvs_cmd_setServerLoginCommand,setOnLoginCo @short: Sets the autojoin channels list @syntax: - serverdb.setServerJoinChannels + serverdb.setServerJoinChannels @description: Sets the autojoin channels list for the specified server in the network .[br] - Items in the list have to be separated by a comma, and each item has to be in the form : + Items in the list have to be separated by a comma, and each item has to be in the form : @examples: [example] [comment]Set two autojoin channels for irc.freenode.net[/comment][br] -- cgit v1.3.1-10-gc9f91