Browse Source

Some additional WHOIS bits that were missed.

pull/110/head
Shane Mc Cormack 8 years ago
parent
commit
74c77ef264

+ 2
- 0
common/src/com/dmdirc/parser/events/UserInfoEvent.java View File

@@ -81,6 +81,8 @@ public class UserInfoEvent extends ParserEvent {
81 81
 
82 82
         /** The user's full address. */
83 83
         ADDRESS,
84
+        /** The user's real address. */
85
+        REAL_ADDRESS,
84 86
         /** The user's real name. */
85 87
         REAL_NAME,
86 88
         /** The list of group chats the user is in. */

+ 20
- 0
irc/src/com/dmdirc/parser/irc/WhoisResponseHandler.java View File

@@ -93,6 +93,26 @@ public class WhoisResponseHandler {
93 93
         info.put(UserInfoType.SERVER_INFO, event.getToken()[5]);
94 94
     }
95 95
 
96
+    @Handler(condition = "msg.numeric == 313")
97
+    void handleUserPrivileges(final NumericEvent event) {
98
+        // :server 313 DMDirc User :is an IRC Operator
99
+        info.put(UserInfoType.SERVER_OPER, event.getToken()[4]);
100
+    }
101
+
102
+    @Handler(condition = "msg.numeric == 378")
103
+    void handleConnectingFrom(final NumericEvent event) {
104
+        // :server 378 DMDirc User :is connecting from *@hostname.tld xx.xx.xx.xx
105
+        if (client.equalsIgnoreCase(event.getToken()[3])) {
106
+            info.put(UserInfoType.REAL_ADDRESS, event.getToken()[4]);
107
+        }
108
+    }
109
+
110
+    @Handler(condition = "msg.numeric == 671")
111
+    void handleSecureConnection(final NumericEvent event) {
112
+        // :server 671 DMDirc User :is using a secure connection
113
+        info.put(UserInfoType.CONNECTION_SECURITY, event.getToken()[4]);
114
+    }
115
+
96 116
     @Handler(condition = "msg.numeric == 319")
97 117
     void handleChannelList(final NumericEvent event) {
98 118
         // :server 319 DMDirc User :@#channel1 +#channel2 ...

Loading…
Cancel
Save