All pastes #784699 Raw Edit

Something

public text v1 · immutable
·published 2007-11-19 20:21 UTC
rendered paste body
Public Sub refreshEggList()
        frmMain.lbEggs.Items.Clear()
        Dim botName As String = ""
        Dim networkEntry As String() = getFileLines("networks.ini")

     'Try 
        For Each Entry As String In networkEntry
            Dim eggdropXMLLines As String() = getXMLLines(Entry)

            For Each eggdropXMLLine As String In eggdropXMLLines

                If eggdropXMLLine.StartsWith("   <nick>") Then
                    botName = eggdropXMLLine.Trim("   <nick>").Trim("</nick>")
                    frmMain.lbEggs.Items.Add(botName & " (" & Entry & ")")
                End If
            ' the next line causes a NullReference exception
            Next
        Next
      ' catch ex as Exception 
          ' msgbox(ex, "error refreshing eggdrop list") 
      ' End Try

    End Sub