summaryrefslogtreecommitdiff
blob: cd0b5699c94f6b3bbd807fa71987cdb73e636a76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--- 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);