+ QStringList chanList;
+ IrcChannel *channel;
+ foreach(channel, _channels) {
+ chanList << channel->name();
+ }
+ return chanList;
+}
+
+Network* IrcUser::network() const {
+ return _network;
+}
+
+QTextCodec *IrcUser::codecForEncoding() const {
+ return _codecForEncoding;
+}
+
+void IrcUser::setCodecForEncoding(const QString &name) {
+ setCodecForEncoding(QTextCodec::codecForName(name.toAscii()));
+}
+
+void IrcUser::setCodecForEncoding(QTextCodec *codec) {
+ _codecForEncoding = codec;
+}
+
+QTextCodec *IrcUser::codecForDecoding() const {
+ return _codecForDecoding;
+}
+
+void IrcUser::setCodecForDecoding(const QString &name) {
+ setCodecForDecoding(QTextCodec::codecForName(name.toAscii()));
+}
+
+void IrcUser::setCodecForDecoding(QTextCodec *codec) {
+ _codecForDecoding = codec;
+}
+
+QString IrcUser::decodeString(const QByteArray &text) const {
+ if(!codecForDecoding()) return network()->decodeString(text);
+ return ::decodeString(text, codecForDecoding());
+}
+
+QByteArray IrcUser::encodeString(const QString &string) const {
+ if(codecForEncoding()) {
+ return codecForEncoding()->fromUnicode(string);
+ }
+ return network()->encodeString(string);