summaryrefslogtreecommitdiff
path: root/NET/worlds/console/VoiceChat.java
blob: 3c2cc20d8c7c7861c8fdaa62b36a31bc4db4541e (plain) (blame)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
/*     */ package NET.worlds.console;
/*     */ 
/*     */ import NET.worlds.core.IniFile;
/*     */ import NET.worlds.network.URL;
/*     */ import NET.worlds.network.WorldServer;
/*     */ import NET.worlds.scape.CDAudio;
/*     */ import NET.worlds.scape.Pilot;
/*     */ import NET.worlds.scape.WavSoundPlayer;
/*     */ import java.io.File;
/*     */ import java.io.IOException;
/*     */ import java.net.InetAddress;
/*     */ import java.text.MessageFormat;
/*     */ import java.util.Vector;
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ public class VoiceChat
/*     */   implements DialogReceiver
/*     */ {
/*     */   private static final String SPEAKFREELY = "sfmain.exe";
/*     */   private static final int INITIAL_STATE = 0;
/*     */   private static final int BEGINNING_CONNECTION = 1;
/*     */   private static final int REQUESTING_CONNECTION = 2;
/*     */   private static final int ATTEMPTING_CONNECTION = 3;
/*     */   private static final int SUCCESSFULLY_CONNECTED = 4;
/*     */   private static final int CONNECTION_FAILED_RESETTING = 5;
/*     */   private static final int CLOSING_CONNECTION = 6;
/*     */   private static final int CONNECTION_CLOSED_RESETTING = 7;
/* 110 */   private static final String[] _stateStrs = { "Initial State", 
/* 111 */     "Beginning Connection", "Attempting Connection", 
/* 112 */     "Successfully Connected", "Resetting (Connection Failed)", 
/* 113 */     "Closing Connection", "Resetting (Connection Closed)" };
/*     */   
/*     */ 
/* 116 */   private int _state = 0;
/*     */   
/*     */   public int getState() {
/* 119 */     return this._state;
/*     */   }
/*     */   
/*     */   public String getStateString() {
/* 123 */     return _stateStrs[this._state];
/*     */   }
/*     */   
/*     */ 
/* 127 */   private String _error = "";
/*     */   
/*     */   public String getLastError() {
/* 130 */     return this._error;
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/* 142 */   private static boolean _selfWhisper = false;
/*     */   
/*     */   public static void activateSelfWhisper() {
/* 145 */     _selfWhisper = true;
/* 146 */     Console.println(Console.message("Selfwhisper-on"));
/*     */   }
/*     */   
/*     */   public static void deactivateSelfWhisper() {
/* 150 */     _selfWhisper = false;
/* 151 */     Console.println(Console.message("Selfwhisper-off"));
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/* 161 */   public static String VCdebugCommand = "&|+debug>VCcommand=";
/* 162 */   public static String VCdebugCommandReset = "&|+debug>VCcommandReset=";
/*     */   
/* 164 */   private static String _extraCommand = "";
/*     */   
/*     */   public static void setExtra(String text) {
/* 167 */     int start = text.indexOf('"') + 1;
/* 168 */     int end = text.lastIndexOf('"');
/* 169 */     _extraCommand = text.substring(start, end);
/* 170 */     Object[] arguments = { new String(_extraCommand) };
/* 171 */     Console.println(MessageFormat.format(Console.message("Add-VoiceChat"), 
/* 172 */       arguments));
/*     */   }
/*     */   
/*     */   public static void resetExtra() {
/* 176 */     _extraCommand = "";
/* 177 */     Console.println(Console.message("VoiceChat-reset"));
/*     */   }
/*     */   
/*     */ 
/*     */ 
/* 182 */   private static GammaPhoneMonitor chatMonitor = null;
/*     */   
/*     */ 
/* 185 */   private String _who = null;
/*     */   public static UpdateableDialog voiceChatDialog;
/*     */   
/* 188 */   public String who() { return this._who; }
/*     */   
/*     */ 
/*     */ 
/*     */   private static UpdateableDialog voiceChatQueryDialog;
/*     */   
/*     */ 
/*     */   private static String voiceChatQueryIP;
/*     */   
/*     */ 
/*     */   private static String voiceChatQueryWho;
/*     */   
/*     */ 
/* 201 */   public static boolean voiceChatEnabled = IniFile.gamma().getIniInt(
/* 202 */     "VoiceChat", voiceChatAvailable() ? 1 : 0) != 0;
/*     */   
/*     */   public static void setVoiceChatEnabled(boolean f) {
/* 205 */     if (!voiceChatAvailable())
/* 206 */       f = false;
/* 207 */     voiceChatEnabled = f;
/* 208 */     IniFile.gamma().setIniInt("VoiceChat", f ? 1 : 0);
/*     */   }
/*     */   
/* 211 */   private static boolean voiceChatExeChecked = false;
/* 212 */   private static boolean voiceChatExists = false;
/*     */   
/*     */   public static boolean voiceChatAvailable() {
/* 215 */     if (voiceChatExeChecked) {
/* 216 */       return voiceChatExists;
/*     */     }
/* 218 */     URL vcexe = URL.make("home:sfmain.exe");
/* 219 */     String fname = vcexe.unalias();
/* 220 */     File f = new File(fname);
/* 221 */     voiceChatExists = f.exists();
/* 222 */     voiceChatExeChecked = true;
/* 223 */     return voiceChatExists;
/*     */   }
/*     */   
/* 226 */   private int _gammaphoneWindow = 0;
/*     */   
/*     */   public void registerProcess(int id) {
/* 229 */     this._gammaphoneWindow = id;
/*     */   }
/*     */   
/* 232 */   DefaultConsole _console = null;
/*     */   
/* 234 */   VCTimerThread _vtimer = null;
/*     */   private static final String voiceChatQuery = "&|+voicechat?";
/*     */   private static final String voiceChatAccept = "&|+voicechat>accept";
/*     */   private static final String voiceChatReject = "&|+voicechat>reject";
/*     */   private static final String voiceChatBusy = "&|+voicechat>busy";
/*     */   private static final String voiceChatNotVIP = "&|+voicechat>notvip";
/*     */   private static final String voiceChatDisabled = "&|+voicechat>disabled";
/*     */   
/*     */   public void beginChat(String friendName, DefaultConsole console) {
/* 243 */     this._state = 1;
/* 244 */     this._console = console;
/*     */     
/* 246 */     if (!console.getVIP()) {
/* 247 */       resetConnection(Console.message("must-be-VIP"));
/*     */     } else {
/* 249 */       String ip = null;
/*     */       
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */       try
/*     */       {
/* 262 */         InetAddress localAddr = console.getServerNew()
/* 263 */           .getLocalAddress();
/* 264 */         ip = localAddr != null ? localAddr.toString() : null;
/*     */         
/* 266 */         ip = ip.substring(ip.indexOf('/') + 1);
/*     */       }
/*     */       catch (SecurityException e)
/*     */       {
/* 270 */         resetConnection(Console.message("sec-violation"));
/*     */       }
/*     */       
/* 273 */       if (ip == null) {
/* 274 */         resetConnection(Console.message("cant-determine-IP"));
/*     */       } else {
/* 276 */         if (voiceChatDialog != null) {
/* 277 */           if (friendName.equals(this._who)) {
/* 278 */             Object[] arguments = { new String(this._who) };
/* 279 */             Console.println(MessageFormat.format(
/* 280 */               Console.message("already-VoiceChat"), arguments));
/* 281 */             return;
/*     */           }
/* 283 */           resetConnection(Console.message("chat-ended"));
/*     */         }
/*     */         
/* 286 */         if ((voiceChatQueryDialog != null) && 
/* 287 */           (voiceChatQueryWho.equals(friendName))) {
/* 288 */           arguments = new Object[] { new String(friendName) };
/* 289 */           Console.println(MessageFormat.format(
/* 290 */             Console.message("already-calling"), arguments));
/* 291 */           return;
/*     */         }
/*     */         
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/* 298 */         while (ConnectionRecord.checkList(this._who)) { Object[] arguments;
/* 299 */           Object[] arguments = { new String(this._who) };
/* 300 */           Console.println(MessageFormat.format(
/* 301 */             Console.message("wait-a-few"), arguments));
/*     */           try {
/* 303 */             Thread.sleep(2000L);
/*     */           }
/*     */           catch (InterruptedException localInterruptedException) {}
/*     */         }
/*     */         
/*     */ 
/* 309 */         if (initiateVoiceChat(friendName, null)) {
/* 310 */           Object[] arguments = { new String(friendName), 
/* 311 */             new String(ip) };
/* 312 */           Console.println(MessageFormat.format(
/* 313 */             Console.message("Asking-to-call"), arguments));
/* 314 */           this._state = 2;
/* 315 */           sendWhisper(friendName, "&|+voicechat?" + ip);
/*     */           
/* 317 */           this._vtimer = new VCTimerThread(this, 30000L);
/* 318 */           this._vtimer.start();
/*     */         }
/*     */       }
/*     */     }
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   private static native void terminateVC(int paramInt);
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */   private boolean initiateVoiceChat(String friendName, String ip)
/*     */   {
/* 335 */     this._who = friendName;
/* 336 */     int hWnd = Window.getHWnd();
/*     */     
/* 338 */     String startString = URL.make("home:sfmain.exe" + (
/* 339 */       ip == null ? " -a " : new StringBuilder(" -c ").append(ip).toString()) + " -g " + hWnd + 
/* 340 */       " -p " + Window.getGammaProcessID() + " " + _extraCommand + 
/* 341 */       " ").unalias();
/*     */     
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/* 347 */     WavSoundPlayer.pauseSystem();
/* 348 */     CDAudio.get().setEnabled(false);
/*     */     
/* 350 */     if (tryToRun(startString)) {
/* 351 */       Object[] arguments = { new String(this._who) };
/* 352 */       voiceChatDialog = new UpdateableDialog(Console.getFrame(), this, 
/* 353 */         Console.message("Voice-connect"), null, 
/* 354 */         Console.message("Terminate"), MessageFormat.format(
/* 355 */         Console.message("end-VoiceChat"), arguments), false);
/*     */       
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/* 363 */       if (chatMonitor == null) {
/* 364 */         chatMonitor = new GammaPhoneMonitor(this);
/* 365 */         chatMonitor.start();
/*     */       }
/*     */       
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/* 372 */       return true;
/*     */     }
/* 374 */     WavSoundPlayer.resumeSystem();
/* 375 */     CDAudio.get().setEnabled(true);
/*     */     
/* 377 */     Object[] arguments = { new String(this._who), new String(startString) };
/* 378 */     voiceChatDialog = new UpdateableDialog(Console.getFrame(), this, 
/* 379 */       Console.message("Voice-Chat-199"), null, 
/* 380 */       Console.message("Continue"), MessageFormat.format(
/* 381 */       Console.message("Unable-to-chat"), arguments), false);
/* 382 */     return false;
/*     */   }
/*     */   
/*     */ 
/*     */   public void inform(int msgid, String msg)
/*     */   {
/* 388 */     if (msgid >= 900) {
/* 389 */       if (voiceChatDialog == null)
/*     */       {
/*     */ 
/* 392 */         return;
/*     */       }
/*     */       
/* 395 */       voiceChatDialog.setTitle(Console.message("VoiceChat-Connected"));
/* 396 */       this._state = 4;
/*     */     } else {
/* 398 */       resetConnection(msg);
/*     */     }
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   public boolean handleChatRequest(String user, String text, DefaultConsole console)
/*     */   {
/* 418 */     Object[] arguments = { new String(user) };
/* 419 */     if (!console.getVIP()) {
/* 420 */       Console.println(MessageFormat.format(
/* 421 */         Console.message("reject-chat"), arguments));
/* 422 */       sendWhisper(user, "&|+voicechat>notvip");
/* 423 */     } else if (!voiceChatEnabled) {
/* 424 */       Console.println(MessageFormat.format(
/* 425 */         Console.message("chat-disabled"), arguments));
/* 426 */       sendWhisper(user, "&|+voicechat>disabled");
/* 427 */     } else if (voiceChatQueryDialog != null) {
/* 428 */       sendWhisper(user, "&|+voicechat>busy");
/*     */     } else {
/* 430 */       voiceChatQueryIP = text.substring("&|+voicechat?".length());
/* 431 */       voiceChatQueryWho = user;
/*     */       
/* 433 */       voiceChatQueryDialog = new UpdateableDialog(Console.getFrame(), 
/* 434 */         this, Console.message("Accept-voice"), 
/* 435 */         Console.message("Reject"), Console.message("Accept"), 
/* 436 */         MessageFormat.format(Console.message("do-you-voice"), 
/* 437 */         arguments), false);
/*     */     }
/* 439 */     return true;
/*     */   }
/*     */   
/*     */   public boolean handleChatWhisper(String user, String whisper, DefaultConsole console)
/*     */   {
/* 444 */     Object[] arguments = { new String(user) };
/* 445 */     if (whisper.startsWith("&|+voicechat?")) {
/* 446 */       handleChatRequest(user, whisper, console);
/* 447 */       return true;
/*     */     }
/*     */     
/*     */ 
/* 451 */     if (whisper.startsWith("&|+voicechat>accept"))
/*     */     {
/*     */ 
/*     */ 
/* 455 */       if (this._state != 2) {
/* 456 */         sendWhisper(user, "&|+voicechat>reject");
/* 457 */         return false;
/*     */       }
/*     */       
/* 460 */       Console.println(MessageFormat.format(
/* 461 */         Console.message("chat-accepted"), arguments));
/*     */       
/* 463 */       synchronized (this._vtimer) {
/* 464 */         this._vtimer._vc = null;
/*     */       }
/* 466 */       this._vtimer = null;
/*     */       
/* 468 */       this._state = 3;
/* 469 */       this._vtimer = new VCTimerThread(this, 15000L);
/* 470 */       this._vtimer.start();
/*     */ 
/*     */     }
/* 473 */     else if (whisper.startsWith("&|+voicechat>notvip")) {
/* 474 */       if ((voiceChatDialog != null) && (this._who.equals(user))) {
/* 475 */         resetConnection(MessageFormat.format(
/* 476 */           Console.message("cannot-voice"), arguments));
/*     */       }
/*     */       
/*     */ 
/*     */     }
/* 481 */     else if (whisper.startsWith("&|+voicechat>disabled")) {
/* 482 */       if ((voiceChatDialog != null) && (this._who.equals(user))) {
/* 483 */         resetConnection(MessageFormat.format(
/* 484 */           Console.message("user-voice-dis"), arguments));
/*     */       }
/*     */       
/*     */ 
/*     */     }
/* 489 */     else if (whisper.startsWith("&|+voicechat>busy")) {
/* 490 */       if ((voiceChatDialog != null) && (this._who.equals(user))) {
/* 491 */         resetConnection(MessageFormat.format(
/* 492 */           Console.message("receiving-Voice"), arguments));
/*     */       }
/*     */       
/*     */ 
/*     */     }
/* 497 */     else if (whisper.startsWith("&|+voicechat>reject"))
/*     */     {
/* 499 */       if ((voiceChatDialog != null) && (this._who.equals(user))) {
/* 500 */         resetConnection(MessageFormat.format(
/* 501 */           Console.message("Voice-terminated"), arguments));
/*     */       }
/* 503 */       if ((voiceChatQueryDialog != null) && (voiceChatQueryWho != null) && 
/* 504 */         (voiceChatQueryWho.equals(user))) {
/* 505 */         voiceChatQueryDialog.closeIt(false);
/*     */         
/*     */ 
/* 508 */         voiceChatQueryWho = null;
/* 509 */         resetConnection(MessageFormat.format(
/* 510 */           Console.message("Voice-terminated"), arguments));
/*     */       }
/*     */     }
/* 513 */     return false;
/*     */   }
/*     */   
/*     */   public static boolean tryToRun(String s) {
/*     */     try {
/* 518 */       Runtime.getRuntime().exec(s);
/* 519 */       return true;
/*     */     } catch (IOException e) {}
/* 521 */     return false;
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   public void checkConnected()
/*     */   {
/* 531 */     if (getState() == 2) {
/* 532 */       resetConnection(Console.message("never-answered"));
/* 533 */       sendWhisper(who(), "&|+voicechat>reject");
/* 534 */       return;
/*     */     }
/*     */     
/* 537 */     if (getState() != 4) {
/* 538 */       resetConnection(Console.message("VoiceChat-failed"));
/*     */     }
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   public void resetConnection(String err)
/*     */   {
/* 557 */     this._error = err;
/* 558 */     if (err != null) {
/* 559 */       this._state = 5;
/* 560 */       Console.println(this._error);
/*     */     }
/*     */     
/* 563 */     if (voiceChatDialog != null) {
/* 564 */       voiceChatDialog.closeIt(true);
/*     */     }
/*     */   }
/*     */   
/*     */ 
/*     */   public void terminate()
/*     */   {
/* 571 */     if (this._vtimer != null)
/*     */     {
/* 573 */       synchronized (this._vtimer) {
/* 574 */         this._vtimer._vc = null;
/*     */       }
/*     */       
/* 577 */       this._vtimer = null;
/*     */     }
/*     */     
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/* 584 */     CDAudio.get().setEnabled(true);
/*     */     
/*     */ 
/*     */ 
/*     */ 
/* 589 */     ConnectionRecord.getList().addElement(new ConnectionRecord(who()));
/*     */     
/* 591 */     this._state = 0;
/*     */   }
/*     */   
/*     */   public void release() {
/* 595 */     if (chatMonitor != null) {
/* 596 */       chatMonitor.stop();
/* 597 */       chatMonitor = null;
/*     */     }
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */   public synchronized void dialogDone(Object who, boolean confirmed)
/*     */   {
/* 606 */     if (who == voiceChatQueryDialog) {
/* 607 */       voiceChatQueryDialog = null;
/* 608 */       if (confirmed) {
/* 609 */         sendWhisper(voiceChatQueryWho, "&|+voicechat>accept");
/* 610 */         initiateVoiceChat(voiceChatQueryWho, voiceChatQueryIP);
/*     */ 
/*     */ 
/*     */ 
/*     */       }
/* 615 */       else if (voiceChatQueryWho != null) {
/* 616 */         sendWhisper(voiceChatQueryWho, "&|+voicechat>reject");
/*     */       }
/* 618 */     } else if (who == voiceChatDialog) {
/* 619 */       this._state = 6;
/* 620 */       String stopString = URL.make("home:sfmain.exe -q")
/* 621 */         .unalias();
/*     */       
/*     */ 
/*     */ 
/* 625 */       tryToRun(stopString);
/*     */       
/*     */ 
/* 628 */       voiceChatDialog = null;
/* 629 */       sendWhisper(this._who, "&|+voicechat>reject");
/* 630 */       terminate();
/*     */ 
/*     */ 
/*     */ 
/*     */     }
/*     */     else
/*     */     {
/*     */ 
/*     */ 
/*     */ 
/* 640 */       String stopString = URL.make("home:sfmain.exe -q")
/* 641 */         .unalias();
/*     */       
/*     */ 
/* 644 */       tryToRun(stopString);
/*     */     }
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   private void sendWhisper(String destination, String text)
/*     */   {
/* 654 */     Pilot.sendText(destination, text);
/*     */     
/*     */ 
/*     */ 
/*     */ 
/* 659 */     if (_selfWhisper) {
/* 660 */       handleChatWhisper(destination, text, this._console);
/*     */     }
/*     */   }
/*     */ }


/* Location:              C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\console\VoiceChat.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */