Преглед изворни кода

Some additional WHOIS bits that were missed.

pull/110/head
Shane Mc Cormack пре 8 година
родитељ
комит
74c77ef264

+ 2
- 0
common/src/com/dmdirc/parser/events/UserInfoEvent.java Прегледај датотеку

81
 
81
 
82
         /** The user's full address. */
82
         /** The user's full address. */
83
         ADDRESS,
83
         ADDRESS,
84
+        /** The user's real address. */
85
+        REAL_ADDRESS,
84
         /** The user's real name. */
86
         /** The user's real name. */
85
         REAL_NAME,
87
         REAL_NAME,
86
         /** The list of group chats the user is in. */
88
         /** The list of group chats the user is in. */

+ 20
- 0
irc/src/com/dmdirc/parser/irc/WhoisResponseHandler.java Прегледај датотеку

93
         info.put(UserInfoType.SERVER_INFO, event.getToken()[5]);
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
     @Handler(condition = "msg.numeric == 319")
116
     @Handler(condition = "msg.numeric == 319")
97
     void handleChannelList(final NumericEvent event) {
117
     void handleChannelList(final NumericEvent event) {
98
         // :server 319 DMDirc User :@#channel1 +#channel2 ...
118
         // :server 319 DMDirc User :@#channel1 +#channel2 ...

Loading…
Откажи
Сачувај