Sfoglia il codice sorgente

IRC parser support for IRCds which only support one listmode at once.

Fixes #CLIENT-318

The logic was already there, there just wasn't a group for it to make it easy.

Change-Id: I25976c3436961de8d4c2e243c5d14d58762e9222
Reviewed-on: http://gerrit.dmdirc.com/2251
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Chris Smith <chris@dmdirc.com>
tags/0.7rc1
Shane Mc Cormack 12 anni fa
parent
commit
e22aa5e3c5

+ 2
- 1
src/com/dmdirc/parser/irc/IRCChannelInfo.java Vedi File

@@ -144,7 +144,8 @@ public class IRCChannelInfo implements ChannelInfo {
144 144
         final boolean isOpped = me.getImportantModeValue() > voiceValue;
145 145
 
146 146
         int modecount = 1;
147
-        if (serverType != ServerType.UNREAL && serverType != ServerType.IRSEE && parser.h005Info.containsKey("MODES")) {
147
+
148
+        if (!ServerTypeGroup.SINGLE_LISTMODE.isMember(serverType) && parser.h005Info.containsKey("MODES")) {
148 149
             try {
149 150
                 modecount = Integer.parseInt(parser.h005Info.get("MODES"));
150 151
             } catch (NumberFormatException e) {

+ 6
- 1
src/com/dmdirc/parser/irc/ServerTypeGroup.java Vedi File

@@ -47,7 +47,12 @@ public enum ServerTypeGroup {
47 47
      * Group for ircds that put the protected users in a list under raw 388
48 48
      * rather than as a channel user mode.
49 49
      */
50
-    PROTECTED_388("Protected List", new ServerType[]{ServerType.SWIFTIRC, ServerType.AUSTHEX8});
50
+    PROTECTED_388("Protected List", new ServerType[]{ServerType.SWIFTIRC, ServerType.AUSTHEX8}),
51
+    /**
52
+     * Group for ircds that require list modes to be sent one at a time.
53
+     */
54
+    SINGLE_LISTMODE("Single List Modes", new ServerType[]{ServerType.EUIRCD, ServerType.UNREAL, ServerType.IRSEE});
55
+
51 56
     /** Name of the group. */
52 57
     final String name;
53 58
     /** Group Members. */

Loading…
Annulla
Salva