While running a client in F# interactive, the client crashed on what apparently was a notice. Here is the stack trace:
System.ArgumentException: The type of the given target mask '$$card.freenode.net' is invalid.
Parameter name: targetMask
at IrcDotNet.IrcTargetMask..ctor(String targetMask) in C:\fpound\code\src\ircdotnet\src\IrcDotNet\IrcTargetMask.cs:line 40
at IrcDotNet.IrcClient.GetMessageTarget(String targetName) in C:\fpound\code\src\ircdotnet\src\IrcDotNet\IrcClient.cs:line 1140
at IrcDotNet.IrcClient.<ProcessMessageNotice>b__13(String n) in C:\fpound\code\src\ircdotnet\src\IrcDotNet\IrcClientMessageProcessing.cs:line 223
at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at IrcDotNet.IrcClient.ProcessMessageNotice(IrcMessage message) in C:\fpound\code\src\ircdotnet\src\IrcDotNet\IrcClientMessageProcessing.cs:line 223
at IrcDotNet.IrcClient.ReadMessage(IrcMessage message, String line) in C:\fpound\code\src\ircdotnet\src\IrcDotNet\IrcClient.cs:line 1560
at IrcDotNet.IrcClient.ReceiveCompleted(Object sender, SocketAsyncEventArgs e) in C:\fpound\code\src\ircdotnet\src\IrcDotNet\IrcClient.cs:line 1908
at System.Net.Sockets.SocketAsyncEventArgs.OnCompleted(SocketAsyncEventArgs e)
at System.Net.Sockets.SocketAsyncEventArgs.ExecutionCallback(Object ignored)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Net.Sockets.SocketAsyncEventArgs.FinishOperationSuccess(SocketError socketError, Int32 bytesTransferred, SocketFlags flags)
at System.Net.Sockets.SocketAsyncEventArgs.CompletionPortCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
It looks like changing a single `if` to `else if` solves this problem. I'll commit the fix shortly; it will be present in the 0.4.1 release. Thanks for the report.