Advertisement
Brandan

XWIS/WOL SERVER EMULATOR

Jan 30th, 2012
357
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 3.86 KB | None | 0 0
  1.  
  2.     Private Sub Incoming(ByVal Message As String)
  3.         Dim sendwelcome = _
  4.                      ": 375 u :- Welcome to Roleplay2!" & vbNewLine & _
  5.                      ": 372 u :- " & vbNewLine & _
  6.                      ": 372 u :- 0 players (WC: 0, RG: 0) are online" & vbNewLine & vbNewLine & _
  7.                      ": 376 u" & vbNewLine & _
  8.                      ": 379 u :none none none 1 32512 NONREQ" & vbNewLine
  9.         Dim setcodepage = _
  10.                      ": 399 u " & nickname & "`0" & vbNewLine & _
  11.                      ": 391 u irc.westwood.com :1311833221" & vbNewLine & _
  12.                      ": 329 u 1252" & vbNewLine
  13.         Dim joingame = _
  14.                        ":" & nickname & "!u@h JOINGAME 2 121 12 1 0 842340095 0 :#" & nickname & "" & vbNewLine & _
  15.                        ": 332 u #" & nickname & " :" & vbNewLine & _
  16.                        ": 353 u = #" & nickname & " :@" & nickname & ",0,842340095" & vbNewLine & _
  17.                        ": 366 u #" & nickname & " :" & vbNewLine
  18.         Dim getcodepage = _
  19.                        ":" & nickname & "!u@h USERIP " & nickname & " " & externalip & vbNewLine & _
  20.                        ":" & nickname & "!u@h STARTG u :" & nickname & " " & externalip & " :1642748 1311833234" & vbNewLine & _
  21.                        ": 309 u " & nickname & "`0" & vbNewLine & _
  22.                        ": 328 u " & nickname & "`1252" & vbNewLine
  23.         Dim getgameinfo = _
  24.                        ":" & nickname & "!u@h USERIP " & nickname & " 127.0.0.1" & vbNewLine & _
  25.                        ":" & nickname & "!u@h STARTG u :" & nickname & " " & externalip & " :1650512 1311933973" & vbNewLine & _
  26.                        ": 309 u " & nickname & "`0" & vbNewLine & _
  27.                        ": 328 u " & nickname & "`1252" & vbNewLine
  28.         Dim newmap = ":" & nickname & "!u@h STARTG u :" & nickname & " " & externalip & " :1650524 1311934012" & vbNewLine
  29.         If Message.Contains("verchk") Then
  30.             Dim TextLines() As String = Message.Split(Environment.NewLine.ToCharArray, System.StringSplitOptions.RemoveEmptyEntries)
  31.             nickname = TextLines(2).Replace("NICK ", Nothing)
  32.             Delegates.RichTextBoxes.appendText(Me, RichTextBox1, vbNewLine & Date.Now & ": FDS Logged On..." & vbNewLine)
  33.             Delegates.RichTextBoxes.appendText(Me, RichTextBox1, Date.Now & ": NickName: " & TextLines(2).Replace("NICK ", Nothing) & vbNewLine)
  34.             Delegates.RichTextBoxes.appendText(Me, RichTextBox1, Date.Now & ": Password: " & TextLines(1).Replace("PASS ", Nothing) & vbNewLine)
  35.             Delegates.RichTextBoxes.appendText(Me, RichTextBox1, Date.Now & ": Serial: " & TextLines(4).Replace("SERIAL ", Nothing) & vbNewLine)
  36.             serverSendToAllConnected("", sendwelcome)
  37.         End If
  38.  
  39.         If Message.Contains("TIME") Then
  40.             Delegates.RichTextBoxes.appendText(Me, RichTextBox1, Date.Now & ": FDS Asking For Identity..." & vbNewLine)
  41.             serverSendToAllConnected("", setcodepage)
  42.             rtard.Start()
  43.         End If
  44.  
  45.         If Message.Contains("JOINGAME") Then
  46.             Delegates.RichTextBoxes.appendText(Me, RichTextBox1, Date.Now & ": FDS Asking For Channel Creation..." & vbNewLine)
  47.             serverSendToAllConnected("", joingame)
  48.         End If
  49.  
  50.         If Message.Contains("GETLOCALE") Then
  51.             rtard.Stop()
  52.             Delegates.RichTextBoxes.appendText(Me, RichTextBox1, Date.Now & ": FDS Channel Created!..." & vbNewLine)
  53.             Delegates.RichTextBoxes.appendText(Me, RichTextBox1, Date.Now & ": FDS Asking For IP Address..." & vbNewLine)
  54.             serverSendToAllConnected("", getgameinfo)
  55.         End If
  56.  
  57.         If Message.Contains("STARTG") Then
  58.             Delegates.RichTextBoxes.appendText(Me, RichTextBox1, Date.Now & ": FDS Map Loaded!..." & vbNewLine)
  59.             serverSendToAllConnected("", newmap)
  60.         End If
  61.     End Sub ' |
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement