Ver código fonte

Fixes Issue 2988 that shouldn't happen. If it happens again then there will be some debugging to help.

Change-Id: Ia2ac191cf21a97eec73734b789e8f75b35bcb8f3
Reviewed-on: http://gerrit.dmdirc.com/90
Reviewed-by: Chris Smith <chris@dmdirc.com>
Tested-by: Chris Smith <chris@dmdirc.com>
tags/0.6.3
Shane Mc Cormack 14 anos atrás
pai
commit
89ea3b3c47
1 arquivos alterados com 4 adições e 1 exclusões
  1. 4
    1
      src/com/dmdirc/parser/irc/IRCChannelInfo.java

+ 4
- 1
src/com/dmdirc/parser/irc/IRCChannelInfo.java Ver arquivo

@@ -23,6 +23,7 @@
23 23
 package com.dmdirc.parser.irc;
24 24
 
25 25
 import com.dmdirc.parser.common.ChannelListModeItem;
26
+import com.dmdirc.parser.common.ParserError;
26 27
 import com.dmdirc.parser.interfaces.ChannelClientInfo;
27 28
 import com.dmdirc.parser.interfaces.ChannelInfo;
28 29
 import com.dmdirc.parser.interfaces.ClientInfo;
@@ -607,7 +608,7 @@ public class IRCChannelInfo implements ChannelInfo {
607 608
             // May need a param
608 609
             if (myParser.prefixModes.containsKey(mode)) {
609 610
                 modestr = modestr + " " + parameter;
610
-            } else {
611
+            } else if (myParser.chanModesOther.containsKey(mode)) {
611 612
                 modeint = myParser.chanModesOther.get(mode);
612 613
                 if ((modeint & IRCParser.MODE_LIST) == IRCParser.MODE_LIST) {
613 614
                     modestr = modestr + " " + parameter;
@@ -628,6 +629,8 @@ public class IRCChannelInfo implements ChannelInfo {
628 629
                     }
629 630
                     modestr = modestr + " " + parameter;
630 631
                 }
632
+            } else {
633
+                myParser.callErrorInfo(new ParserError(ParserError.ERROR_WARNING, "Trying to alter unknown mode.  positive: '"+positive+"' | mode: '"+mode+"' | parameter: '"+parameter+"' ", ""));
631 634
             }
632 635
         }
633 636
         myParser.callDebugInfo(IRCParser.DEBUG_INFO, "Queueing mode: %s", modestr);

Carregando…
Cancelar
Salvar