author | wazlaf <wazlaf> | 2002-09-20 23:28:14 (UTC) |
---|---|---|
committer | wazlaf <wazlaf> | 2002-09-20 23:28:14 (UTC) |
commit | 912092425248f7fc5155b4c7c46b7d00ec2676bc (patch) (unidiff) | |
tree | 5bbf746e83b2dffad89542c42031a573c34da751 /noncore/net/opieirc/ircserverlist.cpp | |
parent | cd3df897c1b0ed93c2be3ab411011a0bdfe88bf9 (diff) | |
download | opie-912092425248f7fc5155b4c7c46b7d00ec2676bc.zip opie-912092425248f7fc5155b4c7c46b7d00ec2676bc.tar.gz opie-912092425248f7fc5155b4c7c46b7d00ec2676bc.tar.bz2 |
support for client commands (only /join implemented so far), crash bugfix, fixed 2 leaks, server browser now includes a channel list
Diffstat (limited to 'noncore/net/opieirc/ircserverlist.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/opieirc/ircserverlist.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/noncore/net/opieirc/ircserverlist.cpp b/noncore/net/opieirc/ircserverlist.cpp index b2d746a..e664ba1 100644 --- a/noncore/net/opieirc/ircserverlist.cpp +++ b/noncore/net/opieirc/ircserverlist.cpp | |||
@@ -50,24 +50,25 @@ IRCServerList::IRCServerList(QWidget* parent, const char *name, bool modal, WFla | |||
50 | m_config->setGroup("OpieIRC"); | 50 | m_config->setGroup("OpieIRC"); |
51 | QString name = m_config->readEntry("Server"+QString::number(i)); | 51 | QString name = m_config->readEntry("Server"+QString::number(i)); |
52 | if (name.length() > 0) { | 52 | if (name.length() > 0) { |
53 | IRCServer server; | 53 | IRCServer server; |
54 | m_config->setGroup(name); | 54 | m_config->setGroup(name); |
55 | server.setName(name); | 55 | server.setName(name); |
56 | server.setHostname(m_config->readEntry("Hostname")); | 56 | server.setHostname(m_config->readEntry("Hostname")); |
57 | server.setPort(m_config->readNumEntry("Port")); | 57 | server.setPort(m_config->readNumEntry("Port")); |
58 | server.setUsername(m_config->readEntry("Username")); | 58 | server.setUsername(m_config->readEntry("Username")); |
59 | server.setPassword(m_config->readEntry("Password")); | 59 | server.setPassword(m_config->readEntry("Password")); |
60 | server.setNick(m_config->readEntry("Nick")); | 60 | server.setNick(m_config->readEntry("Nick")); |
61 | server.setRealname(m_config->readEntry("Realname")); | 61 | server.setRealname(m_config->readEntry("Realname")); |
62 | server.setChannels(m_config->readEntry("Channels")); | ||
62 | m_list->insertItem(new IRCListBoxServer(server)); | 63 | m_list->insertItem(new IRCListBoxServer(server)); |
63 | } | 64 | } |
64 | } | 65 | } |
65 | } | 66 | } |
66 | 67 | ||
67 | showMaximized(); | 68 | showMaximized(); |
68 | } | 69 | } |
69 | 70 | ||
70 | void IRCServerList::addServer() { | 71 | void IRCServerList::addServer() { |
71 | IRCServer server; | 72 | IRCServer server; |
72 | IRCServerEditor editor(server, this, "ServerEditor", TRUE); | 73 | IRCServerEditor editor(server, this, "ServerEditor", TRUE); |
73 | if (editor.exec() == QDialog::Accepted) { | 74 | if (editor.exec() == QDialog::Accepted) { |
@@ -105,24 +106,25 @@ int IRCServerList::exec() { | |||
105 | m_config->writeEntry("ServerCount", QString::number(m_list->count())); | 106 | m_config->writeEntry("ServerCount", QString::number(m_list->count())); |
106 | for (unsigned int i=0; i<m_list->count(); i++) { | 107 | for (unsigned int i=0; i<m_list->count(); i++) { |
107 | IRCServer server = ((IRCListBoxServer *)m_list->item(i))->server(); | 108 | IRCServer server = ((IRCListBoxServer *)m_list->item(i))->server(); |
108 | m_config->setGroup("OpieIRC"); | 109 | m_config->setGroup("OpieIRC"); |
109 | m_config->writeEntry("Server"+QString::number(i), server.name()); | 110 | m_config->writeEntry("Server"+QString::number(i), server.name()); |
110 | m_config->setGroup(server.name()); | 111 | m_config->setGroup(server.name()); |
111 | m_config->writeEntry("Hostname", server.hostname()); | 112 | m_config->writeEntry("Hostname", server.hostname()); |
112 | m_config->writeEntry("Port", QString::number(server.port())); | 113 | m_config->writeEntry("Port", QString::number(server.port())); |
113 | m_config->writeEntry("Username", server.username()); | 114 | m_config->writeEntry("Username", server.username()); |
114 | m_config->writeEntry("Password", server.password()); | 115 | m_config->writeEntry("Password", server.password()); |
115 | m_config->writeEntry("Nick", server.nick()); | 116 | m_config->writeEntry("Nick", server.nick()); |
116 | m_config->writeEntry("Realname", server.realname()); | 117 | m_config->writeEntry("Realname", server.realname()); |
118 | m_config->writeEntry("Channels", server.channels()); | ||
117 | } | 119 | } |
118 | return returncode; | 120 | return returncode; |
119 | } | 121 | } |
120 | 122 | ||
121 | bool IRCServerList::hasServer() { | 123 | bool IRCServerList::hasServer() { |
122 | return (m_list->currentItem() != -1); | 124 | return (m_list->currentItem() != -1); |
123 | } | 125 | } |
124 | 126 | ||
125 | IRCServer IRCServerList::server() { | 127 | IRCServer IRCServerList::server() { |
126 | return ((IRCListBoxServer *)m_list->item(m_list->currentItem()))->server(); | 128 | return ((IRCListBoxServer *)m_list->item(m_list->currentItem()))->server(); |
127 | } | 129 | } |
128 | 130 | ||