--- ksirc/iocontroller.cpp +++ ksirc/iocontroller.cpp @@ -237,7 +237,7 @@ if((line.length() > 0) && (line[0] == '~')){ pos3 = line.find('~', 1); - if(pos3 > 0){ + if(pos3 > 1){ name = line.mid(1,pos3-1).lower(); name = name.lower(); line.remove(0, pos3+1); @@ -266,13 +266,13 @@ if(ksopts->autoCreateWin == TRUE && line[0] != '`' && line[1] != '#' && line[1] != '&' && noticeCreate) { //kdDebug(5008) << "Creating window for: " << qsname << " because of: " << line.data() << endl; ksircproc->new_toplevel(KSircChannel(ksircproc->serverName(), qsname)); - assert(ksircproc->TopList[qsname] != 0x0); } - else{ + if (!ksircproc->TopList[qsname]) { qsname = "!default"; if(line[0] == '`') qsname = "!discard"; } + assert(ksircproc->TopList[qsname]); } ksircproc->TopList[qsname]->sirc_receive(line);